• 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.

Nginx 502 BAD GATEWAY

Bourgois_Christophe

Basic Pleskian
Dear Parallels team,

I'm facing a problem discussed in lot of threads but no solution works for me.

When I'm calling plesk api to create a new domain, I've got a Nginx 502 BAD GATEWAY error.

The logs indicates :
2014/12/17 18:50:25 [error] 21921#0: *5 upstream prematurely closed connection while reading response header from upstream, client: x.x.x.x, server: example.com, request: "POST /user/my_blogs HTTP/1.1", upstream: "http://x.x.x.x:7080/user/my_blogs", host: "example.com", referrer: "http://example.com/user/my_blogs"

I suppose that while nginx is loading the page from apache, plesk is restarting apache and so upstream is closed.

What is the solution to avoid this error ?

Thanks a lot
 
I also tried to change restart_apache_interval value to 30 seconds, and restart apache, but I've got the same problem after 15 seconds, so I'm not sure restart_apache_interval is used, or maybe I need to do another thing.
 
Hello,

I just worked a little more deeper on this problem, and here is what I can say.

This values are in misc table :
restart_apache_gracefully | true
restart_apache_interval | 30

But when I call plesk api to create a new domain, I still have got a Nginx 502 BAD GATEWAY error.

So I looked in the logs and here is what I have when I type:
tail -f /var/log/apache2/error.log /var/log/apache2/access.log /var/log/nginx/access.log /var/log/nginx/error.log

==> /var/log/apache2/error.log <==
[Sun Jan 04 14:20:09 2015] [notice] Graceful restart requested, doing restart
[Sun Jan 04 14:20:12 2015] [notice] Digest: generating secret for digest authentication ...
[Sun Jan 04 14:20:12 2015] [notice] Digest: done
[Sun Jan 04 14:20:12 2015] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Sun Jan 04 14:20:12 2015] [error] python_init: Python executable found '/usr/bin/python'.
[Sun Jan 04 14:20:12 2015] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Sun Jan 04 14:20:12 2015] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sun Jan 04 14:20:12 2015] [notice] mod_python: using mutex_directory /tmp
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `ns336055.ip-37-187-161.eu' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `veryriich.com' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 14:20:12 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Jan 04 14:20:12 2015] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fcgid/2.3.9 mod_python/3.3.1 Python/2.7.3 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations

What is the solution to avoid this error ?

Thanks a lot
Christophe
www.l-wa.fr
 
Hi Bourgois_Christophe,

to solve your python issue, you might use:

Example for Debian/Ubuntu:

apt-get remove libapache2-mod-python libapache2-mod-wsgi
apt-get build-dep libapache2-mod-python libapache2-mod-wsgi

The warnings about your certificates missmatch are irrelevant, but you could adjust the server certificates "commonName" - settings, if this annoys you, when creating a new certificate. The "commonName" should equal the FQDN ( Fully Qualified Domain Name - please use "hostname -f" for it ) of your server.
 
Thanks, now there is no python error but when I call plesk api to create a new domain, I still have got a Nginx 502 BAD GATEWAY error.

Here are the logs:
tail -f /var/log/apache2/error.log /var/log/apache2/access.log /var/log/nginx/access.log /var/log/nginx/error.log

[Sun Jan 04 16:35:51 2015] [notice] Graceful restart requested, doing restart
[Sun Jan 04 16:35:55 2015] [notice] Digest: generating secret for digest authentication ...
[Sun Jan 04 16:35:55 2015] [notice] Digest: done
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `ns336055.ip-37-187-161.eu' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `veryriich.com' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Jan 04 16:35:55 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Jan 04 16:35:55 2015] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fcgid/2.3.9 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 Python/2.7.3 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations
 
Hi Bourgois_Christophe,

please be aware, that the standard apache and nginx error-logs have got nothing to do with the Plesk Control Panel - logs. Plesk uses his own nginx server, independent from your webservers on your server.


Please use the correct error - logs, to point to possible issues/problems/failures.


You could as well switch to a debug log level, if the standard configuration does not show sufficient informations in the Plesk Control Panel logs:

Go to "/usr/local/psa/admin/conf/" and copy the sample "panel.ini.sample" to "panel.ini".
Afterwards, please edit the "panel.ini" to your needs.
 
