skip to Main Content

Yesterday my WordPress sites went offline showing the error ERR_CONNECTION_REFUSED. Today i discovered Apache is turned off in my VPS. Starting Apache, my Control panel returns:

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
 httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2019-12-23 17:05:28 UTC; 7min ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 7728 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 7727 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 7727 (code=exited, status=1/FAILURE)

Dec 23 17:05:27 site.com systemd[1]: Starting The Apache HTTP Server...
Dec 23 17:05:28 site.com httpd[7727]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443 (hidden ip)
Dec 23 17:05:28 site.com httpd[7727]: no listening sockets available, shutting down
Dec 23 17:05:28 site.com httpd[7727]: AH00015: Unable to open logs
Dec 23 17:05:28 site.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 23 17:05:28 site.com kill[7728]: kill: cannot find process ""
Dec 23 17:05:28 site.com systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 23 17:05:28 site.com systemd[1]: Failed to start The Apache HTTP Server.
Dec 23 17:05:28 site.com systemd[1]: Unit httpd.service entered failed state.
Dec 23 17:05:28 site.com systemd[1]: httpd.service failed.

I tried to discover what services are running on port, to kill them, but ports 80 and 443 are not being used.

By specifically querying these ports, they return:

80/tcp closed http
443/tcp closed https

Even with doors closed, error occurs when trying to start apache service. I searched Stack Overflow answers, tried all of answer methods on these question, but nothing solved the problem.

I’m using updated Webmin on CentOS 7.7.1908

2

Answers


  1. Execute the following command to check if port 443 is used by another service:

    netstat -tunlp | grep 443
    

    If there is no output, make sure that the Listen 443 directive is not set multiple times in the Apache virtual host directories of your domains.

    Login or Signup to reply.
  2. I had exactly the same issue and I opened this file:

    /etc/httpd/conf.d/ssl.conf

    and saw these 2 lines:

    Listen 443 https
    Listen MY_IP:443
    

    I just commented the first line, like this:

    # Listen 443 https
    Listen MY_IP:443
    

    and everything went to normal. I was able to start the httpd service.

    systemctl start httpd.service

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search