[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nginx
Subject:    why nginx worker process listen in port 80, not master process?
From:       "Zhengyu Pan" <zhengyupann () 163 ! com>
Date:       2020-07-24 13:27:01
Message-ID: 68347349.84ec.17381016e44.Coremail.zhengyupann () 163 ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

In my node, Every network namespace has own nginx process.

when i use netstat command to get which nginx process are listening in port 80? I \
found that some nginx worker process are listening 80 port. Some nginx master process \
are listening port 80. In my understanding ,it should be that nginx master process \
will listen port 80? Why happens that worker process listen port 80? Is it about \
reload?

  [root@node2 ~]# for i in `ip netns |grep lbaas| awk '{print $1}'`; do ip netns exec \
$i netstat -atnp |grep nginx;done  tcp        0      0 0.0.0.0:80              \
0.0.0.0:*               LISTEN      22253/nginx: worker  tcp        0      0 \
0.0.0.0:80              0.0.0.0:*               LISTEN      21968/nginx: worker  tcp  \
0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      22622/nginx: \
worker  tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN    \
17499/nginx: master  tcp        0      0 0.0.0.0:80              0.0.0.0:*            \
LISTEN      15567/nginx: master  tcp        0      0 0.0.0.0:80              \
0.0.0.0:*               LISTEN      17568/nginx: master  tcp        0      0 \
0.0.0.0:80              0.0.0.0:*               LISTEN      18643/nginx: master  tcp  \
0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      18736/nginx: \
master  tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN    \
17328/nginx: master  tcp        0      0 0.0.0.0:80              0.0.0.0:*            \
LISTEN      17766/nginx: master
















--


[Attachment #5 (text/html)]

<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><p \
style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-variant-numeric: inherit; \
font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; \
font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: \
15px; vertical-align: baseline; box-sizing: inherit; clear: both; color: rgb(36, 39, \
41);">In my node, Every network namespace has own nginx process.</p><p style="margin: \
0px 0px 1em; padding: 0px; border: 0px; font-variant-numeric: inherit; \
font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; \
font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: \
15px; vertical-align: baseline; box-sizing: inherit; clear: both; color: rgb(36, 39, \
41);">when i use&nbsp;<strong style="margin: 0px; padding: 0px; border: 0px; \
font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: \
inherit; font-family: inherit; vertical-align: baseline; box-sizing: \
inherit;">netstat</strong>&nbsp;command to get which nginx process are listening in \
port 80? I found that some nginx worker process are listening 80 port. Some nginx \
master process are listening port 80. In my understanding ,it should be that nginx \
master process will listen port 80? Why happens that worker process listen port 80? \
Is it about reload?</p><pre style="font-size: 13px; margin-top: 0px; margin-bottom: \
1em; padding: 12px 8px; border: 0px; font-variant-numeric: inherit; \
font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; \
font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation \
Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, \
&quot;Courier New&quot;, monospace, sans-serif; vertical-align: baseline; box-sizing: \
inherit; width: auto; max-height: 600px; overflow: auto; border-radius: 3px; color: \
rgb(36, 39, 41);"><code style="margin: 0px; padding: 0px; border: 0px; font-style: \
inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; \
line-height: inherit; font-family: Consolas, Menlo, Monaco, &quot;Lucida \
Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, \
&quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; \
vertical-align: baseline; box-sizing: inherit; background-color: transparent; \
white-space: inherit;">  [root@node2 ~]# for i in `ip netns |grep lbaas| awk '{print \
$1}'`; do ip netns exec $i netstat -atnp |grep nginx;done  tcp        0      0 <a \
href="http://0.0.0.0/" target="_blank" \
data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&amp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      22253/nginx: worker  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      21968/nginx: worker  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      22622/nginx: worker  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      17499/nginx: master  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      15567/nginx: master  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      17568/nginx: master  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      18643/nginx: master  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      18736/nginx: master  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      17328/nginx: master  tcp        0      0 <a href="http://0.0.0.0/" \
target="_blank" data-saferedirecturl="https://www.google.com/url?q=http://0.0.0.0:80&a \
mp;source=gmail&amp;ust=1595683567330000&amp;usg=AFQjCNHuUE5Qvz2A8DnLdefxgdomgCC2iA" \
style="color: rgb(17, 85, 204);">0.0.0.0:80</a>              0.0.0.0:*               \
LISTEN      17766/nginx: master</code></pre><p style="margin: 0;"><br></p><p \
style="margin: 0;"><br></p><p style="margin: 0;"><br></p><p style="margin: \
0;"><br></p><p style="margin: 0;"><br></p><div style="position:relative;zoom:1"><p \
style="margin: 0">--</p><div><br></div><div \
style="clear:both"></div></div></div><br><br><span \
title="neteasefooter"><p>&nbsp;</p></span>



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic