httpd.service wont start

Discussion in 'Installation/Configuration' started by Mike1980, Apr 23, 2018.

  1. Mike1980

    Mike1980 New Member

    Hi guys,

    I just got a new Centos server.
    I went thtough with this ti set it up ===> The Perfect Server – CentOS 7.4 with Apache, Postfix, Dovecot, Pure-FTPD, BIND and ISPConfig 3.1
    Testing on the way all was working fine up to the time i install ispconfig.
    After installing ispconfig i was unable to start httpd.service

    Some errors i got:


    [[email protected] ispconfig]# systemctl restart httpd.service
    Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.



    [[email protected] ispconfig]# systemctl status httpd.service
    ● 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 2018-04-23 13:37:33 +07; 1min 38s ago
    Docs: man:httpd(8)
    man:apachectl(8)
    Process: 11963 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
    Process: 11961 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 11961 (code=exited, status=1/FAILURE)


    Apr 23 13:37:33 server81531.domain.local httpd[11961]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:8081
    Apr 23 13:37:33 server81531.domain.local httpd[11961]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:8081
    Apr 23 13:37:33 server81531.domain.local httpd[11961]: no listening sockets available, shutting down
    Apr 23 13:37:33 server81531.domain.local httpd[11961]: AH00015: Unable to open logs
    Apr 23 13:37:33 server81531.domain.local systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
    Apr 23 13:37:33 server81531.domain.local kill[11963]: kill: cannot find process ""
    Apr 23 13:37:33 server81531.domain.local systemd[1]: httpd.service: control process exited, code=exited status=1
    Apr 23 13:37:33 server81531.domain.local systemd[1]: Failed to start The Apache HTTP Server.
    Apr 23 13:37:33 server81531.domain.local systemd[1]: Unit httpd.service entered failed state.
    Apr 23 13:37:33 server81531.domain.local systemd[1]: httpd.service failed.




    journalctl -xe
    -- Unit session-3326.scope has finished starting up.
    --
    -- The start-up result is done.
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Starting Session 3326 of user getmail.
    -- Subject: Unit session-3326.scope has begun start-up
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit session-3326.scope has begun starting up.
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Started Session 3327 of user root.
    -- Subject: Unit session-3327.scope has finished start-up
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit session-3327.scope has finished starting up.
    --
    -- The start-up result is done.
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Starting Session 3327 of user root.
    -- Subject: Unit session-3327.scope has begun start-up
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit session-3327.scope has begun starting up.
    Apr 23 13:40:02 server81531.domain.local CROND[12064]: (mailman) CMD (/usr/lib/mailman/cron/gate_news)
    Apr 23 13:40:02 server81531.domain.local CROND[12065]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/d
    Apr 23 13:40:02 server81531.domain.local CROND[12068]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Apr 23 13:40:02 server81531.domain.local CROND[12067]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/dat
    Apr 23 13:40:02 server81531.domain.local CROND[12066]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /dev/null)
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Removed slice User Slice of getmail.
    -- Subject: Unit user-5001.slice has finished shutting down
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit user-5001.slice has finished shutting down.
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Stopping User Slice of getmail.
    -- Subject: Unit user-5001.slice has begun shutting down
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit user-5001.slice has begun shutting down.
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Removed slice User Slice of mailman.
    -- Subject: Unit user-41.slice has finished shutting down
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit user-41.slice has finished shutting down.
    Apr 23 13:40:02 server81531.domain.local systemd[1]: Stopping User Slice of mailman.
    -- Subject: Unit user-41.slice has begun shutting down
    -- Defined-By: systemd
    -- Support:
    --
    -- Unit user-41.slice has begun shutting down.
    Apr 23 13:40:02 server81531.domain.local pure-ftpd[12163]: ([email protected]::1) [INFO] New connection from ::1
    Apr 23 13:40:02 server81531.domain.local pure-ftpd[12163]: ([email protected]::1) [INFO] Logout.
    Apr 23 13:40:02 server81531.domain.local postfix/smtpd[12165]: connect from localhost[::1]
    Apr 23 13:40:02 server81531.domain.local postfix/smtpd[12165]: warning: SASL: Connect to private/auth failed: No such file or directory
    Apr 23 13:40:02 server81531.domain.local postfix/smtpd[12165]: fatal: no SASL authentication mechanisms
    Apr 23 13:40:03 server81531.domain.local postfix/master[18476]: warning: process /usr/libexec/postfix/smtpd pid 12165 exit status 1
    Apr 23 13:40:03 server81531.domain.local postfix/master[18476]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Apr 23 13:40:33 server81531.domain.local clamd[18532]: SelfCheck: Database status OK.




    [[email protected] ~]# crontab -l
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done





    [[email protected] server]# nano /var/log/ispconfig/cron.log

    Mon Apr 23 13:05:01 +07 2018 _
    Mon Apr 23 13:05:01 +07 2018
    Mon Apr 23 13:05:01 +07 2018 finished.
    Mon Apr 23 13:05:01 +07 2018 /bin/fail2ban-client
    Mon Apr 23 13:05:01 +07 2018 /sbin/iptables
    Mon Apr 23 13:05:01 +07 2018 /sbin/ip6tables
    Mon Apr 23 13:05:01 +07 2018 which: no tw_cli in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin)
    Mon Apr 23 13:05:01 +07 2018 which: no hpacucli in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin)
    Mon Apr 23 13:05:01 +07 2018 which: no megacli in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin)
    Mon Apr 23 13:05:01 +07 2018 which: no megacli64 in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin)
    Mon Apr 23 13:05:01 +07 2018 which: no arcconf in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin)




    Can someone help me here as im stuck with this for the last 2 days!

    Thank you.
     
  2. Ghostdare

    Ghostdare Member

    I think that you have a port configuration problem. When you installed ISPConfig, you changed the port number to 8081?
     
  3. Mike1980

    Mike1980 New Member

    no. I left it to 8080
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig uses port 8080 and port 8081. Do you run any other software on port 8081?
     
  5. Ghostdare

    Ghostdare Member

    I think that on 8081 is running another app.
    Apr 23 13:37:33 server81531.domain.local httpd[11961]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:8081
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If you don't know which app it is, use the netstat command to find out:

    netstat -ntap | grep 8081
     
  7. Mike1980

    Mike1980 New Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Then it might be that you have a copy of the apps.vhost file, this can happen when you use an editor that creates copies of edited files automatically.

    Take a look in the folder /etc/httpd/conf/sites-enabled/ there should be just one symlink with '000-apps.vhost' as name and no other files with 'apps-vhost' in their name like 000-apps.vhost.bak or 000-apps.vhost~ or similar.
     
  9. Mike1980

    Mike1980 New Member

    here's what i got Till:

    [[email protected] install]# cd /etc/httpd/conf/sites-enabled/
    [[email protected] sites-enabled]# ls -al
    total 8
    drwxr-xr-x. 2 root root 4096 Apr 22 06:48 .
    drwxr-xr-x. 4 root root 4096 Apr 22 06:47 ..
    lrwxrwxrwx. 1 root root 42 Apr 22 06:47 000-apps.vhost -> /etc/httpd/conf/sites-available/apps.vhost
    lrwxrwxrwx. 1 root root 46 Apr 22 06:47 000-ispconfig.conf -> /etc/httpd/conf/sites-available/ispconfig.conf
    lrwxrwxrwx. 1 root root 47 Apr 22 06:48 000-ispconfig.vhost -> /etc/httpd/conf/sites-available/ispconfig.vhost
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, that's ok as well. Please run this command and post the result:

    grep -r -n 8081 /etc/httpd/
     
  11. Mike1980

    Mike1980 New Member

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, strange. Please post the result of:

    /etc/httpd/conf/sites-available/
     
  13. Mike1980

    Mike1980 New Member

    [[email protected] sites-enabled]# cd /etc/httpd/conf/sites-available/
    [[email protected] sites-available]# ls -al
    total 8
    drwxr-xr-x. 2 root root 4096 Apr 22 06:48 .
    drwxr-xr-x. 4 root root 4096 Apr 22 06:47 ..
    -rw-r--r--. 1 root root 0 Apr 23 14:37 apps.vhost
    -rw-r--r--. 1 root root 0 Apr 23 14:37 ispconfig.conf
    -rw-r--r--. 1 root root 0 Apr 23 14:37 ispconfig.vhost
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    That's fine too. Strange that the grep command did not find the file. I must admit that I get a bit out of ideas at the moment. Did you try to restart the whole server?
     
  15. Ghostdare

    Ghostdare Member

    You could also remove apache, reinstall it and reconfigure services of ISPConfig.
     
  16. Mike1980

    Mike1980 New Member

    Server rebooted
    http.service running fine
    Can't access the ispconfig panel (Page not found)

    Investigating............. (I'll be back soon)
     
  17. Mike1980

    Mike1980 New Member

    updated ispconfig on port 8080 and got this now:


    Restarting services ...
    Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
    PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /tmp/ispconfig3_install/install/update.php on line 574
    Update finished.
    [[email protected] install]#

    Any ideas?
     
    Last edited: Apr 23, 2018
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    The date setting does not really matter, you can fix it in the php.ini though by settings a correct time zone. Regarding apache start error, take a look in the apache error.log file.
     
  19. Mike1980

    Mike1980 New Member

    I've redone the lot again but still the same error. ;)

    error_log
    [Mon Apr 23 18:25:05.604403 2018] [core:notice] [pid 11964] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Mon Apr 23 18:25:05.605345 2018] [suexec:notice] [pid 11964] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Mon Apr 23 18:25:05.645770 2018] [alias:warn] [pid 11964] AH00671: The ScriptAlias directive in /etc/httpd/conf.d/mailman.conf at line 6 will probably never match because it overlaps an earlier ScriptAlias.
    [Mon Apr 23 18:25:05.678321 2018] [auth_digest:notice] [pid 11964] AH01757: generating secret for digest authentication ...
    [Mon Apr 23 18:25:05.679148 2018] [lbmethod_heartbeat:notice] [pid 11964] AH02282: No slotmem from mod_heartmonitor
    [Mon Apr 23 18:25:05.767505 2018] [:notice] [pid 11964] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
    [Mon Apr 23 18:25:05.767536 2018] [:notice] [pid 11964] mod_python: using mutex_directory /tmp
    [Mon Apr 23 18:25:05.790108 2018] [mpm_prefork:notice] [pid 11964] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 mod_python/3.5.0- Python/2.7.5 configured -- resuming normal operations
    [Mon Apr 23 18:25:05.790157 2018] [core:notice] [pid 11964] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Mon Apr 23 18:30:49.881331 2018] [mpm_prefork:notice] [pid 11964] AH00170: caught SIGWINCH, shutting down gracefully


    Any help is very welcome.
     
  20. Mike1980

    Mike1980 New Member

Share This Page