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.

Apache crash every 10-12 hours

Discussion in 'EasyApache' started by cosmin, Jan 9, 2004.

  1. cosmin

    cosmin Well-Known Member

    Joined:
    Feb 6, 2002
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucuresti
    Apache crash every 10-12 hours for 30-60 minutes. When I do a restart from WHM I receive that:
    Jan 4 16:24:34 rodedicated05 httpd: /etc/rc3.d/S85httpd: line 192: 2692 Terminated $HTTPD -DSSL Jan 4 16:24:34 rodedicated05 httpd: /etc/rc3.d/S85httpd start: httpd could not be started Jan 4 16:24:34 rodedicated05 rc: Starting httpd: failed Jan 4 17:04:06 rodedicated05 httpd: /etc/rc3.d/S85httpd: line 192: 2688 Terminated $HTTPD -DSSL Jan 4 17:04:06 rodedicated05 httpd: /etc/rc3.d/S85httpd start: httpd could not be started Jan 4 17:04:06 rodedicated05 rc: Starting httpd: failed Jan 4 20:48:05 rodedicated05 httpd: /etc/rc3.d/S85httpd: line 192: 1595 Terminated $HTTPD -DSSL Jan 4 20:48:05 rodedicated05 httpd: /etc/rc3.d/S85httpd start: httpd could not be started Jan 4 20:48:05 rodedicated05 rc: Starting httpd: failed Can't connect at /scripts/restartsrv line 242, line 35776.

    After 30-40 restarts Apahe is up...

    From were this stupid problem?
    Thanks!!!
     
  2. 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
    Do you know what time it crashed? If so, check your error logs around that time.
    /usr/local/apache/logs/error_log
     
  3. cosmin

    cosmin Well-Known Member

    Joined:
    Feb 6, 2002
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucuresti
    in error_log just stupid errors like error 401 /home/user/public_html/some.php not found etc etc

    So, nothing interesting....
     
  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
    Hmmm. What about
    /var/log/messages?
     
  5. cosmin

    cosmin Well-Known Member

    Joined:
    Feb 6, 2002
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucuresti
    Very much

    stunnel[2844]: whmhttps connected from myip:3820 and 3821/2/4 etc

    stunnel[2844]: Connection closed: 6289 bytes sent to SSL, 338 bytes sent to socket


    ???
     
  6. DCM

    DCM Member

    Joined:
    Dec 14, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    This has started happening to me now also. Looks like every 8 - 12 hours or so the server just shuts down and is unreachable. Nothing showing up in the error logs, no processes seem to be doing anything wild. This server is in a fairly safe enviroment as everybody on it is a friend or has been with me a long time.

    Pretty agrevating.

    DC
     
  7. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    I have similar problem, but it's happening more often. I checked the ssl_engine_log and found the following.

    [17/Jan/2004 12:00:00 17044] [error] Cannot open SSLSessionCache DBM file `/usr/local/apache/logs/ssl_scache' for status retrival (System error follows)
    [17/Jan/2004 12:00:00 17044] [error] System: No such file or directory (errno: 2)


    Maybe there was a problem with buildapache last time round and this file didn't get done?

    Anyone else have ideas on the frequest Apache crashes?

    Thanks,
    Chuck
     
  8. brumie

    brumie Active Member

    Joined:
    Dec 9, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Apache self termination

    looks like i'm not alone
    been this week i got apache failed warning once a day

    so i monitor error log with:
    tail -f /etc/httpd/logs/error_log
    caught this log when apache down:

    [Tue Jan 20 00:41:15 2004] [notice] caught SIGTERM, shutting down
    [Tue Jan 20 00:42:42 2004] [warn] NameVirtualHost xx.xx.xx.xxx:80 has no VirtualHosts
    [Tue Jan 20 00:42:42 2004] [warn] NameVirtualHost xx.xx.xx.xxx:80 has no VirtualHosts
    [Tue Jan 20 00:42:42 2004] [warn] NameVirtualHost xx.xx.xx.xxx:80 has no VirtualHosts
    [Tue Jan 20 00:42:42 2004] [warn] NameVirtualHost xx.xx.xx.xxx:80 has no VirtualHosts
    [Tue Jan 20 00:42:42 2004] [crit] (98)Address already in use: make_sock: could not bind to port 443
    [Tue Jan 20 00:42:42 2004] [notice] Apache configured -- resuming normal operations
    [Tue Jan 20 00:42:42 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    [Tue Jan 20 00:42:42 2004] [notice] Accept mutex: sysvsem (Default: sysvsem)

    and this is weird:
    Address already in use: make_sock: could not bind to port 443

    i check whatis running on port 443?
    root@xxxx [/]# netstat -anp | grep 443
    tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 8302/httpd

    httpd itself...??
    kinda confuse to me... :(

    any clue yet?

    xx.xx.xx.xxx represent shared ip
     
  9. Chew

    Chew Well-Known Member

    Joined:
    Dec 31, 2003
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Maryland
    I too am having this problem...

    Nightly I'll get around 2 emails saying that apache crashed and a restart was attempted.

    Sometimes it's fine... other times the box goes completely awol and nothing but a reboot will fix it.

    Something's definatly wrong here.

    Chew
     
  10. brumie

    brumie Active Member

    Joined:
    Dec 9, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
  11. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I saw this problem pop up on a customer box suddenly.

    Also in /var/log/messages i see tons of these messages

    Mar 26 21:44:24 kernel: NET: 727 messages suppressed.
    Mar 26 21:44:29 kernel: NET: 725 messages suppressed.
    Mar 26 21:44:34 kernel: NET: 709 messages suppressed.
    Mar 26 21:44:39 kernel: NET: 757 messages suppressed.
    Mar 26 21:44:44 kernel: NET: 632 messages suppressed.
    Mar 26 21:44:49 kernel: NET: 1050 messages suppressed.
    Mar 26 21:44:54 kernel: NET: 724 messages suppressed.

    server config

    Dual Xeon 2.4 with HT
    1GB Ram

    WHM 9.1.0 cPanel 9.1.0-S93
    Fedora - WHM X v2.1.2

    I killed all the processes which were binding to the port 443, restarted apache. But still many sites are down. They work at random. Any clues ???
     
  12. ricoche

    ricoche Well-Known Member

    Joined:
    Feb 7, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Thank goodness! Other people are having these same issues. I have been reading this post and most if not all of this ring true on our servers as well. I had a pretty good day today with no apache problems, but as of an hour ago, it's back to going crazy.

    I definitely have something similar to the following in my logs:

    This too...

    This all started about three days ago too.

    EDIT: I'll try the edit up2date fix mentioned above. Thanks.
     
    #12 ricoche, Mar 27, 2004
    Last edited: Mar 27, 2004
  13. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Ok, here's a thought.

    /usr/local/apache/bin/httpd -t

    Fix every error or warning listed.

    service httpd stop
    /etc/rc.d/init.d/httpd startssl

    Watch what happens over the next 12 hrs or so.
     
  14. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I finally gave up with no hope on the customer box. The DC guys came in and said there was a DOS attack on the box or either too much traffic was coming to the server.

    Now just thinking what to do...
     
  15. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I had removed all errors when running configtest on apache.

    Will check this and revert.
     
  16. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I guess this is the same as configtest (too tired to even think about nething rite now, 7 hrs straight on the box with no luck)

    This is what i get when i run the httpd with -t option. Couple of errors of Virtual Hosts as below.

    NameVirtualHost x.x.x.x:80 has no VirtualHosts
    Syntax OK
     
  17. Worelock

    Worelock Active Member

    Joined:
    Mar 23, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Messy httpd.conf

    Hello All,

    We where also getting the NameVirtualHost xx.xx.xx.xxx:80 has no VirtualHosts errors.
    So I went and had a look at the httpd.conf file. WHAT a mess, it seems that when a virtual is deleted from the config by WHM the clean up is very messy.
    Huge white space between virtual setups..and I found like 5 lines that just had NameVirtualHost 69.93.183.110:80
    So I removed all the redundant NameVirtualHost 69.93.183.110:80 lines and the white spaces leaving 2 blank lines between each virtual host and restarted apache with no errors..I am monitoring the webserver now to see if it falls over again.

    Paul
     
  18. ricoche

    ricoche Well-Known Member

    Joined:
    Feb 7, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Yes, I think your correct. Due to time constraints, we actually just recompiled apache and for the past month the server has been working flawlessly. We suspect that the reinstallation cleaned things up considerably.

    Anyway, we'll definitely keep up the maintenance on the config file. It seems like a good habit to have perhaps.

    Thanks.
     
Loading...

Share This Page