• 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 while click on Webspaces -> Add Webspace

isp4p

Basic Pleskian
Hi,

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:
https://server:8443/smb/account/create-subscription

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"


Any idea how to fix that ?

Thank you and greetings
Oliver
 
Hello,

Please try to add following setting in your nginx.conf file

Code:
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
 
Hi,

thank you for your advice.

The ngnix deamon is not active:

/etc/init.d/nginx start
* Not starting NGINX as it is disabled in config

And its not supposed to be active, nor it was active before.

So i assume that changing in

/etc/ngnix/nginx.conf

will not do anything.


Or am i wrong ? Does the sw-cp-server require ngnix ?

Thank you !
Greetings
Oliver
 
Hello,

Can you please try this setting after enable the nginx on your server and let check if you are still facing the same issues in you Plesk panel
 
hi,

/usr/local/psa/admin/bin/nginxmng --enable
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
/etc/init.d/apache2 restart
/etc/init.d/ngnix restart
/etc/init.d/sw-cp-server restart

proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;

inserted.

Result:

502 Bad Gateway
nginx

Errorlog:

[error] 23472#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 84.177.141.63, 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"

Thank you !
Greetings
Oliver
 
hi,

if it helps:

Switching from Poweruser to Service Provider overview gives for Adding clients / Domains:

[error] 23472#0: *14 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 84.177.141.63, server: , request: "GET /admin/subscription/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "server:8443", referrer: "https://server:8443/admin/domain/list?context=domains"

with 502 ngnix.

Greetings
Oliver
 
hi,

if it helps:

Switching from Poweruser to Service Provider overview gives for Adding clients / Domains:

[error] 23472#0: *14 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 84.177.141.63, server: , request: "GET /admin/subscription/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "server:8443", referrer: "https://server:8443/admin/domain/list?context=domains"

with 502 ngnix.

Greetings
Oliver


I too have the exact same problem after upgrading from 11.0 to 11.5! Is there anything we can do?
 
Hi,

yes, with us it happen also with an update.

The very last update: Panel Version: 11.5.30 Update Nr. 18 / OS: Ubuntu 12.04.3 LTS


Brings:

[error] 23472#0: *92 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 87.148.151.45, 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"

After appport as application run several seconds on 100% CPU.

As it seems we will have to install a new server and migrate the accounts.

Its sad that it seems none of the officials cares about such problems.

Greetings
Oliver
 
I have checked all possible log files

/opt/psa/admin/logs/httpsd_access_log
Code:
ip.add.re.ss - - [16/Oct/2013:10:00:01 +0200] "GET /admin/customer/create HTTP/1.1" 502 166 "https://server:8443/admin/customer/list?context=customers" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Firefox/24.0" "-"'/admin/customer/create' '' '/opt/psa/admin/htdocs'


/var/log/sw-cp-server/error_log
Code:
2013/10/16 10:00:01 [error] 9384#0: *7 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: ip.add.re.ss, server: , request: "GET /admin/customer/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "server:8443", referrer: "https://server:8443/admin/customer/list?context=customers"


After tweaking some error_logs I got the following from:

/var/log/sw-cp-server/sw-engine.log
Code:
[16-Oct-2013 10:17:16.157200] DEBUG: pid 9927, fpm_got_signal(), line 76: received SIGCHLD
[16-Oct-2013 10:17:16.157236] DEBUG: pid 9927, fpm_children_bury(), line 254: [pool plesk] child 9979 has been killed by the process managment after 60.347944 seconds from start
[16-Oct-2013 10:17:16.157247] DEBUG: pid 9927, fpm_event_loop(), line 419: event module triggered 1 events
[16-Oct-2013 10:17:17.151602] DEBUG: pid 9927, fpm_pctl_perform_idle_server_maintenance_heartbeat(), line 489: stopping idle maintenance as no children present ...
[16-Oct-2013 10:23:06.138008] DEBUG: pid 9927, fpm_got_signal(), line 85: received SIGTERM
[16-Oct-2013 10:23:06.138039] NOTICE: pid 9927, fpm_got_signal(), line 86: Terminating ...
[16-Oct-2013 10:23:06.138046] DEBUG: pid 9927, fpm_pctl(), line 232: switching to 'terminating' state
[16-Oct-2013 10:23:06.138050] NOTICE: pid 9927, fpm_pctl_exit(), line 71: exiting, bye-bye!
[16-Oct-2013 10:23:06.217486] DEBUG: pid 10060, fpm_scoreboard_init_main(), line 40: got clock tick '100'
[16-Oct-2013 10:23:06.217951] DEBUG: pid 10060, fpm_event_init_main(), line 337: event module is epoll and 105 fds have been reserved
[16-Oct-2013 10:23:06.217996] NOTICE: pid 10060, fpm_init(), line 83: fpm is running, pid 10060
[16-Oct-2013 10:23:06.218005] DEBUG: pid 10060, main(), line 1840: Sending "1" (OK) to parent via fd=11
[16-Oct-2013 10:23:06.218016] DEBUG: pid 10060, fpm_pctl_heartbeat(), line 461: heartbeat have been set up with a timeout of 200000ms
[16-Oct-2013 10:23:06.218020] DEBUG: pid 10060, fpm_pctl_perform_idle_server_maintenance_heartbeat(), line 489: stopping idle maintenance as no children present ...
[16-Oct-2013 10:23:06.218027] DEBUG: pid 10060, fpm_event_loop(), line 366: 61264 bytes have been reserved in SHM
[16-Oct-2013 10:23:06.218031] NOTICE: pid 10060, fpm_event_loop(), line 367: ready to handle connections
[16-Oct-2013 10:23:19.264234] DEBUG: pid 10060, fpm_children_make(), line 421: [pool plesk] child 10082 started
[16-Oct-2013 10:23:19.264275] DEBUG: pid 10060, fpm_pctl_on_socket_accept(), line 556: [pool plesk] got accept without idle child available .... I forked
[16-Oct-2013 10:23:19.264280] DEBUG: pid 10060, fpm_pctl_on_socket_accept(), line 572: starting idle maintenance...
[16-Oct-2013 10:23:19.264284] DEBUG: pid 10060, fpm_event_loop(), line 419: event module triggered 1 events
[16-Oct-2013 10:23:19.579971] WARNING: pid 10060, fpm_stdio_child_said(), line 167: [B][pool plesk] child 10082 said into stderr: "sw-engine-fpm: pool plesk: relocation error: /usr/lib/odbc/libmyodbc.so: symbol my_pthread_fastmutex_init, version libmysqlclient_16 not defined in file libmysqlclient_r.so.16 with link time reference"[/B]
[16-Oct-2013 10:23:19.580018] DEBUG: pid 10060, fpm_event_loop(), line 419: event module triggered 1 events
[16-Oct-2013 10:23:19.588299] DEBUG: pid 10060, fpm_event_loop(), line 419: event module triggered 1 events
[16-Oct-2013 10:23:19.588327] DEBUG: pid 10060, fpm_event_loop(), line 419: event module triggered 1 events
[16-Oct-2013 10:23:19.588955] DEBUG: pid 10060, fpm_got_signal(), line 76: received SIGCHLD
[16-Oct-2013 10:23:19.588980] WARNING: pid 10060, fpm_children_bury(), line 252: [pool plesk] child 10082 exited with code 127 after 0.324760 seconds from start
[16-Oct-2013 10:23:19.590138] NOTICE: pid 10060, fpm_children_make(), line 421: [pool plesk] child 10084 started
[16-Oct-2013 10:23:19.590149] DEBUG: pid 10060, fpm_event_loop(), line 419: event module triggered 1 events
[16-Oct-2013 10:23:20.265162] DEBUG: pid 10060, fpm_pctl_perform_idle_server_maintenance(), line 363: [pool plesk] currently 0 active children, 1 spare children

So there seems to be a problem with libmysqlclient16...

Any help?
 
Last edited:
So I guess I found the problem. I have updated my Lucid 10.04 Ubuntu server with PHP 5.4.20 and MySQL 5.5 by using launchpad repositories which installed a new libmysqlclient18.

So after trying to install a new myodbc for my Ubuntu 10.04 (with possible support for libmysqlclient18 or so?) I gave up and tried one last thing... copying libmysqlclient_r.so.16 and libmysqlclient.so.16 from another server to the one with the problem. An guess what - it works. So the problem probably comes from libmysqlclient18?
 
Hi,

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:
https://server:8443/smb/account/create-subscription

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"


Any idea how to fix that ?

Thank you and greetings
Oliver

http://kb.parallels.com/en/118671
 
Hi,

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:
https://server:8443/smb/account/create-subscription

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"


Any idea how to fix that ?

Thank you and greetings
Oliver

http://kb.parallels.com/en/118671
 
I'm currently facing exactly the same sympthoms. However, i don't think, that they're related to the MySQL thing, since i havent found any error in sw-engine.log.
 
Back
Top