Dear UFHH01, thanks for your responses.

I put the line
Code:
filter.priority = 7
in /usr/local/psa/admin/conf/panel.ini
and then I restart:
Code:
/etc/init.d/psa restart

After that I call again Api to create a new domain and get 502 nginx error

Here are the logs but I can't see any error, maybe I look in the bad log files ?:
tail -f /var/log/apache2/error.log /var/log/sw-cp-server/error_log /var/log/sw-cp-server/sw-engine.log /usr/local/psa/admin/logs/panel.log /var/log/nginx/error.log

Code:
==> /usr/local/psa/admin/logs/panel.log <==
[2015-01-05 10:24:39] DEBUG [panel] init Agent
[2015-01-05 10:24:39] DEBUG [panel] <packet>
  <site>
  <add>
  <gen_setup>
  <name>monblogtest2015-8.fr</name>
  <webspace-id>1</webspace-id>
  </gen_setup>
<hosting>
  <vrt_hst>
  <property>
  <name>seo-redirect</name>
  <value>www</value>
  </property>
  <property>
  <name>fp</name>
  <value>false</value>
  </property>
  <property>
  <name>fp_ssl</name>
  <value>false</value>
  </property>
  <property>
  <name>fp_auth</name>
  <value>false</value>
  </property>
  <property>
  <name>fp_admin_login</name>
  <value>
  </value></property>
  <property>
  <name>fp_admin_password</name>
  <value>
  </value></property>
  <property>
  <name>ssl</name>
  <value>true</value>
  </property>
  <property>
  <name>shell</name>
  <value>/bin/bash</value>
  </property>
  <property>
  <name>php</name>
  <value>true</value>
  </property>
  <property>
  <name>php_handler_id</name>
  <value>fastcgi</value>
  </property>
  <property>
  <name>ssi</name>
  <value>false</value>
  </property>
  <property>
  <name>cgi</name>
  <value>true</value>
  </property>
  <property>
  <name>perl</name>
  <value>true</value>
  </property>
  <property>
  <name>python</name>
  <value>true</value>
  </property>
  <property>
  <name>asp</name>
  <value>false</value>
  </property>
  <property>
  <name>asp_dot_net</name>
  <value>false</value>
  </property>
  <property>
  <name>miva</name>
  <value>false</value>
  </property>
  <property>
  <name>coldfusion</name>
  <value>false</value>
  </property>
  <property>
  <name>webstat</name>
  <value>awstats</value>
  </property>
  <property>
  <name>webstat_protected</name>
  <value>true</value>
  </property>
  <property>
  <name>errdocs</name>
  <value>false</value>
  </property>
  <property>
  <name>wuscripts</name>
  <value>false</value>
  </property>
  <property>
  <name>at_domains</name>
  <value>false</value>
  </property>
  <property>
  <name>fastcgi</name>
  <value>true</value>
  </property>
  <property>
  <name>cgi_mode</name>
  <value>www-root</value>
  </property>
  <property>
  <name>www_root</name>
  <value>/yamato.***.com/httpdocs</value>
  </property>
  <property>
  <name>open_basedir</name>
  <value>{WEBSPACEROOT}{/}{:}{TMP}{/}</value>
  </property>
  <property>
  <name>nginx-transparent-mode</name>
  <value>false</value>
  </property>
  <property>
  <name>nginx-serve-static</name>
  <value>false</value>
  </property>
  </vrt_hst>
  </hosting>  </add>
  </site>
</packet>
[2015-01-05 10:24:39] DEBUG [api-rpc] Incoming API-RPC request [5560a755e1cef09c0e2908d0bbe832ba]:
<packet>
  <site>
  <add>
  <gen_setup>
  <name>monblogtest2015-8.fr</name>
  <webspace-id>1</webspace-id>
  </gen_setup>
