skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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:

    [root@zabbix httpd]# cat /etc/httpd/conf.modules.d/00-systemd.conf
    # This file configures systemd module:
    LoadModule systemd_module modules/mod_systemd.so
    
    [root@zabbix httpd]# uname -a
    Linux zabbix 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    
    [root@zabbix httpd]# httpd -V
    Server version: Apache/2.4.6 (CentOS)
    Server built:   Jul 29 2019 17:18:49
    Server's Module Magic Number: 20120211:24
    Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
    Compiled using: APR 1.4.8, APR-UTIL 1.5.2
    Architecture:   64-bit
    Server MPM:     prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D DYNAMIC_MODULE_LIMIT=256
     -D HTTPD_ROOT="/etc/httpd"
     -D SUEXEC_BIN="/usr/sbin/suexec"
     -D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="conf/mime.types"
     -D SERVER_CONFIG_FILE="conf/httpd.conf"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search