• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff 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