首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >nginx即使在停止时也会阻塞端口。

nginx即使在停止时也会阻塞端口。
EN

Unix & Linux用户
提问于 2019-08-17 19:56:37
回答 1查看 300关注 0票数 0

经过一次

service nginx stop

我检查了端口80:

代码语言:javascript
复制
ps ax | grep nginx
  898 ?        Ss     0:00 runsv nginx
  943 ?        S      0:00 svlogd -tt /var/log/gitlab/nginx
 4063 pts/0    S+     0:00 grep --color=auto nginx
29681 ?        Ss     0:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
29682 ?        S      0:00 nginx: worker process
29683 ?        S      0:00 nginx: worker process
29684 ?        S      0:00 nginx: worker process
29685 ?        S      0:00 nginx: worker process
29686 ?        S      0:00 nginx: worker process
29687 ?        S      0:00 nginx: worker process
29688 ?        S      0:00 nginx: worker process
29689 ?        S      0:00 nginx: worker process
29690 ?        S      0:00 nginx: worker process
29691 ?        S      0:00 nginx: worker process
29692 ?        S      0:00 nginx: worker process
29693 ?        S      0:00 nginx: worker process
29694 ?        S      0:00 nginx: worker process
29695 ?        S      0:00 nginx: worker process
29696 ?        S      0:00 nginx: worker process
29697 ?        S      0:00 nginx: worker process
29698 ?        S      0:00 nginx: cache manager process

然后我杀死了所有这些过程

kill -9 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 29697 29698

它还在那里吗?

代码语言:javascript
复制
ps ax | grep nginx:
 9074 ?        Ss     0:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
 9105 ?        S      0:00 nginx: worker process
 9107 ?        S      0:00 nginx: worker process
 9108 ?        S      0:00 nginx: worker process
 9109 ?        S      0:00 nginx: worker process
 9110 ?        S      0:00 nginx: worker process
 9111 ?        S      0:00 nginx: worker process
 9112 ?        S      0:00 nginx: worker process
 9113 ?        S      0:00 nginx: worker process
 9114 ?        S      0:00 nginx: worker process
 9115 ?        S      0:00 nginx: worker process
 9116 ?        S      0:00 nginx: worker process
 9117 ?        S      0:00 nginx: worker process
 9118 ?        S      0:00 nginx: worker process
 9119 ?        S      0:00 nginx: worker process
 9120 ?        S      0:00 nginx: worker process
 9121 ?        S      0:00 nginx: worker process
 9122 ?        S      0:00 nginx: cache manager process
 9123 ?        S      0:00 nginx: cache loader process
 9297 pts/0    R+     0:00 grep --color=auto nginx:

怎么做和为什么?这使它与我试图跟踪的错误非常混淆-- nginx阻塞了自己,还是什么?:D。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-08-17 20:20:01

您自己的流程列表应该告诉您发生了什么:

代码语言:javascript
复制
nginx: master process /opt/gitlab/embedded/sbin/nginx

看看上面写着嵌入的nginx。

因此,当您运行service nginx stop时,请停止系统nginx。

由gitlab运行的nginx是另一个您必须单独处理的。同样,如果您不想使用Gitlab的嵌入式nginx,则需要对其进行解包

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/536058

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档