Назад | Перейти на главную страницу

почему мой VPS говорит, что мой статус nginx мертв, отключен, ошибка UFW, но сайты все еще работают?

Я сам могу выполнить любую команду применительно к сервису nginx. но pid все еще находится в /run/nginx.pid :-D, что показывает, что процесс запущен, и я все еще могу получить доступ к сайтам. но мертвый сервис страшный и тихий, и мне даже не нужно говорить, что если мне нужно будет перезапустить nginx, я не смогу, потому что не могу!

Я действительно ценю твою помощь.

systemctl статус nginx:

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@vps1:~# /etc/init.d/nginx status
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-08-23 12:31:26 WEST; 10h ago
  Process: 29455 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE)
  Process: 30170 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 30167 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 4178 (code=exited, status=0/SUCCESS)

journalctl -xe

Aug 23 22:51:18 vps1 saslauthd[1550]: do_auth         : auth failure: [user=amphidisc@vps.FQDN.com] [service=smtp] [realm=vps.FQDN
Aug 23 22:51:18 vps1 postfix/smtpd[32123]: warning: unknown[181.214.206.123]: SASL LOGIN authentication failed: authentication failure
Aug 23 22:51:19 vps1 postfix/smtpd[32123]: disconnect from unknown[181.214.206.123] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
Aug 23 22:51:23 vps1 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:21:2:d33:97:51a:d74:a4:24:01:ef:61:03:00 SRC=124.16.131.250 DST=100.47.84.180 LEN=60 T
Aug 23 22:51:25 vps1 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:21:2:d33:97:51a:d74:a4:24:01:ef:61:03:00 SRC=78.128.112.18 DST=100.47.84.180 LEN=40 TO
Aug 23 22:51:25 vps1 systemd[1]: Starting A high performance web server and a reverse proxy server...
-- Subject: Unit nginx.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has begun starting up.
Aug 23 22:51:25 vps1 nginx[3310]: nginx: [emerg] bind() to 100.47.84.180:80 failed (98: Address already in use)
Aug 23 22:51:25 vps1 nginx[3310]: nginx: [emerg] bind() to 100.47.84.180:443 failed (98: Address already in use)
Aug 23 22:51:26 vps1 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:21:2:d33:97:51a:d74:a4:24:01:ef:61:03:00 SRC=82.221.105.7 DST=100.47.84.180 LEN=44 TOS
Aug 23 22:51:26 vps1 nginx[3310]: nginx: [emerg] bind() to 100.47.84.180:80 failed (98: Address already in use)
Aug 23 22:51:26 vps1 nginx[3310]: nginx: [emerg] bind() to 100.47.84.180:443 failed (98: Address already in use)
Aug 23 22:51:26 vps1 nginx[3310]: nginx: [emerg] bind() to 100.47.84.180:80 failed (98: Address already in use)
Aug 23 22:51:26 vps1 nginx[3310]: nginx: [emerg] bind() to 100.47.84.180:443 failed (98: Address already in use)
Aug 23 22:51:27 vps1 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:21:2:d33:97:51a:d74:a4:24:01:ef:61:03:00 SRC=124.16.131.250 DST=100.47.84.180 LEN=60 T

кот /var/log/nginx/error.log

2018/08/23 12:26:41 [emerg] 29481#29481: invalid number of arguments in "fastcgi_pass" directive in /etc/nginx/sites-enabled/mydomain.com.conf:32
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:31:24 [emerg] 30170#30170: still could not bind()
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:32:11 [emerg] 30262#30262: still could not bind()
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 12:34:43 [emerg] 31749#31749: still could not bind()
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:44:39 [emerg] 31550#31550: still could not bind()
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:47:10 [emerg] 31757#31757: still could not bind()
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:49:41 [emerg] 31874#31874: still could not bind()
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:52:11 [emerg] 32122#32122: still could not bind()
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 21:54:42 [emerg] 32204#32204: still could not bind()
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:80 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: bind() to 54.71.93.142:443 failed (98: Address already in use)
2018/08/23 22:51:25 [emerg] 3310#3310: still could not bind()

Вы запустили nginx вручную, вне systemd. Вот почему systemd не может запустить его снова. Вы можете просто убить запущенный вручную nginx, и тогда вы сможете правильно перезапустить службу.