• 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 NGINX 502 bad gateway after vps restart

Lakeswimmer

New Pleskian
Hello everyone,

we get 502 Bad Gateway on all domains after VPS hard restart, is there any solution ?

Plesk repair won't help

web log >> failed (13: Permission denied) while connecting to upstream nginx

As I'm new to the forum I hope to have chosen right prefix, just in case pardon in advance

Thanks

Update: I tried to switch php to nginx and I got this notification:

New configuration files for the Apache web server were not created due to the errors in configuration templates: Can not restart web server: Oct 03 11:13:27 ghisallo.info httpd[14141]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:7080 Oct 03 11:13:27 ghisallo.info httpd[14141]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:7080 Oct 03 11:13:27 ghisallo.info httpd[14141]: no listening sockets available, shutting down Oct 03 11:13:27 ghisallo.info httpd[14141]: AH00015: Unable to open logs Oct 03 11:13:27 ghisallo.info systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Oct 03 11:13:27 ghisallo.info systemd[1]: httpd.service: control process exited, code=exited status=1 Oct 03 11:13:27 ghisallo.info kill[14142]: kill: cannot find process "" Oct 03 11:13:27 ghisallo.info systemd[1]: Failed to start The Apache HTTP Server. Oct 03 11:13:27 ghisallo.info systemd[1]: Unit httpd.service entered failed state. Oct 03 11:13:27 ghisallo.info systemd[1]: httpd.service failed. . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter
 
Hi UFHH01,

thanks,

I was wrong in posting bad information, that error happens only if I try to change server run php as.
Here are the logs, I installed a new vps, installed plesk and restart, and it did it again, now it's 6-7 times, very frustrating:

2017-10-03 19:34:42 Error 208.43.68.59 [crit] 1201#0: *27 connect() to 45.76.95.245:7081 failed (13: Permission denied) while connecting to upstream nginx error
2017-10-03 19:35:23 Error 95.249.60.248 [crit] 1201#0: *1 connect() to 45.76.95.245:7081 failed (13: Permission denied) while connecting to upstream nginx error
2017-10-03 19:35:24 Error 95.249.60.248 [crit] 1201#0: *1 connect() to 45.76.95.245:7081 failed (13: Permission denied) while connecting to upstream nginx error
2017-10-03 19:35:25 Error 95.249.60.248 [crit] 1201#0: *1 connect() to 45.76.95.245:7081 failed (13: Permission denied) while connecting to upstream nginx error

502 Bad gateway

Sincerely I don't know where to look
 
As an update, if I try to change run php as then I get previous error, but only when I try to change configuration to hosting settings

New configuration files for the Apache web server were not created due to the errors in configuration templates: Can not restart web server: Oct 03 19:50:27 experiencesnetwork.management httpd[15453]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:7080 Oct 03 19:50:27 experiencesnetwork.management httpd[15453]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:7080 Oct 03 19:50:27 experiencesnetwork.management httpd[15453]: no listening sockets available, shutting down Oct 03 19:50:27 experiencesnetwork.management httpd[15453]: AH00015: Unable to open logs Oct 03 19:50:27 experiencesnetwork.management systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Oct 03 19:50:27 experiencesnetwork.management kill[15455]: kill: cannot find process "" Oct 03 19:50:27 experiencesnetwork.management systemd[1]: httpd.service: control process exited, code=exited status=1 Oct 03 19:50:27 experiencesnetwork.management systemd[1]: Failed to start The Apache HTTP Server. Oct 03 19:50:27 experiencesnetwork.management systemd[1]: Unit httpd.service entered failed state. Oct 03 19:50:27 experiencesnetwork.management systemd[1]: httpd.service failed. . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter

and cli:

Repair server-wide configuration parameters for web servers? [Y/n] y
Repairing server-wide configuration parameters for web servers .. [2017-10-03 19:53:15] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-server'] with exit code [1]
 
Hi UFHH01

tried ip reread from panel, no way, infinite loop
reboot then
from cli stuck at
IP addresses were reread from the system.

No ip banned

I'm on Centos firewall restarted, firewalld

Same situation
 
Hi Lakeswimmer,

pls. consider to disable and re-enable nginx with for example:
Code:
/usr/local/psa/admin/sbin/nginxmng -d

/usr/local/psa/admin/sbin/nginxmng -e


If this didn't already solved your described issues, you might consider to use the Plesk Repair Utility ( => Plesk Repair Utility ), with for example:
Code:
plesk repair web -y -v

plesk repair installation -y -v
or even with:
Code:
plesk repair all -y -v

... and pls. make sure, that the software on your server is up-to-date:
Code:
yum clean all

yum update

plesk installer --select-product-id plesk --select-release-current --reinstall-patch --install-component base
 
Already tried nginx disable and enable, www not reachable

web repair no way

