• 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

Resolved 502 Bad Gateway Web server received an invalid response while acting as a gateway or proxy server.

Kyobul

New Pleskian
UPDATE
----------------------
This issue was solved by the Plesk paid support and it was apparently an internal Plesk problem :
The issue is caused by the PaX incompatibility with PHP 7.x branch: PAX PHP errors.
---------------------------

Hello everyone,

Plesk has become better and better thtough the years but some issues still come back like a boomerang, like the 502 Gateway.

Installed Plesk version/build: 17.8.11 CentOS 7 1708180329.14

After auto-upgraded itself from 17.5 to 17.8, the Plesk login area shows now a :
Server Error
502
Bad Gateway
Web server received an invalid response while acting as a gateway or proxy server.

The websites and the rest of the server is fine and running. Plesk is inaccessible by UI.

Restarting the plesk engine, restarting the server, repairing the plesk installation, repairing all plesk, restarting services, repair kit... do nothing at all.

Any suggestions appreciated.
 
Last edited:
502 error is very general and mostly not exactly related to Plesk. A lot of different reasons can cause this error. You can see it our special 502 error hub - [HUB] 502 Bad Gateway
I'd suggest you check it and try to find correct method for investigation and fixing this issue.
 
Thank you for your reply. I agree with you, 502 is a general error and due to various reasons. However, Plesk is a paid service (at least for me) and we use Plesk not to struggle with our server management in command line. And in this case it is however related to Plesk since it is the only interface on the entire server that it is not working after Plesk auto-upgraded itself. A little bit fed up with it so I will just pay someone to fix this.
 
I also have the same error after update from 17.5 to 17.8. I have increased my fastcgi buffers. I have ran all the install repairs, the reconfig repairs. Nothing works. All the domains work fine after I disabled nginx via CLI.

[error] 11801#0: *5 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "XXX.XXX:8443", referrer: "https://XXX.XXX:8443/"
 
Thank you for your advice. I have the exact same error as you but since websites are running on the nginx, if I disable it - it is all doom. In my case every website is working well except the majestically inaccessible Plesk Panel.
 
Last edited:
Here is the solution for this case :

#################################
The issue is caused by the PaX incompatibility with PHP 7.x branch: PAX PHP errors.
Previously, this issue was not triggered, because Plesk Onyx 17.5 comes with sw-engine based on PHP 5.x:

# plesk php -v | head -n1
PHP 5.6.30 (cli) (built: Sep 12 2017 11:11:16)

Plesk Onyx 17.8, on the other side, has sw-engine based on PHP 7.x:

# plesk php -v | head -n1
PHP 7.1.14 (cli) (built: Apr 9 2018 16:55:38) ( NTS )

This issue does not affect Plesk PHP 7.x, because these handlers are ignored by the PaX MPROTECT:

# cat /proc/17511/status | tail -n1
PaX: PemRs

However, PaX is configured differently for sw-engine:

# cat /proc/8495/status | tail -n1
PaX: PeMRs

In order to resolve the issue, MPROTECT flag was disabled for sw-engine:
# systemctl stop sw-engine
# paxctl -cm /usr/sbin/sw-engine-fpm
# paxctl -cm /usr/bin/sw-engine
# systemctl start sw-engine

#################################
 
i have the same issue and i have no idea about paxctl in centos.
can you help me?

Your best bet is to start a new thread as there is various reasons which can cause the same outcome and not necessarily this exact issue.
 
i have the same issue and i have no idea about paxctl in centos.
can you help me?
I'm affraid I cannot help you because I am not technically proficient enough but I couldn't recommend you more to take the Plesk Paid Support. It is only 10$ monthly, you can cancel it any time and the support is really fast and highly professionnal.
 
One day suddenly on azure app I started to get the error 502 web server received an invalid response while acting as a gateway or proxy server on azure web app.

I did too much research to solve this problem, than I contacted to the support and they given me following solution which works for me.

“Scale up the application to Medium in order to change the instance where your application is running. Wait some minutes and check again your site The above change will change the worker instance.”

I hope this will help to solve the problem





Regarding
 
Back
Top