|
|
本帖最后由 yxw886 于 2020-9-23 01:09 编辑
一开始都是正常的,服务器重启nginx还会自动启动,突然今天重启服务器,发现网站打不开了,systemctl status nginx,提示
● nginx.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-09-23 00:27:22 CST; 1min 17s ago
Process: 1632 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=1/FAILURE)
Main PID: 1095 (code=killed, signal=KILL)
Sep 23 00:27:22 web.novalocal kill[1632]: -q, --queue <sig> use sigqueue(2) rather than kill(2)
Sep 23 00:27:22 web.novalocal kill[1632]: -p, --pid print pids without signaling them
Sep 23 00:27:22 web.novalocal kill[1632]: -l, --list [=<signal>] list signal names, or convert one to a name
Sep 23 00:27:22 web.novalocal kill[1632]: -L, --table list signal names and numbers
Sep 23 00:27:22 web.novalocal kill[1632]: -h, --help display this help and exit
Sep 23 00:27:22 web.novalocal kill[1632]: -V, --version output version information and exit
Sep 23 00:27:22 web.novalocal kill[1632]: For more details see kill(1).
Sep 23 00:27:22 web.novalocal systemd[1]: nginx.service: control process exited, code=exited status=1
Sep 23 00:27:22 web.novalocal systemd[1]: Unit nginx.service entered failed state.
Sep 23 00:27:22 web.novalocal systemd[1]: nginx.service failed.
使用nginx -t,检查没问题
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
输入journalctl -xe,向上翻几页,看到:
Sep 23 00:27:22 web.novalocal systemd[1]: Starting (null)...
-- Subject: Unit selinux.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit selinux.service has begun starting up.
Sep 23 00:27:22 web.novalocal systemd[1]: nginx.service: main process exited, code=killed, status=9/KILL
Sep 23 00:27:22 web.novalocal kill[1632]: Usage:
Sep 23 00:27:22 web.novalocal kill[1632]: kill [options] <pid|name> [...]
Sep 23 00:27:22 web.novalocal kill[1632]: Options:
Sep 23 00:27:22 web.novalocal kill[1632]: -a, --all do not restrict the name-to-pid conversion to processes
Sep 23 00:27:22 web.novalocal kill[1632]: with the same uid as the present process
Sep 23 00:27:22 web.novalocal kill[1632]: -s, --signal <sig> send specified signal
Sep 23 00:27:22 web.novalocal kill[1632]: -q, --queue <sig> use sigqueue(2) rather than kill(2)
Sep 23 00:27:22 web.novalocal kill[1632]: -p, --pid print pids without signaling them
Sep 23 00:27:22 web.novalocal kill[1632]: -l, --list [=<signal>] list signal names, or convert one to a name
Sep 23 00:27:22 web.novalocal kill[1632]: -L, --table list signal names and numbers
Sep 23 00:27:22 web.novalocal kill[1632]: -h, --help display this help and exit
Sep 23 00:27:22 web.novalocal kill[1632]: -V, --version output version information and exit
Sep 23 00:27:22 web.novalocal kill[1632]: For more details see kill(1).
Sep 23 00:27:22 web.novalocal systemd[1]: nginx.service: control process exited, code=exited status=1
Sep 23 00:27:22 web.novalocal systemd[1]: Unit nginx.service entered failed state.
Sep 23 00:27:22 web.novalocal systemd[1]: nginx.service failed.
Sep 23 00:27:22 web.novalocal cloud-init[1605]: Cloud-init v. 0.7.9 running 'modules:final' at Tue, 22 Sep 2020 16:27:22 +0000. Up 12.09 seconds.
Sep 23 00:27:22 web.novalocal systemd[1]: Started Dynamic System Tuning Daemon.
-- Subject: Unit tuned.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tuned.service has finished starting up.
--
-- The start-up result is done.
手动输入 systemctl start nginx,可以启动,网站可以正常打开,输入systemctl status nginx,提示:
● nginx.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-09-23 00:41:20 CST; 4s ago
Process: 1632 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=1/FAILURE)
Process: 2738 ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 2739 (nginx)
Tasks: 5
Memory: 82.5M
CGroup: /system.slice/nginx.service
├─2739 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
├─2740 nginx: worker process
├─2741 nginx: worker process
├─2742 nginx: worker process
└─2743 nginx: worker process
Sep 23 00:41:20 web.novalocal systemd[1]: Starting The NGINX HTTP and reverse proxy server...
Sep 23 00:41:20 web.novalocal systemd[1]: Started The NGINX HTTP and reverse proxy server.
有大神知道什么原因吗?
|
|