• 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

502 Bad Gateway in Plesk Panel

JTRipper

Regular Pleskian
Hello,

I have a problem with "502 Bad Gateway" errore when I'm trying to create a new subscription.

here my logfile:

/var/log/sw-cp-server/error_log:

2013/12/10 12:47:03 [error] 11827#0: *100 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: XX.XXX.XX.XXX, server: , request: "POST /admin/subscription/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "xxxxxxxxxxxxx.xx:8443", referrer: "https://xxxxxxxxxxxxx.xx:8443/admin/subscription/create"

OS: CentOS 6.2 (Final)
Panel version: 11.5.30 Update #26, last updated at Dec 6, 2013 03:42 AM

Where should I search for the problem ?

Thanks in advance
 

Thanks Abdi,
that helped, but now after installing the right rpm I get:

Adding Own Subscription
Error: ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found

The package is installed:

[root@host ~]# rpm -qa|grep mysql-connector-odbc
mysql-connector-odbc-5.2.6-1.el6.x86_64

here is odbcinst.ini:
[root@host ~]# cat /etc/odbcinst.ini
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1

[MySQL]
Description = MySQL driver for Plesk
Driver = /usr/lib64/libmyodbc5.so
Setup =
FileUsage = 1
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 =
UsageCount = 1

[MySQL ODBC 5.2 Unicode Driver]
Driver = /usr/lib64/libmyodbc5w.so
UsageCount = 2

[MySQL ODBC 5.2 ANSI Driver]
Driver = /usr/lib64/libmyodbc5a.so
UsageCount = 2

but the file /usr/lib64/libmyodbc5.so is not present:

[root@host ~]# ll /usr/lib64/libmyodbc5.so
ls: cannot access /usr/lib64/libmyodbc5.so: No such file or directory
[root@host ~]#

on the whole server:

[root@host ~]# locate libmyodbc5.so
[root@host ~]#
 
Last edited:
ok got it

I just changed the filename from

Driver = /usr/lib64/libmyodbc5.so
to
Driver = /usr/lib64/libmyodbc5a.so

in /etc/odbcinst.ini

and finally it runs good.
 
I have the same problem, but no solution works for me ...
I am not able to add a new subscription via Plesk. I only get Bad Request from a not installed nginx :-(


I do NOT have Nginx
I use Debian (so http://kb.parallels.com/en/118671 does not work for me)
I have the latest Update (including Micro Updates) of Plesk


Is there another thing I can do?
 
I have the same problem, but no solution works for me ...
I am not able to add a new subscription via Plesk. I only get Bad Request from a not installed nginx :-(


I do NOT have Nginx
I use Debian (so http://kb.parallels.com/en/118671 does not work for me)
I have the latest Update (including Micro Updates) of Plesk


Is there another thing I can do?

search for the odbcinst.ini file and verify that file it points to libmyodbc exists in your system
 
I had same issue - and Parallels provided this fix - that seemed to work... but when i rebooted the server it looks like the change was lost?...

To fix the issue I linked following files:

]# pwd /usr/lib64

]# ln -s /usr/lib64/libmyodbc5w.so libmyodbc5.so ]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

I hope this may help someone else - although i am waiting to see why it fixed it and then hours later broken again (likely due to my server reboot?)... always something!
Below is the other step that they did - also related to the errors reported above as somehow when i upgraded php from 5.3 to 5.4 and my sql to 5.6, i started receiving the errors being discused..:

Thank you for contacting Parallels Technical Support.
I disabled Remi repository in /etc/yum.repos.d/remi.repo and installed Atomic repositoryhttp://www.atomicorp.com/installers/atomic
I upgraded your PHP version up to 5.4.35:
# yum install php
# php -v
PHP 5.4.35 (cli) (built: Nov 17 2014 12:06:55) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.

Let us know if you have any questions or you need an additional assistance.
 
Back
Top