• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue All Websites Down and Plesk Panel Not Reachable After Restarting Nginx. Have SSH Access, Plesk Repair Not Working

agb9

New Pleskian
Server operating system version
Ubuntu 18.04 x86_64
Plesk version and microupdate number
Plesk Obsidian 18.0.52.3
Was using the SSH Terminal extension briefly as I could not connect directly, tested nginx with "nginx -t" and restarted nginx with "service nginx restart". This closed my connection to the SSH but now the Plesk panel is unavailable, along with my websites.

I restarted my VPS and SSH'd in and ran plesk repair all, with no errors. Sw-cp-server is running and so is apache2 and nginx. PHP seems to be working, with 8.1 and 7.4 both being working. 7.0 and 7.3 fail to start with no website pools. All sites but one run 8.1 and the other runs 7.4. Im not sure what PHP version the plesk panel runs.

At a loss for what to do here as the plesk panel service seems to be running without issue and plesk repair is not picking up anything either. I would greatly appreciate your help.
 
It seems that Fail2Ban has listed your Internet access point IP address (your public router IP). You could examine /var/log/fail2ban.log whether your IP is listed (maybe shorted by the last octect, so only search for the first three like grep 123.123.123 /var/log/fail2ban.log).
 
Thank you for your response, not sure exactly what you mean. Are you referring to my personal home IP address? here is the output of that:

root@dazzling-bell:~# grep ********* /var/log/fail2ban.log
2023-09-25 11:53:01,152 fail2ban.filter [1008]: INFO [plesk-wordpress] Found ********* - 2023-09-25 11:53:01
2023-09-29 23:24:38,022 fail2ban.filter [1008]: INFO [plesk-wordpress] Found ********* - 2023-09-29 23:24:38
2023-09-30 00:45:35,551 fail2ban.filter [1008]: INFO [plesk-wordpress] Found ********* - 2023-09-30 00:45:35
2023-09-30 00:52:18,879 fail2ban.filter [1008]: INFO [plesk-wordpress] Found ********* - 2023-09-30 00:52:18
 
Yes, I am referring to your home IP address (the IP address from where you try to access the server). If you send too many wrong logins from there, Fail2Ban will ban you. For that reason it seems that you can no longer reach your server. From your log output no bans can be seen, though, only a detection of an access violation. Can you access your server through your mobile phone when the phone is not connected to your wifi, but through a broadcast cell?
 
Ah, no , the site doesnt work on mobile. I cannot access, and my Domains page shows broken websites. I had a somewhat experienced sysadmin user try to find the solution for about two hours and was unable to so far. he believes it is a "plesk networking issue"
 
I have my plesk panel set up on a domain name, and it does not connect using the .com on port 80/443. However it does work on port 8443 and I am able to access the plesk panel.
 
Maybe there have been modifications to your Nginx or Apache configuration that sites are shown as "broken"? "# plesk repair web -y" could help.
 
root@dazzling-bell:~# ss -tulpn | grep :443
root@dazzling-bell:~# ss -tulpn | grep 80
tcp LISTEN 0 511 0.0.0.0:8880 0.0.0.0:* users:(("sw-cp-serverd",pid=12762,fd=10),("sw-cp-serverd",pid=12759,fd=10))
tcp LISTEN 0 511 *:7080 *:* users:(("apache2",pid=28248,fd=4),("apache2",pid=28247,fd=4),("apache2",pid=28246,fd=4),("apache2",pid=1749,fd=4))
tcp LISTEN 0 80 [::ffff:127.0.0.1]:3306 *:* users:(("mysqld",pid=1263,fd=17))
tcp LISTEN 0 511 [::]:8880 [::]:* users:(("sw-cp-serverd",pid=12762,fd=12),("sw-cp-serverd",pid=12759,fd=12))
root@dazzling-bell:~# ss -tulpn | grep 22
udp UNCONN 0 0 172.31.50.221:53 0.0.0.0:* users:(("named",pid=1048,fd=533),("named",pid=1048,fd=532))
udp UNCONN 0 0 172.31.60.86:53 0.0.0.0:* users:(("named",pid=1048,fd=523),("named",pid=1048,fd=522))
tcp LISTEN 0 10 172.31.50.221:53 0.0.0.0:* users:(("named",pid=1048,fd=31))
tcp LISTEN 0 10 127.0.0.1:53 0.0.0.0:* users:(("named",pid=1048,fd=22))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=1107,fd=3))
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=1107,fd=4))
root@dazzling-bell:~# ss -tulpn | grep 143
tcp LISTEN 0 1024 0.0.0.0:143 0.0.0.0:* users:(("dovecot",pid=953,fd=42))
tcp LISTEN 0 1024 [::]:143 [::]:* users:(("dovecot",pid=953,fd=43))
AWS security group inbound rules are allowed and ACL is allowing
Web server is not listening on port 80 or 443 since restart
Firewall is disabled
 
How do you know it is working? Can you show it, please?
What modifications were done to Nginx that you needed to "nginx -t" as described in your initial post?
 
nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/nginx.service.d
└─respawn.conf
Active: active (running) since Sun 2023-10-01 06:50:27 EDT; 14min ago
Main PID: 28534 (nginx)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/nginx.service
├─28534 nginx: master process /usr/sbin/nginx
└─28536 nginx: worker process

Oct 01 06:50:27 dazzling-bell.3-94-95-79.plesk.page systemd[1]: Starting Startup script for nginx service...
Oct 01 06:50:27 dazzling-bell.3-94-95-79.plesk.page nginx[28525]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 01 06:50:27 dazzling-bell.3-94-95-79.plesk.page nginx[28525]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 01 06:50:27 dazzling-bell.3-94-95-79.plesk.page systemd[1]: Started Startup script for nginx service.

root@dazzling-bell:/etc/nginx# ss -tulpn | grep nginx
does not return nginx listening on ports

What is the file that I would need to edit to re-add nginx configuration for listening to ports? i understand it is different than standard nginx conf.

Thanks so much
 
Please disregard my message about wanting to edit the file directly, I am more interested in restoring it to how it needs to run properly for plesk.. thank you
 
If you still have access to the Plesk GUI, you can simply turn off the Nginx service there, wait until it finishes and reconfigures all webserver configuration files (it does not only turn off the service, it does all the other work, too). Then turn it on again, which will again cause a reconfiguration of all webserver configuration files.

The same can be achieved on the Linux command line by running
Disable: /usr/local/psa/admin/sbin/nginxmng -d
Enable: /usr/local/psa/admin/sbin/nginxmng -e

But: From what we've discussed in this thread, it sounds as if files have been modified that are not maintained by Plesk, so the procedure might not be successful. Plesk does control the port settings in /etc/nginx/plesk.conf.d/server.conf. It will also reconfigure this file when Nginx is toggled enabled/disabled. But if you added another configuration file that can overwrite that setting, it will not remove such an extra file.
 
Back
Top