Repairing web server configuration
Reinstalling SSL/TLS certificates ............................... [OK]
Applying the default SSL/TLS certificate to all IP addresses .... [OK]
Repairing server-wide configuration parameters for web servers .. [2017-10-03 21:18:11] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-server'] with exit code [1]
Curl failed: Timeout was reached
[FAILED]
- httpdmng failed: [2017-10-03 21:16:10] ERR [util_exec]
proc_close() failed
['/usr/local/psa/admin/bin/apache_control_adapter' '--restart'
'--restart-interval' '0' '--http-port' '7080' '--https-port'
'7081'] with exit code [255]
Curl failed: Timeout was reached
[2017-10-03 21:17:10] ERR [panel] Apache config
(15070650930.84057000) generation failed: Template_Exception:
Can not restart web server: Oct 03 21:13:24
experiencesnetwork.management httpd[5399]: (13)Permission
denied: AH00072: make_sock: could not bind to address [::]:7080
Oct 03 21:13:24 experiencesnetwork.management httpd[5399]:
(13)Permission denied: AH00072: make_sock: could not bind to
address 0.0.0.0:7080
Oct 03 21:13:24 experiencesnetwork.management httpd[5399]: no
listening sockets available, shutting down
Oct 03 21:13:24 experiencesnetwork.management httpd[5399]:
AH00015: Unable to open logs
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
httpd.service: main process exited, code=exited,
status=1/FAILURE
Oct 03 21:13:24 experiencesnetwork.management kill[5401]: kill:
cannot find process ""
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
httpd.service: control process exited, code=exited status=1
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
Failed to start The Apache HTTP Server.
Oct 03 21:13:24 experiencesnetwork.management systemd[1]: Unit
httpd.service entered failed state.
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
httpd.service failed.

file:
/usr/local/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
Curl failed: Timeout was reached
Can not restart web server: Oct 03 21:13:24
experiencesnetwork.management httpd[5399]: (13)Permission
denied: AH00072: make_sock: could not bind to address [::]:7080
Oct 03 21:13:24 experiencesnetwork.management httpd[5399]:
(13)Permission denied: AH00072: make_sock: could not bind to
address 0.0.0.0:7080
Oct 03 21:13:24 experiencesnetwork.management httpd[5399]: no
listening sockets available, shutting down
Oct 03 21:13:24 experiencesnetwork.management httpd[5399]:
AH00015: Unable to open logs
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
httpd.service: main process exited, code=exited,
status=1/FAILURE
Oct 03 21:13:24 experiencesnetwork.management kill[5401]: kill:
cannot find process ""
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
httpd.service: control process exited, code=exited status=1
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
Failed to start The Apache HTTP Server.
Oct 03 21:13:24 experiencesnetwork.management systemd[1]: Unit
httpd.service entered failed state.
Oct 03 21:13:24 experiencesnetwork.management systemd[1]:
httpd.service failed.
Updating the file of sharing passwords and permissions of users
according to actual information ................................. [OK]
Repairing web server configuration for all domains. This aspect
can be used with individual domains ("plesk repair web
example.com"), and on the server level ("plesk repair web") ..... non [2017-10-03 21:27:45] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-all'] with exit code [1]
Curl failed: Timeout was reached
[FAILED]
- httpdmng failed: Curl failed: Timeout was reached
Error occured while sending feedback. HTTP code returned: 500
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => experiencesnetwork.com,experiencesnetwork.management
)

Details: [2017-10-03 21:24:45] ERR [util_exec] proc_close()
failed ['/usr/local/psa/admin/bin/apache_control_adapter'
'--restart' '--restart-interval' '0' '--http-port' '7080'
'--https-port' '7081'] with exit code [255]
Curl failed: Timeout was reached
[2017-10-03 21:25:45] ERR [panel] Apache config
(15070655520.59671100) generation failed: Template_Exception:
Can not restart web server: Oct 03 21:21:59
experiencesnetwork.management httpd[28713]: (13)Permission
denied: AH00072: make_sock: could not bind to address [::]:7080
Oct 03 21:21:59 experiencesnetwork.management httpd[28713]:
(13)Permission denied: AH00072: make_sock: could not bind to
address 0.0.0.0:7080
Oct 03 21:21:59 experiencesnetwork.management httpd[28713]: no
listening sockets available, shutting down
Oct 03 21:21:59 experiencesnetwork.management httpd[28713]:
AH00015: Unable to open logs
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
httpd.service: main process exited, code=exited,
status=1/FAILURE
Oct 03 21:21:59 experiencesnetwork.management kill[28715]:
kill: cannot find process ""
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
httpd.service: control process exited, code=exited status=1
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
Failed to start The Apache HTTP Server.
Oct 03 21:21:59 experiencesnetwork.management systemd[1]: Unit
httpd.service entered failed state.
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
httpd.service failed.

file:
/usr/local/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
Curl failed: Timeout was reached
Can not restart web server: Oct 03 21:21:59
experiencesnetwork.management httpd[28713]: (13)Permission
denied: AH00072: make_sock: could not bind to address [::]:7080
Oct 03 21:21:59 experiencesnetwork.management httpd[28713]:
(13)Permission denied: AH00072: make_sock: could not bind to
address 0.0.0.0:7080
Oct 03 21:21:59 experiencesnetwork.management httpd[28713]: no
listening sockets available, shutting down
Oct 03 21:21:59 experiencesnetwork.management httpd[28713]:
AH00015: Unable to open logs
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
httpd.service: main process exited, code=exited,
status=1/FAILURE
Oct 03 21:21:59 experiencesnetwork.management kill[28715]:
kill: cannot find process ""
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
httpd.service: control process exited, code=exited status=1
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
Failed to start The Apache HTTP Server.
Oct 03 21:21:59 experiencesnetwork.management systemd[1]: Unit
httpd.service entered failed state.
Oct 03 21:21:59 experiencesnetwork.management systemd[1]:
httpd.service failed.

Checking the usage of PHP handlers .................................. [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

yum and plesk last step, result connection closed when calling web
 
Hi Lakeswimmer,

from cli stuck at
IP addresses were reread from the system.
You could have misconfigurations with your network - settings, your network manager, or/and with depending services and even SELinux might be the root cause of your issue. I suggest that you either ask your server provider to help you with the described issues/errors/problems, or you might consider to open a ticket at:


... so that experienced system engineers and linux administrators are able to investigate the issues/errors/problems directly on your server. :)
 
Back
Top