• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Error 502 Bad Gateway after upgrade to 12

EliaGa

New Pleskian
Hello,
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"

How can I solve this problem?
Thank you
 
Same error for me after upgrading to 12. Any other suggestions? The links above do not seem to be relevant to my problem.

502 Bad Gateway
nginx

2014/08/14 08:32:16 [crit] 744#0: *3 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: xx.xx.xx.xx, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "hostname:8443"
 
Same error for me after upgrading to 12.

502 Bad Gateway
nginx

however log is indicating missing file. Got stuck because SSH is down. Cannot access the server with SSH.

2014/09/16 19:13:26 [crit] 1676#0: *4 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 111.111.111.111, server: , request: "POST /login_up.php3?LoginTicket=&psa_active_lang=&psa_active_skin=&java_mode=enabled&js_mode=1.4 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:",
 
502 Bad Gateway Ngix Plesk

I've got the SSH back but still getting:

2014/09/16 21:20:21 [crit] 12460#0: *1 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "localhost:8443

and no access to the panel
 
I've got the SSH back but still getting:

2014/09/16 21:20:21 [crit] 12460#0: *1 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "localhost:8443

and no access to the panel

You could try to use the Plesk - bootstrapper, which will fix corrupt installations and configurations:

/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair

Be aware, that this path is to the latest bootstrapper, depending on your system and updates/upgrades/patches, this patch might be slightly different. If the command doesn't work for you, try "ls /usr/local/psa/bootstrapper/" to list your own most recent version of the bootstrapper.
 
You could try to use the Plesk - bootstrapper, which will fix corrupt installations and configurations:

/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair

Thanks for that. I have already did that with no luck. However I managed to fix the problem to some stage. :

  1. First Aplied solution to already provisioned containers (modified /etc/fstab) KB121714
  2. Updated Mariadb as per KB122078
  3. Then fixed MySQL Connector KB118671

I can access plesk now but it says that the The license key is invalid. In order to use Plesk, please obtain and install a new valid license key. Retrieve keys command is successful but error remains and still unable to access control panel.
 
I would not recommend mixing threads and wouldn't recommend cross-postings as well, Shantal. The 502 Bad Gateway Ngix Plesk error has nothing to do with a license key.


... but due to the case that Shantal pushed this thread up, it might be interesting for others, IF the issue/problem is still existent and if not, HOW he/she resolved the issue/problem.
 
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"

I got the exact same error after upgrading my Virtual Server from Plesk 11.5 to 12. Tried also these steps:

  1. Updated Mariadb as per KB122078
  2. Then fixed MySQL Connector KB118671

But no luck. I'm stuck with these settings:

Code:
/etc/init.d/sw-engine start
 * Starting Plesk engine pool manager sw-engine-fpm                                                                /etc/init.d/sw-engine: line 38:  5451 Aborted                 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS 2> /dev/null
                                                                                                            [fail]
 /etc/init.d/psa start
Starting psa...  * Starting Plesk engine pool manager sw-engine-fpm                                                /etc/init.d/sw-engine: line 38:  5484 Aborted                 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS 2> /dev/null
                                                                                                            [fail]
                                                                      done
Starting xinetd service...                                            done
Starting sw-cp-server service...                                      done
Starting mysql service...                                             done
Starting bind9 service...                                             done
Starting postgresql service...                                        not installed
Starting spamassassin service...                                      done
Plesk: Starting Mail Server... already started
Starting psa...  * Starting Plesk engine pool manager sw-engine-fpm                                                /etc/init.d/sw-engine: line 38:  5598 Aborted                 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS 2> /dev/null
                                                                                                            [fail]
                                                                      done

Code:
root@lvps:~# wget http://autoinstall.plesk.com/PSA_12.0.18/dist-deb-Ubuntu-10.04-x86_64/contrib/sw-mariadb-client_1.0.0-14033112_amd64.deb
--2015-02-11 13:35:11--  http://autoinstall.plesk.com/PSA_12.0.18/dist-deb-Ubuntu-10.04-x86_64/contrib/sw-mariadb-client_1.0.0-14033112_amd64.deb
Resolving autoinstall.plesk.com... 93.184.221.133
Connecting to autoinstall.plesk.com|93.184.221.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 107738 (105K) [application/x-deb]
Saving to: `sw-mariadb-client_1.0.0-14033112_amd64.deb'

100%[=========================================================================>] 107,738     --.-K/s   in 0.02s

2015-02-11 13:35:11 (6.72 MB/s) - `sw-mariadb-client_1.0.0-14033112_amd64.deb' saved [107738/107738]

root@lvps:~# dpkg -i sw-mariadb-client_1.0.0-14033112_amd64.deb

(Reading database ... 123371 files and directories currently installed.)
Preparing to replace sw-mariadb-client 1.0.0-14033112 (using sw-mariadb-client_1.0.0-14033112_amd64.deb) ...
Unpacking replacement sw-mariadb-client ...
Setting up sw-mariadb-client (1.0.0-14033112) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

root@lvps:~# dpkg -l |grep maria ii sw-mariadb-client libary
grep: ii: No such file or directory
grep: sw-mariadb-client: No such file or directory
grep: libary: No such file or directory
root@lvps:~# dpkg -l |grep maria
ii  sw-mariadb-client                 1.0.0-14033112                         Mariadb client library

root@lvps:~# /etc/init.d/sw-cp-server stop
 * Stopping sw-cp-serverd sw-cp-server                                                                      [ OK ]
root@lvps:~# /etc/init.d/sw-cp-server start
 * Starting sw-cp-serverd sw-cp-server                                                                      [ OK ]
root@lvps:~#

Code:
2015/02/11 11:53:45 [crit] 1506#0: *3 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: ip, server: , request: "POST /login_up.php3?LoginTicket=&psa_active_lang=&psa_active_skin= HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "ip:8443", referrer: "https://ip.kundenadmin.hosteurope.de:4643/vz/cp/panel/plesk/login"
2015/02/11 11:53:58 [crit] 1506#0: *3 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: ip, server: , request: "POST /login_up.php3?LoginTicket=&psa_active_lang=&psa_active_skin= HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "ip:8443", referrer: "https://ip.kundenadmin.hosteurope.de:4643/vz/cp/panel/plesk/login"
2015/02/11 11:54:12 [crit] 1506#0: *3 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: ip, server: , request: "GET /smb/web/overview/id/d%3A9 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "ip:8443"
2015/02/11 11:54:22 [crit] 1506#0: *3 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: ip, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "ip:8443"
2015/02/11 11:54:42 [crit] 1506#0: *18 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: ip, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "lvpsip.dedicated.hosteurope.de:8443"
2015/02/11 12:03:55 [error] 1506#0: *21 open() "/opt/psa/admin/htdocs/robots.txt" failed (2: No such file or directory), client: ip, server: , request: "GET /robots.txt HTTP/1.1", host: "lvpsip.dedicated.hosteurope.de:8443"
2015/02/11 12:06:25 [error] 1506#0: *23 open() "/opt/psa/admin/htdocs/robots.txt" failed (2: No such file or directory), client: ip, server: , request: "GET /robots.txt HTTP/1.1", host: "lvpsip.dedicated.hosteurope.de:8443"

Any news on how to fix this?
 
If shm is properly defined in your fstab and the error is still hapening while doing a service restart as per "service sw-engine restart" . Try just to do a "mount /dev/shm" and then again a "service sw-engine restart".
 
Back
Top