The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

httpd has failed, please contact the sysadmin

Discussion in 'General Discussion' started by M1th, Feb 17, 2005.

  1. M1th

    M1th Registered

    Joined:
    Jul 7, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    When trying to restart apache via WHM i get this:



    Waiting for httpd to restart.... . . . . . . . . . . finished.

    httpd status

    root 21947 0.0 0.0 5168 784 pts/0 T Feb17 0:00 pico -w -z /usr/local/apache/conf/httpd.conf
    root 20880 1.1 0.5 12904 11508 ? S 03:17 0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./reshttpd
    root 20894 0.8 0.2 27848 5224 ? S 03:17 0:00 /usr/local/apache/bin/httpd -DSSL



    httpd has failed, please contact the sysadmin.


    -------------

    And
    service httpd configtest gives
    Syntax OK


    I cant quite figure out whats wrong. Any help is much appreciated.


    EDIT:

    Along with that I also get this every 8 mins in my email:

    apache failed @ Fri Feb 18 03:15:39 2005. A restart was attempted automagicly.
     
    #1 M1th, Feb 17, 2005
    Last edited: Feb 17, 2005
  2. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    log into root and try this

    /etc/rc.d/init.d/httpd restart
     
  3. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    if that fails take a look at the error logs files,

    tail -n 200 /usr/local/apache/logs/error_log | more


    it should give you some info
     
  4. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    The very first thing to do would be to use the search feature. Your very first post here was one that has been answered a bazillion times. ;)
     
  5. M1th

    M1th Registered

    Joined:
    Jul 7, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    casey, believe me, I did search but nothing that actually helped me came up. :/

    gorilla, restarted just fine without any errors.

    xerophyte, The only warn I get when I tail is:

    [Fri Feb 18 15:33:19 2005] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
     
    #5 M1th, Feb 18, 2005
    Last edited: Feb 18, 2005
  6. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Did you upgrade Apache via the prompt before killing it?
     
  7. M1th

    M1th Registered

    Joined:
    Jul 7, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Nope, but I managed to get it fixed.

    There was an issue with apache not listening to localhost which resulted in the failure emails.

    I added

    Listen 127.0.0.1:80

    to apache httpd.conf file.


    worked like a charm. :)
     
  8. Secret Agent

    Secret Agent Guest

    I'm getting this error and cannot seem to fix it. I tried /scripts/easyapche, httpd stop, start.

    tail -n 200 /usr/local/apache/logs/error_log | more


    Code:
    [Sun Apr 17 12:59:11 2005] [crit] (98)Address already in use: make_sock: could not bind to port 443
    [Sun Apr 17 12:59:33 2005] [crit] (98)Address already in use: make_sock: could not bind to port 443
    [Sun Apr 17 12:59:52 2005] [crit] (98)Address already in use: make_sock: could not bind to port 443
    

    root@server [/scripts]# service httpd restart
    /etc/init.d/httpd restart: httpd not running, trying to start
    /etc/init.d/httpd restart: httpd started


    root@server [/scripts]# httpd configtest
    Syntax OK


    WHM httpd restart shows:
    httpd: [ != HTTP/1..]
    httpd has failed, please contact the sysadmin.


    I also ran /scripts/rebuildhttpdconf

    root@server [/scripts]# netstat -anp | grep 443
    tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 17215/httpd


    Still down. Any ideas? I even deleted the 2GB domain log as well.
     
    #8 Secret Agent, Apr 17, 2005
    Last edited by a moderator: Apr 17, 2005
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The problem seems apparent from the error you posted:
    Use netstat to find out what is bound to the port.
     
  10. acewebi

    acewebi Registered

    Joined:
    Mar 6, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, Texas
    It turns out it was a hack attempt :(

    I had the same problem, and I got it resolved by rebuilding apache using easy apache and install mod_security to prevent further hack attempts.

    The good part was that the hacker did not manage to compromise my server, instead he/she just bombarded apache and brought it down.

    You might also want to check and make sure that your /tmp is noexec and fully secured. If its not, then check for perl scripts with that dir.

    Code:
    cd /tmp
    
    Code:
    ls -lg *.pl
     
Loading...

Share This Page