<hosting>
  <vrt_hst>
  <property>
  <name>seo-redirect</name>
  <value>www</value>
  </property>
  <property>
  <name>fp</name>
  <value>false</value>
  </property>
  <property>
  <name>fp_ssl</name>
  <value>false</value>
  </property>
  <property>
  <name>fp_auth</name>
  <value>false</value>
  </property>
  <property>
  <name>fp_admin_login</name>
  <value>
  </value></property>
  <property>
  <name>fp_admin_password</name>
  <value>
  </value></property>
  <property>
  <name>ssl</name>
  <value>true</value>
  </property>
  <property>
  <name>shell</name>
  <value>/bin/bash</value>
  </property>
  <property>
  <name>php</name>
  <value>true</value>
  </property>
  <property>
  <name>php_handler_id</name>
  <value>fastcgi</value>
  </property>
  <property>
  <name>ssi</name>
  <value>false</value>
  </property>
  <property>
  <name>cgi</name>
  <value>true</value>
  </property>
  <property>
  <name>perl</name>
  <value>true</value>
  </property>
  <property>
  <name>python</name>
  <value>true</value>
  </property>
  <property>
  <name>asp</name>
  <value>false</value>
  </property>
  <property>
  <name>asp_dot_net</name>
  <value>false</value>
  </property>
  <property>
  <name>miva</name>
  <value>false</value>
  </property>
  <property>
  <name>coldfusion</name>
  <value>false</value>
  </property>
  <property>
  <name>webstat</name>
  <value>awstats</value>
  </property>
  <property>
  <name>webstat_protected</name>
  <value>true</value>
  </property>
  <property>
  <name>errdocs</name>
  <value>false</value>
  </property>
  <property>
  <name>wuscripts</name>
  <value>false</value>
  </property>
  <property>
  <name>at_domains</name>
  <value>false</value>
  </property>
  <property>
  <name>fastcgi</name>
  <value>true</value>
  </property>
  <property>
  <name>cgi_mode</name>
  <value>www-root</value>
  </property>
  <property>
  <name>www_root</name>
  <value>/yamato.***.com/httpdocs</value>
  </property>
  <property>
  <name>open_basedir</name>
  <value>{WEBSPACEROOT}{/}{:}{TMP}{/}</value>
  </property>
  <property>
  <name>nginx-transparent-mode</name>
  <value>false</value>
  </property>
  <property>
  <name>nginx-serve-static</name>
  <value>false</value>
  </property>
  </vrt_hst>
  </hosting>  </add>
  </site>
</packet>
 
