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.

cppop

Discussion in 'General Discussion' started by anand, Feb 1, 2004.

  1. 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
    Lately i found that only a particular box of mine cppop would just crash, connection refused. I had to restart cppop too often on this box. Even after searching on the forums i didn't come across a satisfactory answer for this probs of mine.

    Today i sat and wrote a small addition to the chkservd which is responsible to check all the services apache, exim, eximstats, bind etc. This stuff now runs and checks cppop everytime all other services are checked and if no response is recieved cppop is restarted. I tried this several times and its working perfectly fine on this box now. Atleast i can relax a while.

    Here it is for anyone else who would like to use it / try it out.

    Use your favorite editor to create a file cppop inside /etc/chkserv.d directory (i use pico)

    Contents of /etc/chkserv.d/cppop file (should all be in one line)

    PHP:
    service[cppop]=110,QUIT,+,/scripts/ckillall -9 cppop;/usr/local/cpanel/bin/cppop
    Save and exit pico. Restart chkservd

    Now comes the testing part.

    Please beware this test will make cppop unaccessible during the test period.

    Type this on the shell :

    PHP:
    /scripts/ckillall -9 cppop
    The above will kill all cppop instances. Now do a tail -f /var/log/chkservd.log and wait for chkservd to look for cppop service as well along with other services.


    PHP:
    [Mon Feb  2 10:25:42 2004Service check ....apache [+]...bind [+]...cppop [-Restarting cppop....
    system: /scripts/ckillall -9 cppop
    system
    : /usr/local/cpanel/bin/cppop
    ]...exim [+]...eximstats [+]...ftpd [+]...imap [+]...mysql [+]...syslogd [+]...webmail [+]...Done
    See the message of restarting cppop. :)

    Hope this helps someone like it did to me.
     
  2. 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
    Just wanted to add something, i noticed that chkservd is only checking services every 7-8 minutes on this box. Can i change this duration somewhere ?
     
  3. 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
    Just read this in changelog:

    +-------------------------------------------------------------+
    Thu Jan 29 21:58:11 EST 2004
    8.7.0-EDGE_42
    ---------------------------------------------------------------
    chkservd entries for cppop,cpanel,whostmgr
    ---------------------------------------------------------------

    I guess my time spend on this was useless. Anyways glad to see its now inside cpanel. I don't need to put my version on all my boxes instead.
     
  4. 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
    anyone knows how to change the interval in which chkservd runs to check for the services ??
     
  5. beachtrader

    beachtrader Active Member

    Joined:
    Feb 21, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Anyone have the answer on how to change the interval of chkservd?
     
  6. chirpy

    chirpy Well-Known Member

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

Share This Page