I’m new to apache and ssh in general so I would appreciate any help even if this is a stupid thing I’m missing.
I’m migrating a site to a new server and am setting up httpd. I’ve had to update the old httpd.conf to 2.4 standard which it seems to now be, but now when I run systemctl start httpd
it hangs for upwards of 3 minutes before returning:
Job for httpd.service failed because a fatal signal was delivered to the control process. See "systemctl status httpd.service" and "journalctl -xe" for details.
status httpd.service
returns
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Wed 2019-01-16 14:58:37 GMT; 35s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 30118 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=killed, signal=KILL)
Main PID: 30118 (code=killed, signal=KILL)
CGroup: /system.slice/httpd.service
Jan 16 14:55:37 server.miniserver.com systemd[1]: Starting The Apache HTTP Server...
Jan 16 14:57:07 server.miniserver.com systemd[1]: httpd.service start operation timed out. Terminating.
Jan 16 14:58:37 server.miniserver.com systemd[1]: httpd.service stop-final-sigterm timed out. Killing.
Jan 16 14:58:37 server.miniserver.com systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL
Jan 16 14:58:37 server.miniserver.com systemd[1]: Failed to start The Apache HTTP Server.
Jan 16 14:58:37 server.miniserver.com systemd[1]: Unit httpd.service entered failed state.
Jan 16 14:58:37 server.miniserver.com systemd[1]: httpd.service failed.
journalctl -xe
returns
Jan 16 15:13:34 server.miniserver.com systemd[1]: Cannot add dependency job for unit rpcbind.socket, ignoring: Unit not found.
Jan 16 15:13:34 server.miniserver.com systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
--
-- Unit httpd.service has begun starting up.
Jan 16 15:15:04 server.miniserver.com systemd[1]: httpd.service start operation timed out. Terminating.
Jan 16 15:16:35 server.miniserver.com systemd[1]: httpd.service stop-final-sigterm timed out. Killing.
Jan 16 15:16:35 server.miniserver.com systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL
Jan 16 15:16:35 server.miniserver.com systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
httpderror_log:
[Wed Jan 16 15:13:34.752306 2019] [auth_digest:notice] [pid 30342:tid 140325595289728] AH01757: generating secret for digest authentication ...
[Wed Jan 16 15:13:34.753268 2019] [core:warn] [pid 30342:tid 140325595289728] AH00098: pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jan 16 15:13:34.754601 2019] [mpm_event:notice] [pid 30342:tid 140325595289728] AH00489: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Jan 16 15:13:34.754626 2019] [core:notice] [pid 30342:tid 140325595289728] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
I don’t necessarily know how to parse all of it and I don’t know if anything stands out especially. What else can I do to further debug?
2
Answers
I’ve had this issue with Apache third-party modules, it’s common when they are not configured properly and causing the service to fail.
I’d create a backup of your modules and test the service with each one on it’s own.
I had this same issue on a Centos 7 VM installed on ProxMox 5.4 where the underlying server lost power. Same symptoms, no obvious errors other that a non-descriptive timeout. Prior to the power outage it worked fine.
I ended up uncommenting
#LoadModule systemd_module modules/mod_systemd.so
and httpd started up. Not sure why it worked, but it is what it is.Here is the conf file as it is now and some additional info for whoever cares: