Hello,
the server was unresponsive so I connected using ssh and investigated.
Nginx seemed to be down:
netstat -tulnp|grep 80
tcp 0 0 0.0.0.0:7800 0.0.0.0:* LISTEN 13459/python
Nginx was installed through aapanel:
ll /usr/bin/nginx
lrwxrwxrwx 1 root root 28 Jul 19 2022 /usr/bin/nginx -> /www/server/nginx/sbin/nginx*
I read on the forums that nginx should be started using /etc/init.d, so I made sure systemctl is disabled and stopped:
systemctl status nginx
× nginx.service - LSB: starts the nginx web server
Loaded: loaded (/etc/init.d/nginx; generated)
Active: failed (Result: exit-code) since Wed 2023-09-27 11:30:55 CEST; 24s ago
Docs: man:systemd-sysv-generator(8)
Process: 13811 ExecStop=/etc/init.d/nginx stop (code=exited, status=1/FAILURE)
CPU: 3ms
Sep 27 11:29:10 server2.nanth.gr systemd[1]: Starting LSB: starts the nginx web server...
Sep 27 11:29:18 server2.nanth.gr systemd[1]: Started LSB: starts the nginx web server.
Sep 27 11:29:18 server2.nanth.gr nginx[12081]: Starting nginx...
Sep 27 11:29:18 server2.nanth.gr nginx[9799]: Starting nginx...
Sep 27 11:30:55 server2.nanth.gr systemd[1]: Stopping LSB: starts the nginx web server...
Sep 27 11:30:55 server2.nanth.gr nginx[13811]: Stoping nginx... nginx is not running.
Sep 27 11:30:55 server2.nanth.gr systemd[1]: nginx.service: Control process exited, code=exited, stat>
Sep 27 11:30:55 server2.nanth.gr systemd[1]: nginx.service: Failed with result 'exit-code'.
Sep 27 11:30:55 server2.nanth.gr systemd[1]: Stopped LSB: starts the nginx web server.
init.d is also stopped.
root@server2:/www/wwwlogs# /etc/init.d/nginx status
nginx is stopped
AApanel is running.Restarting the process or using bt 16 isn't helping. Also bt 22 doesn't show anything:
root@server2:/www/wwwlogs# bt status
Bt-Panel (pid 13459) already running
Bt-Task (pid 13465) already running
At this point it is weird that nginx processes are still on, and can't be killed/stopped:
ps aux|grep nginx
root 14031 0.0 0.0 5944 4096 pts/0 Ss+ 11:31 0:00 nginx: master process nginx -g daemon off;
systemd+ 14071 0.0 0.0 6400 1756 pts/0 S+ 11:31 0:00 nginx: worker process
systemd+ 14072 0.0 0.0 6400 1756 pts/0 S+ 11:31 0:00 nginx: worker process
systemd+ 14073 0.0 0.0 6400 1756 pts/0 S+ 11:31 0:00 nginx: worker process
systemd+ 14074 0.0 0.0 6400 1756 pts/0 S+ 11:31 0:00 nginx: worker process
Looking for errors, the error logs are empty. I tracked down two files:
/www/wwwlogs# ll nginx_error.log
-rwx------ 1 www www 0 Jul 19 2022 nginx_error.log*
/www/server/nginx/logs# ll error.log
-rw-r--r-- 1 root root 17401 Sep 3 00:12 error.log
I can also see that logging is enabled in the conf file:
/www/wwwlogs# nano /www/server/nginx/conf/nginx.conf
error_log /www/wwwlogs/nginx_error.log;
any help will be appreciated, thanks.