• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Issue 502 Bad Gateway

Juno

New Pleskian
I can't view or create User Accounts/User Roles. It shows 502 Bad Gateway.

Here is the log.
Code:
2017/10/05 18:39:44 [error] 2906#0: *230 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"
2017/10/05 19:04:32 [error] 2906#0: *349 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"
2017/10/05 19:04:36 [error] 2906#0: *355 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/edit/id/2 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"
2017/10/05 19:23:30 [error] 2906#0: *379 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/user/overview/id/1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/user/list"
2017/10/05 20:01:23 [error] 2906#0: *479 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"
2017/10/05 20:04:16 [error] 2906#0: *524 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"
2017/10/05 20:04:39 [error] 2906#0: *539 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"
2017/10/05 20:15:50 [error] 31816#0: *2 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.106.128.89, server: , request: "GET /smb/role/create HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "123.100.241.176:8443", referrer: "https://123.100.241.176:8443/smb/role/list"

How can I fix this issue?
 
Hi Juno,

could you pls. consider to add additional informations?
  • YOUR current used operating system
  • YOUR current used Plesk version ( incl. #MU )

Additional example commands to investigate ( possible ) issues:

CentOS/RHEL - based systems:
Code:
grep sw-engine /var/log/messages

Debian/Ubuntu - based systems:
Code:
grep sw-engine /var/log/syslog
 
Hi Juno,

could you pls. consider to add additional informations?
  • YOUR current used operating system
  • YOUR current used Plesk version ( incl. #MU )

Additional example commands to investigate ( possible ) issues:

CentOS/RHEL - based systems:
Code:
grep sw-engine /var/log/messages

Debian/Ubuntu - based systems:
Code:
grep sw-engine /var/log/syslog

Hi UFHH01,

CentOS 6.9 (Final)‬
Version 17.5.3 Update #24, last updated on Oct 3, 2017 03:44 AM

I executed the "grep sw-engine /var/log/messages" command (keyword not found, return nothing), what should I do next?
 
Last edited:
Code:
**** Product repair started.

===> Checking for previous installation ... found.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

 Trying to start service mysqld... done
 Trying to establish test connection... connected
done
 Trying to find psa database... version is 017005003
 Trying to backup MySQL database... done
 MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.17.5.3-17.5.3                                                                                                                                                             .20171006-134247.dump.gz
 Finishing up upgrade procedures and rerunning previously failed upgrade actions                                                                                                                                                             ...
 Checking for the group 'lock-manager'...
 Trying to add supplementary group 'lock-manager' for user 'psaadm'...  already                                                                                                                                                              there
===> Cumulative APS controller database (apsc) upgrade and repair has been start                                                                                                                                                             ed.
Upgrade or repair for 'apsc' (stage 'prep') is not required
 Trying to backup MySQL database... done
 MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.apsc.17.5.3-1                                                                                                                                                             7.5.3.20171006-134259.dump.gz
===> Cumulative upgrade and repair of APS controller database has been completed                                                                                                                                                             .
 Trying to reset database user password for 'apsc@'... done

WARNING!
Some problems are found during fix credentials for APS controller database(see l                                                                                                                                                             og file: /var/log/plesk/install/plesk_17.5.3_repair.log)

Continue...

===> Cumulative APS controller upgrade and repair (final stage) has been started.
Upgrade or repair for 'apsc' (stage 'post') is not required
===> Cumulative upgrade and repair of APS controller (final stage) has been completed.
 Trying to reset database user password for 'pma_SN87StJYmhGX@localhost'... done
===> Cumulative Plesk database upgrade and repair (revertable stage) has been started.
Upgrade or repair for 'core' (stage 'prep') is not required
===> Preparing Plesk database upgrade (revertable stage).
 Trying to resolve hostname 'c235ua-sg1.webvis.net' and validate its IP address... done

 Trying to set psa database version to 017005003... done
===> Cumulative upgrade and repair of Plesk database (revertable stage) has been completed.
===> Plesk database scheme upgrade has been started.
Applying migrations from: /usr/local/psa/bootstrapper/pp17.5.3-bootstrapper/migrations/
===> Plesk database scheme upgrade has been completed.
done
===> Cumulative Plesk upgrade and repair (final stage) has been started.
Upgrade or repair for 'core' (stage 'post') is not required
===> Preparing Plesk upgrade (final stage).
===> Cumulative upgrade and repair of Plesk (final stage) has been completed.
 Trying to upgrade and repair Courier-IMAP services configuration (prep stage)... Upgrade or repair for 'courier_imap' (s                                                                                                                    tage 'prep') is not required
done
 Trying to upgrade and repair Courier-IMAP services configuration (post stage)... Upgrade or repair for 'courier_imap' (s                                                                                                                    tage 'post') is not required
done
 Trying to upgrade and repair Courier-IMAP services configuration (bootstrapper-post stage)... Upgrade or repair for 'cou                                                                                                                    rier_imap' (stage 'bootstrapper-post') is not required
done
 Trying to condrestart service courier-imapd... done
 Trying to condrestart service courier-imaps... done
 Trying to condrestart service courier-pop3d... done
 Trying to condrestart service courier-pop3s... done
 Trying to upgrade and repair Roundcube webmail configuration... Upgrade or repair for 'roundcube' (stage 'files') is not                                                                                                                     required
done
Upgrade of Roundcube Web Based mail client configs and DB is not required - no previous version
 Trying to upgrade and repair Horde webmail configuration... Upgrade or repair for 'horde' (stage 'files') is not require                                                                                                                    d
done
 Trying to upgrade and repair Parallels Premium antivirus (DrWeb) service configuration (bootstrapper-prep stage)... Upgr                                                                                                                    ade or repair for 'drweb' (stage 'bootstrapper-prep') is not required
done
 Trying to upgrade and repair Parallels Premium antivirus (DrWeb) service configuration (bootstrapper-post stage)... Upgr                                                                                                                    ade or repair for 'drweb' (stage 'bootstrapper-post') is not required
done
 Trying to upgrade and repair Fail2Ban configuration (bootstrapper-prep stage)... Upgrade or repair for 'fail2ban' (stage                                                                                                                     'bootstrapper-prep') is not required
done
 Trying to upgrade and repair Fail2Ban configuration (bootstrapper-post stage)... Upgrade or repair for 'fail2ban' (stage                                                                                                                     'bootstrapper-post') is not required
done
 Trying to stop service named... done
 Trying to register service named... done
 Trying to start service named... done
 Reconfiguring mail subsystem...
 Trying to execute mail_restore to synchronize mail server settings and Plesk Database...  Reconfiguring Apache web serve                                                                                                                    r...
 Checking for the system groups and users necessary for Apache...
 Checking for the group 'apache'...
 Group 'apache' already exists

 Checking for the user 'apache'...
 User 'apache' already exists

 Checking for the group 'psaserv'...
 Group 'psaserv' already exists

 Checking for the group 'psaserv'...
 Trying to add supplementary group 'psaserv' for user 'apache'...  already there
 Checking for the group 'psacln'...
 Group 'psacln' already exists

Create PPSB support group
 Checking for the group 'psasb'...
 Group 'psasb' already exists

 Checking for the group 'psasb'...
 Trying to add supplementary group 'psasb' for user 'psaadm'...  already there
 Checking for the group 'psasb'...
 Trying to add supplementary group 'psasb' for user 'apache'...  already there

===> Installing Apache Server
 Trying to stop service httpd... done
 Copying apache files... done
===> Installing /usr/sbin/suexec replacement
 Trying to backup original /usr/sbin/suexec... done
 Trying to comment default ssl virtual host in /etc/httpd/conf.d/ssl.conf... done
 Trying to comment default ssl port in /etc/httpd/conf.d/ssl.conf... done
 Trying to configure SSL ciphers and protocols for: apache... done
 Trying to install chrooted environment...  Trying to install sftp-server binary into chroot environment... done
done
 Checking that /usr/local/psa/bin/chrootsh registered as login shell...
/usr/local/psa/bin/chrootsh already registered as a login shell

 Trying to start service httpd... done
 
Continued...

Code:
**** [webserver.apache configure] completed successfully.

 Reconfiguring ProFTPD FTP server...
===> Configuring ProFTPD server
Upgrade or repair for 'proftpd' (stage 'files') is not required
done

**** [ftp.proftpd configure] completed successfully.

 Reconfiguring AWStats web statistics...
 Trying to add header to file /etc/awstats/awstats.model.conf... file /etc/awstats/awstats.model.conf already contains re                                                                                                                    quired header

**** [awstats configure] completed successfully.

 Reconfiguring WatchDog...
 Restoring SELinux contexts...
 Trying to register service sw-cp-server... done
 Trying to register service sw-engine... done
 Trying to register service qmail... done
 Trying to register service courier-imapd... done
 Trying to register service courier-imaps... done
 Trying to register service courier-pop3d... done
 Trying to register service courier-pop3s... done
 Trying to register service drwebd... done
 Trying to register service nginx... done
 Trying to register service psa... done
 Reconfiguring SSL ciphers and protocols...
 Trying to configure SSL ciphers and protocols for: ... done
 Regenerating web servers' configuration files...
Warning: web server configuration is broken. We will try to repair it. This operation can take a lot of time, please do n                                                                                                                    ot interrupt the process.
Unable to rebuild web server configuration, possible there are broken domains
 Trying to reconfigure web-server configurations skipping broken domains...
WARNING!
Some problems are found during reconfigure web-server configurations skipping broken domains(see log file: /var/log/plesk/install/plesk_17.5.3_repair.log)

Continue...

 Cleaning active Panel sessions...

Bootstrapper repair finished.
Errors occurred while performing the following actions: fix apsc, regenerate web servers configuration files.
Check '/var/log/plesk/install/plesk_17.5.3_repair.log' and '/var/log/plesk/install/plesk_17.5.3_repair_problems.log' for details.
If you can't resolve the issue on your own, please address Parallels support.

**** Product repair completed successfully.

I still got 502 Bad Gateway after repaired.

Do you need to see any log so you can trace it?
 
Hi Juno,

as you have issues/errors/problems with the Plesk Control Panel itself, you should consider to use the Plesk Repair Utility with the example command:
Code:
plesk repair installation -y -v
Again, there will be a separate log - file for such a process, which you should find inside the log - folder "/var/log/plesk".​

Afterwards, ( if you still experience issues as described ), pls. consider to use the "debug - level" - mode for the Plesk Control Panel, in oder to get a more verbose output for the next test, to "can't view or create User Accounts/User Roles".

Pls. follow the official Plesk KB - article, to temporarily setup the "debug - level - mode" as described at:

 
Back
Top