• 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

All sites hosted within Plesk stop working - This site can’t be reached

Brandon Turpin

Basic Pleskian
For what ever reason, I am getting periodic moments where all the sites hosted within Plesk stop working. It can last from 10-15 min at a time and I have no idea why it is happening. They seem to always come back up eventually and they are going down when no changes are being made. I have wordpress hosted websites, and I also have docker containers running asp.net core website and one docker container running mariaDB. All of them go down. The plesk control panel loads just fine. I have tried viewing the "preview" sites so the domain name is not being used and they do not work either.

Checked the server resources and Disk and CPU usage are all low. I am not sure where to begin looking! ANY help would be great!!
 
First thing to check is whether the webserver services are running:
# service httpd status
# service nginx status
What is the output of these two commands (when the sites cannot be reached)? (The # character is a prompt, omit it when entering the commands.)
 
Sorry for the delay. It took awhile for it to happen again... but here we are! I ran the requested commands.... and the responses are below

root@Plesk:~# service httpd status
Unit httpd.service could not be found.

root@Plesk:~# service nginx status
● nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: active (running) since Wed 2019-02-13 02:22:00 UTC; 2 weeks 0 days ag
Process: 5262 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCC
Process: 5261 ExecReload=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 5260 ExecReload=/usr/bin/test $NGINX_ENABLED = yes (code=exited, stat
Main PID: 6504 (nginx)
Tasks: 2 (limit: 2325)
CGroup: /system.slice/nginx.service
├─5264 nginx: worker process
└─6504 nginx: master process /usr/sbin/nginx

Feb 27 04:43:00 Plesk.local nginx[1979]: nginx: configuration file /etc/nginx/ng
Feb 27 04:43:00 Plesk.local systemd[1]: Reloaded Startup script for nginx servic
Feb 27 04:43:21 Plesk.local systemd[1]: Reloading Startup script for nginx servi
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: the configuration file /etc/ngin
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: configuration file /etc/nginx/ng
Feb 27 04:43:21 Plesk.local systemd[1]: Reloaded Startup script for nginx servic
Feb 27 04:49:05 Plesk.local systemd[1]: Reloading Startup script for nginx servi
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: the configuration file /etc/ngin
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: configuration file /etc/nginx/ng
Feb 27 04:49:05 Plesk.local systemd[1]: Reloaded Startup script for nginx servic
lines 1-22/22 (END)...skipping...
● nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-02-13 02:22:00 UTC; 2 weeks 0 days ago
Process: 5262 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 5261 ExecReload=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 5260 ExecReload=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=0/SUCCESS)
Main PID: 6504 (nginx)
Tasks: 2 (limit: 2325)
CGroup: /system.slice/nginx.service
├─5264 nginx: worker process
└─6504 nginx: master process /usr/sbin/nginx

Feb 27 04:43:00 Plesk.local nginx[1979]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 27 04:43:00 Plesk.local systemd[1]: Reloaded Startup script for nginx service.
Feb 27 04:43:21 Plesk.local systemd[1]: Reloading Startup script for nginx service.
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 27 04:43:21 Plesk.local systemd[1]: Reloaded Startup script for nginx service.
Feb 27 04:49:05 Plesk.local systemd[1]: Reloading Startup script for nginx service.
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 27 04:49:05 Plesk.local systemd[1]: Reloaded Startup script for nginx service.

CPU and Memory seem to all be below 1%. Again the plesk site loads just fine! So I do not think it is the server resources.
 
It comes up after 5-10 minutes. As far as i can tell, it seems to go back down when I visit a page on my site that has a bad url for ajax calls. I get a few 404 errors because the URL is wrong. I am fixing that, but it seems to shut down every time I visit a page with an ajax call... not sure why that would take all the sites down on the server!

Sorry for the delay. It took awhile for it to happen again... but here we are! I ran the requested commands.... and the responses are below

root@Plesk:~# service httpd status
Unit httpd.service could not be found.

root@Plesk:~# service nginx status
● nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: active (running) since Wed 2019-02-13 02:22:00 UTC; 2 weeks 0 days ag
Process: 5262 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCC
Process: 5261 ExecReload=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 5260 ExecReload=/usr/bin/test $NGINX_ENABLED = yes (code=exited, stat
Main PID: 6504 (nginx)
Tasks: 2 (limit: 2325)
CGroup: /system.slice/nginx.service
├─5264 nginx: worker process
└─6504 nginx: master process /usr/sbin/nginx

Feb 27 04:43:00 Plesk.local nginx[1979]: nginx: configuration file /etc/nginx/ng
Feb 27 04:43:00 Plesk.local systemd[1]: Reloaded Startup script for nginx servic
Feb 27 04:43:21 Plesk.local systemd[1]: Reloading Startup script for nginx servi
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: the configuration file /etc/ngin
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: configuration file /etc/nginx/ng
Feb 27 04:43:21 Plesk.local systemd[1]: Reloaded Startup script for nginx servic
Feb 27 04:49:05 Plesk.local systemd[1]: Reloading Startup script for nginx servi
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: the configuration file /etc/ngin
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: configuration file /etc/nginx/ng
Feb 27 04:49:05 Plesk.local systemd[1]: Reloaded Startup script for nginx servic
lines 1-22/22 (END)...skipping...
● nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-02-13 02:22:00 UTC; 2 weeks 0 days ago
Process: 5262 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 5261 ExecReload=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 5260 ExecReload=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=0/SUCCESS)
Main PID: 6504 (nginx)
Tasks: 2 (limit: 2325)
CGroup: /system.slice/nginx.service
├─5264 nginx: worker process
└─6504 nginx: master process /usr/sbin/nginx

Feb 27 04:43:00 Plesk.local nginx[1979]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 27 04:43:00 Plesk.local systemd[1]: Reloaded Startup script for nginx service.
Feb 27 04:43:21 Plesk.local systemd[1]: Reloading Startup script for nginx service.
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 27 04:43:21 Plesk.local nginx[2590]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 27 04:43:21 Plesk.local systemd[1]: Reloaded Startup script for nginx service.
Feb 27 04:49:05 Plesk.local systemd[1]: Reloading Startup script for nginx service.
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 27 04:49:05 Plesk.local nginx[5261]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 27 04:49:05 Plesk.local systemd[1]: Reloaded Startup script for nginx service.

CPU and Memory seem to all be below 1%. Again the plesk site loads just fine! So I do not think it is the server resources.
 
You don't have a RHEL, so in this case instead of httpd, the service is apache2:
# service apache2 status
 
You don't have a RHEL, so in this case instead of httpd, the service is apache2:
# service apache2 status

root@Plesk:~# service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Wed 2019-02-27 04:49:08 UTC; 15h ago
Process: 5172 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS
Process: 8366 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/S
Process: 5346 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCE
Main PID: 5366 (apache2)
Tasks: 56 (limit: 2325)
CGroup: /system.slice/apache2.service
├─5366 /usr/sbin/apache2 -k start
├─8411 /usr/sbin/apache2 -k start
├─8412 /usr/sbin/apache2 -k start
└─8413 /usr/sbin/apache2 -k start

Feb 27 04:49:08 Plesk.local systemd[1]: Starting The Apache HTTP Server...
Feb 27 04:49:08 Plesk.local systemd[1]: Started The Apache HTTP Server.
Feb 27 06:30:37 Plesk.local systemd[1]: Reloading The Apache HTTP Server.
Feb 27 06:30:37 Plesk.local systemd[1]: Reloaded The Apache HTTP Server.
Feb 27 06:30:37 Plesk.local systemd[1]: Reloading The Apache HTTP Server.
Feb 27 06:30:38 Plesk.local systemd[1]: Reloaded The Apache HTTP Server.
lines 1-22/22 (END)...skipping...
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Wed 2019-02-27 04:49:08 UTC; 15h ago
Process: 5172 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 8366 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Process: 5346 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 5366 (apache2)
Tasks: 56 (limit: 2325)
CGroup: /system.slice/apache2.service
├─5366 /usr/sbin/apache2 -k start
├─8411 /usr/sbin/apache2 -k start
├─8412 /usr/sbin/apache2 -k start
└─8413 /usr/sbin/apache2 -k start

Feb 27 04:49:08 Plesk.local systemd[1]: Starting The Apache HTTP Server...
Feb 27 04:49:08 Plesk.local systemd[1]: Started The Apache HTTP Server.
Feb 27 06:30:37 Plesk.local systemd[1]: Reloading The Apache HTTP Server.
Feb 27 06:30:37 Plesk.local systemd[1]: Reloaded The Apache HTTP Server.
Feb 27 06:30:37 Plesk.local systemd[1]: Reloading The Apache HTTP Server.
Feb 27 06:30:38 Plesk.local systemd[1]: Reloaded The Apache HTTP Server.


I am not sure what is going on here! But it is still happening even after fixing the ajax calls. This is in the middle of my sites not loading
 
Last edited:
Just to make sure that I understand it correctly: While all your sites are down the above command (service apache2 status) delivers the output that you have posted here?
 
Just to make sure that I understand it correctly: While all your sites are down the above command (service apache2 status) delivers the output that you have posted here?
I am able to ping the domain name just fine. I am just getting

This site can’t be reached
website.com took too long to respond
 
I am able to ping the domain name just fine. I am just getting

This site can’t be reached
website.com took too long to respond
Looks like plesk is blocking the IP addresses. So the site was not down, just blocked from my ip address. And some of the IP blocks were temporary blocks and they would come off and start working again.

[recidive]
enabled = true
filter = recidive
action = iptables-allports[name=recidive]
logpath = /var/log/fail2ban.log
maxretry = 5
 
Please add the IPv4 address of your server (not of your Internet connection) to the whitelist of Fail2Ban. Also add 127.0.0.1 to the whitelist of Fail2Ban. The issue occurs, because the front end reverse proxy Nginx connects to Apache using the public IPv4 address of the host and/or localhost IP. These two must be whitelisted to avoid false positive blocking by Fail2Ban.
 
Please add the IPv4 address of your server (not of your Internet connection) to the whitelist of Fail2Ban. Also add 127.0.0.1 to the whitelist of Fail2Ban. The issue occurs, because the front end reverse proxy Nginx connects to Apache using the public IPv4 address of the host and/or localhost IP. These two must be whitelisted to avoid false positive blocking by Fail2Ban.
127.0.0.1/8 was white listed, however the IP of the server was not. I added that and we will see if that fixes it! Thanks!
 
Please add the IPv4 address of your server (not of your Internet connection) to the whitelist of Fail2Ban. Also add 127.0.0.1 to the whitelist of Fail2Ban. The issue occurs, because the front end reverse proxy Nginx connects to Apache using the public IPv4 address of the host and/or localhost IP. These two must be whitelisted to avoid false positive blocking by Fail2Ban.
It looks like it was still getting blocked for another issue. Im not sure what modsecurity is looking for and what made me get blocked this time. I unblocked it, and after navigating to a few pages it is banned again. Any idea what this is doing?

[plesk-modsecurity]
enabled = true
filter = plesk-modsecurity
action = iptables-multiport[name="plesk-modsecurity", port="http,https,7080,7081"]
logpath = /var/log/modsec_audit.log
maxretry = 5
 
Anyone have any idea on this... I am still getting some blocks from legit traffic. Its is a lot better.. but I cant have good traffic being blocked.
 
If ModSecurity is the issue, then look into the error log files for the 403 codes and check what URL has been requested. Either disable the "Web Application Firewall" completely (there are some software packages that are incompatible with ModSecurity) or add a custom rule to exclude specific URL parameter strings from ModSecurity (this can be done in the Web Application Firewall settings).
 
Back
Top