• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Error 502 Bad Gateway no KB helped

SalvadorS

Regular Pleskian
Hello,

Today we have one of our servers (Plesk 12.5, Debian 8.3) with Error 502 Bad Gateway in all websites (control panel works fine). The error starts when the logs rotated this morning...

We followed KB articles to fix the issue with no results.

We re enable enginx, reconfigured the domains configurations, see logs... Nothing

Only we find this log on the proxy_error_log of the sites:

2016/02/15 09:50:30 [error] 6836#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: x.y.z.q, server: domain.com, request: "GET / HTTP/1.1", upstream: "http://a.b.c.d:7080/", host: "www.domain.com"

2016/02/15 09:52:00 [error] 8046#0: *150 connect() failed (111: Connection refused) while connecting to upstream, client: x.y.z.q, server: domain.com, request: "GET / HTTP/1.1", upstream: "http://a.b.c.d:7080/", host: "www.domain.com"


Where x.y.z.q is the IP of my DSL connection and a.b.c.d is the IP of the server and domain.com the domain name with the error.

Any help?
 
What about adding to http section of /etc/nginx/nginx.conf:

proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

Does it help after nginx service restart?
 
Thanks for the reply.

Added that lines and restart nginx without success. I´m going to open a sport ticket.
 
What is ticket ID? I would like to check processing. Thanks.
 
Hello,

This was the error. fail2ban was activated on the server. IP of the server was banned in plesk-modsecurity jail (don´t know why). So the result was 502 error bad gateway... I moved the IP to the white list and the problem was fixed.
 
Back
Top