Here are the end of the logs :
Code:
[2015-01-05 10:24:39] DEBUG [panel] Protocol version: 1.6.6.0
[2015-01-05 10:24:39] DEBUG [util_exec] [dfe399c54f930fde9d425c255ef56c97][0] Starting: packagemng --list
[2015-01-05 10:24:39] DEBUG [util_exec] [dfe399c54f930fde9d425c255ef56c97][0] Finished in 0.22206s, Error code: 0
...
[2015-01-05 10:24:40] DEBUG [util_exec] [9e0cc505d8e8a7e41d02073b33299602][0] Starting: sysinfo getshell
[2015-01-05 10:24:40] DEBUG [util_exec] [9e0cc505d8e8a7e41d02073b33299602][0] Finished in 0.00447s, Error code: 0
[2015-01-05 10:24:40] DEBUG [util_exec] [7117ed658f4d7b6816ed5bbbaee6670d][0] Starting: usermng --isquotable-quiet
[2015-01-05 10:24:40] DEBUG [util_exec] [7117ed658f4d7b6816ed5bbbaee6670d][0] Finished in 0.00438s, Error code: 0
[2015-01-05 10:24:40] DEBUG [panel] run operator
[2015-01-05 10:24:43] DEBUG [panel] Try to create DSMail...
[2015-01-05 10:24:43] DEBUG [panel] Params: Service_Mail_Parameters Object
(
  [status] => 1
  [ipIds] => Array
  (
  [0] => 1
  [1] => 2
  )
  [domainKeys] => 1
  [greyListing] => 1
  [mailProvider] => Service_Mail_Provider Object
  (
  [type] => local
  [uid] => local
  [displayName] => local #local
  [instanceId] =>
  [_isIpsRequired:protected] =>
  [_isPleskServiceNodeRequired:protected] =>
  [_packageMetainfo:protected] =>
  [_rootServiceSettingsNames:protected] =>
  )
  [catchTo] =>
  [catchIp] =>
  [catchMode] => catch_addr
  [nonexist] => reject
  [bounceMessage] => This address no longer accepts mail.
  [additionalDomains] => Array
  (
  )
  [domainEmails] => Array
  (
  [1] => valerie@***.com
  [2] => hanna@***.com
  [3] => david@***.com
  [4] => christophe@***.com
  )
)
[2015-01-05 10:24:43] DEBUG [util_exec] [d78a602479e7ba5eaa7230a9fd2dabeb][0] Starting: mailmng-core --add-domain --domain-name=monblogtest2015-8.fr --disk-quota=-1
[2015-01-05 10:24:43] DEBUG [util_exec] [d78a602479e7ba5eaa7230a9fd2dabeb][0] Finished in 0.18506s, Error code: 0
...
[2015-01-05 10:24:46] DEBUG [util_exec] [77980748a20375a9f915cc319a5d09bf][0] Starting: filemng root file_exists /var/www/vhosts/***.com/yamato.***.com/httpdocs/cgi-bin --allow-root
[2015-01-05 10:24:46] DEBUG [util_exec] [77980748a20375a9f915cc319a5d09bf][0] Finished in 0.00557s, Error code: 0
[2015-01-05 10:24:46] DEBUG [panel] Writing configuration for PHP settings for monblogtest2015-8.fr
[2015-01-05 10:24:46] DEBUG [panel] Run phpiniconfig utility for monblogtest2015-8.fr
[2015-01-05 10:24:46] DEBUG [util_exec] [42e69e007c0d3729aa5cdac0f03b3118][0] Starting: phpinimng --virtual-host monblogtest2015-8.fr --override /var/www/vhosts/system/monblogtest2015-8.fr/conf/php.ini --type cgi --global-config /etc/php5/cgi/php.ini
[2015-01-05 10:24:46] DEBUG [util_exec] [42e69e007c0d3729aa5cdac0f03b3118][0] Finished in 0.03774s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [7a6213c8dfb7f1537814f0b7164c3bc8][0] Starting: logrot_mng monblogtest2015-8.fr on by_size 209715200 1 true
[2015-01-05 10:24:47] DEBUG [util_exec] [7a6213c8dfb7f1537814f0b7164c3bc8][0] Finished in 0.02043s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [aec0b26955d7ecba9a90cf4e6c7dba22][0] Starting: proftpd-config -w /etc/proftpd.d/50-plesk.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [aec0b26955d7ecba9a90cf4e6c7dba22][0] Finished in 0.01009s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [62c98a00335bead9db2d2a94060602b6][0] Starting: pdmng --add-protection --directory=/httpdocs/plesk-stat --vhost-name=monblogtest2015-8.fr
[2015-01-05 10:24:47] DEBUG [util_exec] [62c98a00335bead9db2d2a94060602b6][0] Finished in 0.0053s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [fb19c706da2bebc1293872fb9ab7bdd1][0] Starting: filemng root mkdir -m0755 /var/www/vhosts/system/monblogtest2015-8.fr/statistics -p --allow-root
[2015-01-05 10:24:47] DEBUG [util_exec] [fb19c706da2bebc1293872fb9ab7bdd1][0] Finished in 0.00645s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [8c1f07ea09cf92e9e3141b5423f8901c][0] Starting: websrvmng --remove-configs=apache ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_httpd_ip_default.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [8c1f07ea09cf92e9e3141b5423f8901c][0] Finished in 0.00458s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [42babc5f400a821bffbca3e01aa10210][0] Starting: websrvmng --remove-configs=nginx ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_nginx_ip_default.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [42babc5f400a821bffbca3e01aa10210][0] Finished in 0.00459s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [80b473ab60b0370a9f9de7ccf0d80b9e][0] Starting: pdmng --add-user --directory=/httpdocs/plesk-stat --vhost-name=monblogtest2015-8.fr --user-name=vtinebra
[2015-01-05 10:24:47] DEBUG [util_exec] [80b473ab60b0370a9f9de7ccf0d80b9e][0] Finished in 0.00576s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [4a63d59819a222f2e05b4bb090cb3510][0] Starting: websrvmng --remove-configs=apache ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_httpd_ip_default.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [4a63d59819a222f2e05b4bb090cb3510][0] Finished in 0.00445s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [fa0dff69f68c69c94d2a5055d55b370c][0] Starting: websrvmng --remove-configs=nginx ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_nginx_ip_default.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [fa0dff69f68c69c94d2a5055d55b370c][0] Finished in 0.00431s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [69b49333b8899dba4e933f4e9068a8e9][0] Starting: websrvmng --remove-configs=apache ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_httpd_ip_default.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [69b49333b8899dba4e933f4e9068a8e9][0] Finished in 0.00467s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [6e50cf675bf4a9a1ef7627b9a8d0af2c][0] Starting: websrvmng --remove-configs=nginx ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_nginx_ip_default.conf
[2015-01-05 10:24:47] DEBUG [util_exec] [6e50cf675bf4a9a1ef7627b9a8d0af2c][0] Finished in 0.00436s, Error code: 0
[2015-01-05 10:24:47] DEBUG [util_exec] [64475975b218ded648109d4ce727fb42][0] Starting: logrot_mng monblogtest2015-8.fr on by_size 5242880  true
[2015-01-05 10:24:47] DEBUG [util_exec] [64475975b218ded648109d4ce727fb42][0] Finished in 0.01766s, Error code: 0
[2015-01-05 10:24:47] DEBUG [panel] Smb_Plesk_Bridge_Domain::savePhpSettings notifies webservice about changes in PHP settings
[2015-01-05 10:24:47] DEBUG [panel] Smb_Plesk_Bridge_Domain::saveWebServerSettings notifies webservice about changes in web server settings
[2015-01-05 10:24:48] DEBUG [util_exec] [a11b4d64dc3324a60080af3f39d51619][0] Starting: filemng psaadm file_exists /var/www/vhosts/***.com/yamato.***.com/httpdocs
[2015-01-05 10:24:48] DEBUG [util_exec] [a11b4d64dc3324a60080af3f39d51619][0] Finished in 0.0056s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [3888e6e75203d325362f2e9856be2825][0] Starting: webstatmng --set-configs --domain-name=monblogtest2015-8.fr --stat-prog=awstats
[2015-01-05 10:24:48] DEBUG [util_exec] [3888e6e75203d325362f2e9856be2825][0] Finished in 0.11s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [33f93959f37631a03b26a6f8624c9a77][0] Starting: filemng root file_exists /var/www/vhosts/***.com/yamato.***.com/httpdocs/cgi-bin --allow-root
[2015-01-05 10:24:48] DEBUG [util_exec] [33f93959f37631a03b26a6f8624c9a77][0] Finished in 0.00564s, Error code: 0
[2015-01-05 10:24:48] DEBUG [panel] Writing configuration for PHP settings for monblogtest2015-8.fr
[2015-01-05 10:24:48] DEBUG [panel] Run phpiniconfig utility for monblogtest2015-8.fr
 
Again...
Code:
[2015-01-05 10:24:48] DEBUG [util_exec] [6f22767769917d3b8b54d74b6ef981b5][0] Starting: phpinimng --virtual-host monblogtest2015-8.fr --override /var/www/vhosts/system/monblogtest2015-8.fr/conf/php.ini --type cgi --global-config /etc/php5/cgi/php.ini
[2015-01-05 10:24:48] DEBUG [util_exec] [6f22767769917d3b8b54d74b6ef981b5][0] Finished in 0.03782s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [70cb408a4c258f42ffb96d20664b26e0][0] Starting: proftpd-config -w /etc/proftpd.d/50-plesk.conf
[2015-01-05 10:24:48] DEBUG [util_exec] [70cb408a4c258f42ffb96d20664b26e0][0] Finished in 0.01052s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [509253afa2ab6df2165d47166897bce3][0] Starting: pdmng --remove-user --directory=/httpdocs/plesk-stat --vhost-name=monblogtest2015-8.fr --user-name=vtinebra
[2015-01-05 10:24:48] DEBUG [util_exec] [509253afa2ab6df2165d47166897bce3][0] Finished in 0.00538s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [d6b3a4a69f74b06b616d87ca7680377d][0] Starting: pdmng --add-user --directory=/httpdocs/plesk-stat --vhost-name=monblogtest2015-8.fr --user-name=vtinebra
[2015-01-05 10:24:48] DEBUG [util_exec] [d6b3a4a69f74b06b616d87ca7680377d][0] Finished in 0.00567s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [7512093ef33f6ab29ccf1a2cc64bb04b][0] Starting: websrvmng --remove-configs=apache ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_httpd_ip_default.conf
[2015-01-05 10:24:48] DEBUG [util_exec] [7512093ef33f6ab29ccf1a2cc64bb04b][0] Finished in 0.00457s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [160ba4f1bc3019817f8414ee431c905b][0] Starting: websrvmng --remove-configs=apache webmails/horde/monblogtest2015-8.fr_webmail.conf webmails/atmail/monblogtest2015-8.fr_webmail.conf webmails/roundcube/monblogtest2015-8.fr_webmail.conf
[2015-01-05 10:24:48] DEBUG [util_exec] [160ba4f1bc3019817f8414ee431c905b][0] Finished in 0.00451s, Error code: 0
[2015-01-05 10:24:48] DEBUG [util_exec] [cf06826021ce3dfd6db62e8fe1bd5803][0] Starting: websrvmng --remove-configs=nginx ip_default/monblogtest2015-8.fr.conf ip_default/monblogtest2015-8.fr_nginx_ip_default.conf
[2015-01-05 10:24:48] DEBUG [util_exec] [cf06826021ce3dfd6db62e8fe1bd5803][0] Finished in 0.00442s, Error code: 0
[2015-01-05 10:24:48] DEBUG [api-rpc] API-RPC response [5560a755e1cef09c0e2908d0bbe832ba]:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.6.0">
  <site>
  <add>
  <result>
  <status>ok</status>
  <id>59</id>
  <guid>13de28a8-ca28-494d-8361-4add09d67e7c</guid>
  </result>
  </add>
  </site>
</packet>
[2015-01-05 10:24:48] DEBUG [panel] finish()
[2015-01-05 10:24:52] DEBUG [util_exec] [54aa586447697] Starting: dnsmng /opt/psa/admin/bin/dnsmng '--update' 'monblogtest2015-8.fr' '--without-reverse'
[2015-01-05 10:24:52] DEBUG [util_exec] [54aa586447697] Finished in 0.03986s, Result: TRUE
[2015-01-05 10:24:52] DEBUG [util_exec] [54aa58645144e] Starting: dnsmng /opt/psa/admin/bin/dnsmng '--update' 'monblogtest2015-8.fr'
[2015-01-05 10:24:52] DEBUG [util_exec] [54aa58645144e] Finished in 0.06982s, Result: TRUE
[2015-01-05 10:24:52] DEBUG [util_exec] [e72de5e15e2beb2531dc2de93675ace4][0] Starting: glmng --enable-greylisting
[2015-01-05 10:24:52] DEBUG [util_exec] [e72de5e15e2beb2531dc2de93675ace4][0] Finished in 0.00612s, Error code: 0
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][0] Starting: apache-config -w /var/www/vhosts/system/monblogtest2015-8.fr/conf/httpd.conf
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][0] Finished in 0.01168s, Error code: 0
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][1] Starting: apache-config -l /var/www/vhosts/system/monblogtest2015-8.fr/conf/httpd.conf:/etc/apache2/plesk.conf.d/vhosts/monblogtest2015-8.fr.conf
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][1] Finished in 0.01173s, Error code: 0
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][2] Starting: apache-config -w /etc/apache2/conf.d/zz010_psa_httpd.conf
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][2] Finished in 0.01152s, Error code: 0
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][3] Starting: apache-config -t
[2015-01-05 10:24:52] DEBUG [util_exec] [4ae29964082ff7591927cab16629a7ef][3] Finished in 0.17026s, Error code: 0
[2015-01-05 10:24:52] DEBUG [util_exec] [36d87463dc3a0c67f5edd61b6e06216b][0] Starting: apache_control_adapter --restart --restart-interval 30 --http-port 7080 --https-port 7081 --graceful
==> /var/log/apache2/error.log <==
[Mon Jan 05 10:24:53 2015] [notice] Graceful restart requested, doing restart
==> /usr/local/psa/admin/logs/panel.log <==
[2015-01-05 10:24:53] DEBUG [util_exec] [36d87463dc3a0c67f5edd61b6e06216b][0] Finished in 0.53424s, Error code: 0
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][0] Starting: nginx-config -w /var/www/vhosts/system/monblogtest2015-8.fr/conf/nginx.conf
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][0] Finished in 0.01246s, Error code: 0
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][1] Starting: nginx-config -l /var/www/vhosts/system/monblogtest2015-8.fr/conf/nginx.conf:/etc/nginx/plesk.conf.d/vhosts/monblogtest2015-8.fr.conf
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][1] Finished in 0.01267s, Error code: 0
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][2] Starting: nginx-config -w /etc/nginx/conf.d/zz010_psa_nginx.conf
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][2] Finished in 0.01253s, Error code: 0
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][3] Starting: nginx-config -t
[2015-01-05 10:24:53] DEBUG [util_exec] [6c8c9a976541a9a192e51ba054e1f089][3] Finished in 0.06176s, Error code: 0
[2015-01-05 10:24:53] DEBUG [util_exec] [6bbac2acc735d23ee1276a145e737ac8][0] Starting: nginx_control --reload
[2015-01-05 10:24:53] DEBUG [util_exec] [6bbac2acc735d23ee1276a145e737ac8][0] Finished in 0.06395s, Error code: 0
==> /var/log/apache2/error.log <==
[Mon Jan 05 10:24:57 2015] [notice] Digest: generating secret for digest authentication ...
[Mon Jan 05 10:24:57 2015] [notice] Digest: done
[Mon Jan 05 10:24:57 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Jan 05 10:24:57 2015] [warn] RSA server certificate CommonName (CN) `ns336055.ip-37-187-161.eu' does NOT match server name!?
...
[Mon Jan 05 10:24:57 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Mon Jan 05 10:24:57 2015] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fcgid/2.3.9 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 Python/2.7.3 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations
 
Hi Bourgois_Christophe,

we are getting closer... ^^

If you open the domain "monblogtest2015-8.fr" with your internet browser, you get the error 502 - correct? Your former description was pointing to a Plesk Control Panel issue and not to a domain specific issue.

Your domain specific logs for "monblogtest2015-8.fr" are located at: /var/www/vhosts/system/monblogtest2015-8.fr/logs/*.
Please make sure, that if you use apache and FastCGI, to restart php5-fpm as well in order to read the new FastCGI - configuration for this domain as well and to be sure, that the domain specific socket is created. ( service php5-fpm restart ).
If you use nginx as well, your domain specific webserver settings might need additional rewrite rules, depending on your domain content, because nginx can't read rewrite rules from apache - htaccess - files.
 
Dear UFHH01, thanks a lot for your replies !

I did the mysql configuration adjustments because it's good for velocity, but it changes nothing.

My problem is not that I receive an empty reply from server, related to mysqld.

My problem is that:
  • my page send an xml packet to create the domain on plesk server,
  • the domain is really created on parallels plesk panel,
  • but on client side, I don't receive xml packet to know the result of the request, instead of that I get the 502 nginx error.
 
Do you have an idea on how to debug more deeper this problem ?
The only error I can see is on my web client : 502 nginx, I see no error on the server...
 
Hi Bourgois_Christophe,

I would increase the "max_execution_time", "max_input_time" in your PHP.ini's, to see if this is the cause. I would suggest a maximum setting of 600 seconds.
 
Thanks for this informations, on /usr/local/psa/admin/conf/php.ini it's already set to 600 seconds.
I set this in /etc/php5/apache2/php.ini and also display_errors to On to have more informations.

I still have the errors but looking forward the log I founded two intersting lines:
Code:
==> /var/www/vhosts/system/yamato.xxx.com/logs/error_log <==
[Wed Jan 07 04:26:41 2015] [emerg] [client 106.208.6.132] (22)Invalid argument: mod_fcgid: can't lock process table in pid 20735, referer: http://yamato.xxx.com/user/my_blogs

==> /var/www/vhosts/system/yamato.xxx.com/logs/proxy_error_log <==
2015/01/07 04:26:41 [error] 418#0: *20937 upstream prematurely closed connection while reading response header from upstream, client: 106.208.6.132, server: yamato.xxx.com, request: "POST /user/my_blogs HTTP/1.1", upstream: "http://37.187.161.189:7080/user/my_blogs", host: "yamato.xxx.com", referrer: "http://yamato.xxx.com/user/my_blogs"
 
Back
Top