#nginx
#nginx
Вопрос:
У меня возникла проблема, когда Nginx запущен (о чем свидетельствует вывод ps aux | grep nginx
, и веб-сайты все еще обслуживаются), однако service nginx reload
отчеты nginx.service is not active, cannot reload
и service nginx restart
отчеты Job for nginx.service failed because the control process existed with error code.
, насколько я могу судить, nginx получает по-своему. Подробности ниже:
$ ps aux | grep nginx
nginx 9485 0.0 0.0 558996 12172 ? S< Oct26 0:00 php-fpm: pool www
root 20558 0.0 0.0 14856 1008 pts/0 S 21:36 0:00 grep --color=auto nginx
root 31852 0.0 0.2 73984 44976 ? Ss Nov03 0:00 nginx: master process nginx -c /etc/nginx/nginx.conf
nginx 32003 0.3 0.2 78364 46288 ? S Nov03 44:05 nginx: worker process
nginx 32004 0.0 0.2 78364 46288 ? S Nov03 0:45 nginx: worker process
nginx 32005 0.0 0.2 78364 46284 ? S Nov03 0:02 nginx: worker process
nginx 32006 0.0 0.2 78364 46224 ? S Nov03 0:00 nginx: worker process
nginx 32007 0.0 0.2 78364 45908 ? S Nov03 0:00 nginx: worker process
nginx 32008 0.0 0.2 78364 46012 ? S Nov03 0:00 nginx: worker process
$ systemctl status nginx
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-11-12 21:24:46 UTC; 13min ago
Docs: http://nginx.org/en/docs/
Process: 19125 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Main PID: 16146 (code=exited, status=0/SUCCESS)
Nov 12 21:24:45 Jupiter nginx[19125]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Nov 12 21:24:45 Jupiter nginx[19125]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Nov 12 21:24:45 Jupiter nginx[19125]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Nov 12 21:24:46 Jupiter nginx[19125]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Nov 12 21:24:46 Jupiter nginx[19125]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Nov 12 21:24:46 Jupiter nginx[19125]: nginx: [emerg] still could not bind()
Nov 12 21:24:46 Jupiter systemd[1]: nginx.service: Control process exited, code=exited status=1
Nov 12 21:24:46 Jupiter systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 12 21:24:46 Jupiter systemd[1]: Failed to start nginx - high performance web server.
Nov 12 21:35:13 Jupiter systemd[1]: nginx.service: Unit cannot be reloaded because it is inactive.
$ lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 31852 root 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
nginx 32003 nginx 18u IPv4 543262507 0t0 TCP Jupiter:http->crawl-66-249-79-242.googlebot.com:50078 (ESTABLISHED)
nginx 32003 nginx 36u IPv4 543262529 0t0 TCP Jupiter:http->laubervilliers-658-1-213-130.w90-63.abo.wanadoo.fr:65226 (ESTABLISHED)
nginx 32003 nginx 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
nginx 32003 nginx 139u IPv4 543267901 0t0 TCP Jupiter:http->crawl-66-249-79-250.googlebot.com:43354 (ESTABLISHED)
nginx 32004 nginx 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
nginx 32005 nginx 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
nginx 32006 nginx 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
nginx 32007 nginx 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
nginx 32008 nginx 114u IPv4 527474169 0t0 TCP *:http (LISTEN)
Есть идеи, что происходит и как это исправить?
Заранее спасибо!