0

I'm unable to start my previously working httpd(2.4.6) after updating my instance(CentOS 7).

I first checked the status via systemctl status httpd, which yielded:

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2018-12-05 09:05:37 CET; 6s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 8033 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 8032 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 8032 (code=exited, status=1/FAILURE)

Dec 05 09:05:37 vps systemd[1]: Starting The Apache HTTP Server...
Dec 05 09:05:37 vps systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 05 09:05:37 vps kill[8033]: kill: cannot find process ""
Dec 05 09:05:37 vps systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 05 09:05:37 vps systemd[1]: Failed to start The Apache HTTP Server.
Dec 05 09:05:37 vps systemd[1]: Unit httpd.service entered failed state.
Dec 05 09:05:37 vps systemd[1]: httpd.service failed.

Not really helpful, there isn't a specific error message to point me somewhere. Therefore I did a apachectl configtest which showed a problem with a Let's Encrypt certificate file not being where it should be or being empty. The same problem is also mentioned here.

It's weird because as in the issue I pointed to above, the certificate exists and openssl can work it.

As the suggestion from the above issue, I recursively changed the permissions of /etc/letsencrypt/archive and /etc/letsencrypt/live to 0755.

Now apachectl configtest does not complain about anything and outputs the syntax as ok.

However, my httpd still does not start with exact same systemctl message as above.

What am I missing here?

p.s. I also checked for any other httpd processes out in the system to kill them; there weren't any and nothing else is on port 80.

Update

My Apache error log:

[Sun Nov 25 03:37:10.247181 2018] [auth_digest:notice] [pid 866] AH01757: generating secret for digest authentication ...
[Sun Nov 25 03:37:10.249196 2018] [lbmethod_heartbeat:notice] [pid 866] AH02282: No slotmem from mod_heartmonitor
[Sun Nov 25 03:37:10.252624 2018] [ssl:warn] [pid 866] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Nov 25 03:37:10.257286 2018] [ssl:warn] [pid 866] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Nov 25 03:37:10.288880 2018] [mpm_prefork:notice] [pid 866] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.12 configured -- resuming normal operations
[Sun Nov 25 03:37:10.288906 2018] [core:notice] [pid 866] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Dec 02 03:46:09.992864 2018] [mpm_prefork:notice] [pid 866] AH00171: Graceful restart requested, doing restart
Can Sürmeli
  • 163
  • 1
  • 13

1 Answers1

0

I finally figured it out.

It seems there was a problem with my error/request logs I used for my available sites.

It wasn't properly guiding me there through Apache's own status messages(in reality, Apache was a bit cryptic through systemctl status httpd or journalctl -xe) but with the comments above, I was able to track it down there and once I:

  • deleted all my past log files(they were really messy),
  • properly named them in the configuration files(choose a universal naming schema and stick to it),
  • created these ones with the given names above,

Apache was able to restart.

I assume a breakout happened because when I updated my system, Apache had to restart and it read the new configuration files which were broken.

Can Sürmeli
  • 163
  • 1
  • 13