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.

SSL and chkservd

Discussion in 'General Discussion' started by s3kk3y, Mar 10, 2004.

  1. s3kk3y

    s3kk3y Well-Known Member

    Joined:
    Oct 12, 2002
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have noticed that when a server has extreme loads and causes apache to crash, chkservd restarts it without the SSL option.

    Is there a way to change the httpd restart line that chkservd uses to use startssl instead?

    Maybe even consider this in the next build as it cant hurt?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It already seems to:

    cat /etc/chkserv.d/apache
    #SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
    service[apache]=80,GET / HTTP/1.0,HTTP/1..,/scripts/checkmaxclients;killall -TERM httpd;sleep 2;killall -9 httpd;/etc/rc.d/init.d/httpd stop;/etc/rc.d/init.d/httpd startssl;/usr/local/apache/bin/apachectl startssl;/etc/rc.d/init.d/httpd_start;/usr/local/apache/bin/apachectl start
     
  3. s3kk3y

    s3kk3y Well-Known Member

    Joined:
    Oct 12, 2002
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    hm, thats weird.

    Wonder why SSL doesnt get started then when apache gets restarted by chkservd.

    Thanks.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It does seem that others have been having the same problem that you describe, though.

    The method used by chckservd isn't infallible. If one process does not die (despite all the attempted KILLs), then SSL will simply not start.

    I wonder if increasing the sleep 2 to a longer wait might help, e.g. sleep 6? Of course doing that might introduced other issues with sites appearing to be down.

    What might be better would be for it to run a separate script with a bit more intelligence, that issues the kills and then monitors the HTTPD processes until they are all definitely stopped, only then should it try to start HTTPD. The current way seems a little hit and miss.
     
  5. s3kk3y

    s3kk3y Well-Known Member

    Joined:
    Oct 12, 2002
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Is there a way to have chkservd check HTTPS? I know that it only checks to make sure that HTTP is up, but is there a way to make it check for HTTPS as well?
     
  6. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I am having this problem. It would be nice if port 443 were monitored by checksrvd as a seperate script. I wish someone had a fix for this.

    While it may be related to load, I see it happen on stable servers as well, and only random ones at that.
     
  7. shiv

    shiv Member

    Joined:
    Jul 26, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bangalore
    Monitoring https via chkservd

    Hi,

    Wanna monitor https via WHM using chkservd? Here I give you very simple configuration.

    chkservd maintains configuration files for each services at /etc/chkserv.d/

    Create a new file called https and add the following content in it.

    ----------

    service[https]=443,GET / HTTP/2.0;killall -TERM httpd;sleep 2;killall -9 httpd;/etc/rc.d/init.d/httpd stop;/etc/rc.d/init.d/httpd startssl;/usr/local/apache/bin/apachectl startssl

    ----------

    Then edit /etc/chkserv.d/chkservd.conf
    and enable https in it as follows.

    ----------
    https=1
    ----------

    Once you create the https file you can directly goto whm "Service Manager" link and enable https monitoring. You will be able to see https listed in "Service Status"

    Then go ahead and restart chkservd

    You find the following log in chkservd.log

    Service check ....antirelayd [+]...apache [+]...cpsrvd [+]...entropychat [+]...exim [+]...eximstats [+]...ftpd [+]...httpd [+]...https [+]...imap [+]...melange [+]...mysql [+]...named [+]...pop [+]...spamd [+]...syslogd [+]...Done

    Or Once again visit "Service Status" section in WHM.

    ChkServd Rocks with Green Light for HTTPS


    --
    --
    "Wisdom is knowing what to do next, skill is knowing how to do it, and virtue is doing it."
    --
    With Best Regards,
    Omshivaprakash.H.L

    Technical Manager
    Carmatec IT Solutions Pvt. Ltd.
    CARMATEC & INSTA CARMA Solution is the only option....
     
Loading...

Share This Page