• 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
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

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