- 2,486
- 839
- NAS
- Synology, TrueNAS
- Operating system
- Linux
- Windows
pid /run/nginx.pid ... Investigation
where I found nginx.conf (except docker sources):
./etc.defaults/syslog-ng/patterndb.d/nginx.conf
./etc/syslog-ng/patterndb.d/nginx.conf
./etc/nginx/nginx.conf
just this one: ./usr/share/init/nginx.conf
contains "pid /run/nginx.pid":
and there is just single place with the "nginx.pid" :
so
respond:
then
17213 is the PID of nginx MASTER process
then again
...whether there is any nginx process running or port 80 is occupied - next killing candidate
killed
finally:
still same sh.t
I can't get the error:
both directory and file are available
where I found nginx.conf (except docker sources):
./etc.defaults/syslog-ng/patterndb.d/nginx.conf
./etc/syslog-ng/patterndb.d/nginx.conf
./etc/nginx/nginx.conf
just this one: ./usr/share/init/nginx.conf
contains "pid /run/nginx.pid":
Bash:
exec /usr/bin/nginx $startArg -g 'pid /run/nginx.pid; daemon on; master_process on;'
and there is just single place with the "nginx.pid" :
Bash:
/var/run/
so
Bash:
ps -ef | grep nginx
Bash:
root 11577 28405 0 16:30 pts/16 00:00:00 grep --color=auto nginx
root 17213 1 0 16:06 ? 00:00:00 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on;
http 30367 17213 0 16:08 ? 00:00:00 nginx: worker process
http 30368 17213 0 16:08 ? 00:00:00 nginx: worker process
http 30369 17213 0 16:08 ? 00:00:00 nginx: worker process
http 30370 17213 0 16:08 ? 00:00:00 nginx: worker process
then
17213 is the PID of nginx MASTER process
Bash:
kill -9 17213
Bash:
ps -ef | grep nginx
Bash:
netstat -tulpn |grep 80
Bash:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 30367/nginx: worker
tcp6 0 0 :::80 :::* LISTEN 30367/nginx: worker
tcp6 0 0 fe80::211:32ff:fe2:3260 :::* LISTEN -
tcp6 0 0 fe80::211:32ff:fe2:3260 :::* LISTEN -
udp 0 0 127.0.0.1:161 0.0.0.0:* 12805/snmpd
udp6 0 0 fe80::211:32ff:fe21:123 :::* 12623/ntpd
udp6 0 0 fe80::211:32ff:fe21:123 :::* 12623/ntpd
finally:
Bash:
synoservice --restart nginx
still same sh.t
-- post merged: --
I can't get the error:
Bash:
1202#1202: signal process started
2021/11/04 02:30:23 [error] 1202#1202: open() "/run/nginx.pid" failed (2: No such file or directory)
both directory and file are available