Plesk 12.x / Linux :: Error 502 Bad Gateway After Upgrade
Jun 27, 2014
I have upgraded from 11.5 to 12, and now if I try to open Plesk on the port 8443 I have this error:
502 Bad Gateway
nginx
This is the log:
2014/06/27 18:25:13 [crit] 1629#0: *2 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 79.49.206.176, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "87.106.85.233:8443"
After upgrading (i know, i should not do this) from Squeeze to Wheezy i have got a problem with subscriptions.Plesk seems to work, but whein i want do manage a domain/hosting. i just see 502 Bad Gateway nginxClick to expand...
We are running Plesk 12 (latest version) on openSuse 13.1. The web server is nginx as a proxy in front of Apache. We are running into a 502 Bad Gateway nginx error when trying to send data from a simple form to a php script.
The log shows: upstream prematurely closed connection while reading response header from upstream
It seems that Plesk does not configure nginx properly as some pages, especially pages that are accessed via https have broken headers. The headers of a page that is displaying
HTTP/1.1 400 Bad Request => Server => nginx Date => Sat, 26 Jul 2014 09:53:13 GMT Content-Type => text/html Content-Length => 166 Connection => close
under Plesk 12.0.18 PHPMyAdmin is failing to import a 3 MB SQL dump of a simple Joomla website. "Error 505 Bad Gateway", it says.It happens with other dumps too, some as small as ~500 KB. The format (SQL or ZIP) of the file uploaded doesn't seem to matter, because the upload itself seems to work; it seems it's the post-processing what is raising the error.
The funny thing is that the import itself seems to work (the contents of the SQL dump are imported), but the error message appears and causes confusion and support requests from our clients./var/log/sw-cp-server/error_log says:
2015/05/15 03:19:31 [error] 10215#0: *5 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: XX.XX. XXX. XXX, server: , request: "POST /domains/databases/phpMyAdmin/import.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "xxxx. xxxxxxx.com:8443", referrer: URL.....To me it sounds like a timeout.
This seems to be a "popular" error among Plesk users, and I have tried this, this and this with no luck.
As I read, when Plesk and WHMCS are in the same server, you may have 502 bad gateway errors when creating an account through WHMCS..Page not Found/Timeout/502 Bad Gateway error creating accounts with Plesk 10+..By default Plesk 10 and above performs a forced restart of apache when an account is created or suspended which causes WHMCS to lose connection to the server, and if your WHMCS is on the same server, you will also lose connection to WHMCS at the same time.
In order to resolve this please refer to the following knowledgebase article for instructions on configuring Plesk to perform a graceful restart instead: URL..
But when I activate nginx in Plesk the 502 bad Gateway problem comes back.Is there an option to activate Nginx graceful restart in Plesk?
We found 502 Bad Gateway error Nginx on multiple domain "currently troissoeursetunfrere.com is a wordpress site e-commerce" and also malittleboutique.com ecommerce wordpress, possibly to fix this problem we have followed this tutorial " [URL] ....
I have a V-Server account with Strato and just upgraded to 12.0.18 through the panel updater. The installation completed successfully, at least the installer gave me no error.
After the installation I tried to login and got the following error (I wasn't able to enter my credentials..):
Which worked and I could now login. The Panel opened with the following error:
I can access certain areas of the panel without error (i.e. tools and settings etc, but I get the error when I try to access the control panel for single domains etc...)
I just upgraded our Plesk 10.4.4 to 12.0.18 (on Ubuntu 10.04, about to be upgraded to 12.04). Now I get the dreaded 'queue file write error' in postfix on message delivery.
It tries to open /usr/lib/plesk-9.0/postfix-queue (which is not there) in this block in master.cf:
Code:
plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=/usr/lib/plesk-9.0/postfix-local -f ${sender} -d ${recipient} -p /var/qmail/mailnames 127.0.0.1:10025 inet n n n - - spawn user=mhandlers-user argv=/usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10027 before-queue 127.0.0.1:10026 inet n - - - - smtpd -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= -o receive_override_options=no_unknown_recipient_checks 127.0.0.1:10027 inet n n n - - spawn user=mhandlers-user argv=/usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10026 before-remote plesk_saslauthd unix y y y - 1 plesk_saslauthd status=5 listen=6 dbpath=/plesk/passwd.db
And on top of that, If disable all the milters/proxy and just try to deliver to plesk_virtual directly, the e-mail just disappears. Postfix thinks it was delivered, but it is not.
I also tried piping some text through /usr/lib/plesk-9.0/postfix-local with the same parameters postfix gives it, but also then nothing. No error, no exit code, no message in maildir.
There are a bunch of fixes around for the queue file write error, but nothing works because the nature of my problem is different. There is a KB article around for Plesk 9, which can hardly be useful.
I tried restoring postfix-queue from the backups, but if I try to use that, the mail.log eventually says:
Code:
Jan 30 01:20:00 ytechosting /usr/lib/plesk-9.0/psa-pc-remote[6621]: Message aborted.
I also used /usr/local/psa/admin/sbin/mchk to no avail: the only change it makes to my master.cf, is adding an empty line. And, I suspect it uninstalled my psa-courier, because it was gone at some point, and mchk was the only thing I did after knowing courier was still there.
How can the postfix config refer to that postfix-queue when it's not there? Is this even a valid master.cf file for Plesk 12?
Today at 12.50 pm my (ubuntu 14.04.1 LTS) server running plesk 12.0.18 suddenly stopped serving websites. Any attempts to access a webpage on any vhost returned the 502 bad gateway using Nginx error messsage.When I looked at the nginx logs, I found messages like:
Connection refused) while connecting to upstream, client: m.m.m.m, server: , request: "GET /server-status HTTP/1.0", upstream: URL....
Restarting apache & nginx (/etc/init.d/apache2 restart & /etc/init.d/nginx restart) made no difference and I had to reboot to restore http access.
Strangely if I browsed with port 7080 specified (i.e. http://n.n.n.n:7080), this worked fine for all vhosts, so apache (which I believe is listening on this port while nginx listens on port 80) is working fine - nginx is just not able to pass stuff to it?
this is a fresh Plesk 12 installation on a Dedicated Server, on Debian 6. I haven't installed a License key yet.When i tried to run MIgration Manager, the loading was taking forever. Also, when i try to enter Webserver Configurations Troubleshooter, i get 502 Bad Gateway nginx error.In the /var/log/sw-cp-server/error_log i get this error:
Code: 2015/06/17 11:42:47 [error] 3918#0: *52 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: A.B.C.D, server: , request: "GET /modules/configurations-troubleshooter/index.php/index/list HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "X.X.X.X:8443", referrer: "https://X.X.X.X:8443/admin/module/list?context=modules" When i try to insert a Plesk License, i also get this error:
Plesk 11.5.30 all latest updated installed is used with Power-User view on an Ubuntu 12.04 LTS 64 Bit system.
The Plesk Interface is working well in general. But if the customer clicks on "Webspaces" -> Add Webspace they run in a:
[URL] ....
Browser: 502 Bad Gateway nginx
To try to fix it with:
/usr/local/psa/admin/bin/nginxmng --disable /usr/local/psa/admin/sbin/httpdmng --reconfigure-all /etc/init.d/apache2 restart /etc/init.d/ngnix restart ( does not work anyway since the customer is not using it ) -> ngnix_enable=no
Which did not work ( ngnix is and was not active )
In the log /var/log/sw-cp-server/error.log
we can see:
[error] 1936#0: *180 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 84.177.142.220, server: , request: "GET /smb/account/create-subscription HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "server:8443", referrer: "https://server:8443/smb/account"
Since we switched to Plesk 12 and activated nginx the problem reoccurs reliably on every domain change. As soon as a customer creates a new domain or alias and Apache restarts nginx delivers 502 errors for maybe 10 seconds. After that everything is fine again.
The system is Debian 6.0.10 with Plesk 12.0.18 Update #38
That might not be a problem in small environments, but with >100 domains the timeout is annoying enough for customers to pick up the phone.
Adding this to /etc/sw-cp-server/config did not do the trick.
Today morning a logged in in plesk without problems and started Fail2Ban and closed it. Now I want logged in and get only 502 bad gateway. All Domains working fine and shell access working fine too.
When I turn on nginx for the server I am able to browse non SSL protected sites correctly. I receive a 502 Bad Gateway error on any sites that have an SSL certificate. Is there a fix for this? I have been unable to find one.
I have a strange issue on a Plesk 12 VPS. Sometimes the sites result in a "502 Bad Gateway (nginx)". This happens 1 or 2 times a day on different times.
In the httpd log I see a record "can't apply process slot" and in nginx log I see "connect() failed (111: Connection refused) while connecting to upstream" but restarting apache and/or nginx will not always result in a working site.
When I restart iptables everything is working fine again.
I have a Plesk host that I am tasked with upgrading. It started with openSUSE 11.4 on Plesk 10.4 and I have upgraded it all the way to openSUSE 12.2 on Plesk 11.09 (fixed minor issues with pop3d and mysql locking on the way). The next upgrade was supposed to be 11.5, but the option to upgrade it never shows up. I have re-instated our support license so I know the license is OK, and also checked that 11.5 supports openSUSE 12.2. The update log doesn't really tell me much either:
Code:
Release PLESK_12_1_18 contains no any build for this OS Release PLESK_12_1_17 contains no any build for this OS Release PLESK_12_1_16 contains no any build for this OS Release PLESK_12_1_15 contains no any build for this OS Release PLESK_12_1_14 contains no any build for this OS