- Plesk 12.5 for Linux
- Plesk Onyx for Linux
- Plesk 12.0 for Linux
- nginx as a proxy is enabled for a server.
- Websites are periodically down with the following error from nginx:
PLESK_INFO: 502 Bad Gateway
- The following errors can be found in
CONFIG_TEXT: [error] 10485#0: *1947668 connect() failed (111: Connection refused) while connecting to upstream, client: 203.0.113.2, server: , request: "GET / HTTP/1.1", upstream: "http://192.0.2.2:7080/", host: "example.com"
Where 192.0.2.2 is server's IP address.
Fail2Ban blocks server's IP addresses.
The issue with Fail2ban blocking server IPs was caused by a Plesk bug and has been already fixed in Plesk 17.5 Update 19.
In case upgrade to Plesk 17.5 is not possible:
- Login into Plesk.
- Open Tools & Settings > IP Addresses click Re-read IP button.
Make sure that IPs were added automatically to the trusted list in Tools & Settings > IP Address Banning (Fail2Ban).
- In case IP addresses weren't added automatically, add them manually in Tools & Settings > IP Address Banning (Fail2Ban) > Trusted IP Addresses:
- If the issue persits, connect to the server using SSH and restart
# service iptables restart