• 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

Issue Apache restart failing

Rincewind

New Pleskian
I'm having an issue with one of my Plesk servers with apache. Its CL 6.10 & Obsidian. Occasionally when Apache is restarting, which it seems to do a lot, around every hour or so, It is failing to start again until the next restart gets sent.

I can manually recreate what I'd assume is this issue with "service httpd restart". Most of the time it works, but about 1/4 of the time it fails to start as something is is already listening on port 80. If I'm quick with running netstat when this happens, httpd is still listening on port 80 for a second or 2 after an apparent successful stop! It eventually stops and the next attempt at starting works. service httpd graceful also just turns off apache and leaves httpd listening

I've done:
  • updates,
  • plesk repair and restarted the server
  • # apachectl -t = Syntax OK
  • There are no duplicated Listen entries in .confs
  • Graceful restart is disabled and restart interval is 3600


I'll post a chunk of httpd error log, essentially you can see the restart and then nothing for some time, until I guess another restart starts Apache.


Code:
# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]



Code:
[Tue Feb 16 08:10:55 2021] [notice] caught SIGTERM, shutting down
[Tue Feb 16 08:10:55 2021] [notice] seg fault or similar nasty error detected in the parent process
[Tue Feb 16 08:54:17 2021] [notice] mod_hostinglimits: use Min UID 10000
[Tue Feb 16 08:54:17 2021] [notice] mod_hostinglimits: version 1.0-37. LVE mechanism enabled
[Tue Feb 16 08:54:17 2021] [notice] mod_hostinglimits: found apr extention version 3
[Tue Feb 16 08:54:17 2021] [notice] mod_hostinglimits: apr_lve_environment_init_group_minuid check ok
[Tue Feb 16 08:54:17 2021] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate CommonName (CN) `”cert2.bar”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate CommonName (CN) `”cert3.coop”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate CommonName (CN) `”cert4.org.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate CommonName (CN) `"cert1.co.uk"' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:18 2021] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Feb 16 08:54:18 2021] [warn] module status_module is already loaded, skipping
[Tue Feb 16 08:54:18 2021] [notice] mod_hostinglimits: use Min UID 10000
[Tue Feb 16 08:54:18 2021] [notice] mod_hostinglimits: version 1.0-37. LVE mechanism enabled
[Tue Feb 16 08:54:18 2021] [notice] mod_hostinglimits: found apr extention version 3
[Tue Feb 16 08:54:18 2021] [notice] mod_hostinglimits: apr_lve_environment_init_group_minuid check ok
[Tue Feb 16 08:54:18 2021] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 16 08:54:18 2021] [notice] Digest: done
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate CommonName (CN) `”cert2.bar”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate CommonName (CN) `”cert3.coop”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate CommonName (CN) `”cert4.org.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate CommonName (CN) `"cert1.co.uk"' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
[Tue Feb 16 08:54:19 2021] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Feb 16 08:54:19 2021] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.9 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Tue Feb 16 09:06:28 2021] [notice] caught SIGTERM, shutting down
[Tue Feb 16 09:06:28 2021] [notice] seg fault or similar nasty error detected in the parent process
[Tue Feb 16 09:06:30 2021] [notice] mod_hostinglimits: use Min UID 10000
[Tue Feb 16 09:06:30 2021] [notice] mod_hostinglimits: version 1.0-37. LVE mechanism enabled
[Tue Feb 16 09:06:30 2021] [notice] mod_hostinglimits: found apr extention version 3
[Tue Feb 16 09:06:30 2021] [notice] mod_hostinglimits: apr_lve_environment_init_group_minuid check ok
[Tue Feb 16 09:06:30 2021] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 16 09:06:31 2021] [warn] RSA server certificate wildcard CommonName (CN) `”*.cert1.co.uk”' does NOT match server name!?
 
Last edited:
do you have nginx installed?
if yes do:
Code:
# plesk sbin nginxmng -d && plesk sbin nginxmng -e


this because apache does try to bind to 80 and something is already bound to 80 (probably nginx)
in such case apache should be on 7080 and not 80
 
do you have nginx installed?
if yes do:
Code:
# plesk sbin nginxmng -d && plesk sbin nginxmng -e


this because apache does try to bind to 80 and something is already bound to 80 (probably nginx)
in such case apache should be on 7080 and not 80
Thanks, though I dont think its that as its not something else bound to port 80, it appears to be httpd already on it. If I do a netstat when this happens httpd is what is listening on port 80 for a few seconds after it should have stopped, not nginx. I guess either it's failing to stop it correctly, or its starting too early and failing when the other start is attempted.

I have a cronjob script to check if apache is up and restart if not, but thats failed on occasion and its only started when I've started apache from the CP, I need to check what the error log was saying at that time though. Oddly restarting from the CP doesn't seem to crash ever, while cmd line does, what's different?
 
Last edited:
Back
Top