Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

chkservd and supervisord

Discussion in 'General Discussion' started by ExtremeGuy, Dec 11, 2018.

Tags:
  1. ExtremeGuy

    ExtremeGuy Member

    Joined:
    Aug 11, 2013
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am having an issue with running supervisord as a service monitored by chkservd. The chkservd service keeps restarting the service every iteration as the check appears to be failing, but I don't know why

    The chkservd log file is reporting the following

    supervisord [[check command:-][socket connect:N/A][fail count:19]Restarting supervisord....

    My chkserv.d file located at /etc/chkserv.d/supervisord

    service[supervisord]=9123,GET / HTTP/1.0,HTTP/1..,service supervisord restart,supervisord,supervisord

    and my supervisor configuration file (commented entries removed for brevity)

    [supervisord]
    ;http_port=/var/tmp/supervisor.sock ; (default is to run a UNIX domain socket server)
    http_port=127.0.0.1:9123 ; (alternately, ip_address:port specifies AF_INET)


    logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
    logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
    logfile_backups=10 ; (num of main logfile rotation backups;default 10)
    loglevel=info ; (logging level;default info; others: debug,warn)
    pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
    nodaemon=false ; (start in foreground if true;default false)
    minfds=1024 ; (min. avail startup file descriptors;default 1024)
    minprocs=200 ; (min. avail process descriptors;default 200)


    [supervisorctl]
    ;serverurl=unix:///var/tmp/supervisor.sock ; use a unix:// URL for a unix socket
    serverurl=http://127.0.0.1:9123 ; use an http:// url to specify an inet socket



    I changed it to an http service rather than a socket to see if I can address but it has not worked. My original chksrvd file for supervisord was, as per Cpanel docs

    service[supervisord]=x,x,x,service supervisord restart,supervisord,supervisord

    I understand that supervisord is an unsupported service, but I would really like to know if I have anything incorrectly configured that would cause chksrvd to be constantly failing to read the service status.

    Jason

     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,331
    Likes Received:
    2,159
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Jason,

    Can you confirm which Operating System and cPanel & WHM versions are installed on the system so we can attempt to reproduce the issue?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ExtremeGuy

    ExtremeGuy Member

    Joined:
    Aug 11, 2013
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The server is a VPS running CENTOS 6.10 with WHM v76.0.14. supervisor is currently running version 2.1
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,331
    Likes Received:
    2,159
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @ExtremeGuy,

    I tested this using the steps documented on the link below for process-based monitoring:

    TailWatch - cPanel Knowledge Base - cPanel Documentation

    Code:
    # grep supervisord /etc/chkserv.d/chkservd.conf
    supervisord:1
    
    # cat /etc/chkserv.d/supervisord
    service[supervisord]=x,x,x,service supervisord restart,supervisord,root
    Once Chkservd was setup, I killed the supervisord process with the following command:

    Code:
    # killall -9 supervisord
    # ps aux|grep supervisord
    root      9229  0.0  0.0 112708   980 pts/1    S+   12:33   0:00 grep --color=auto supervisord
    
    Upon the next Chkservd service check, /var/log/chkservd.log showed supervisord was detected as down and successfully restarted:

    Code:
    supervisord [[check command:-][socket connect:N/A][fail count:1]Restarting supervisord....
    system: service supervisord restart
    [notify:failed service:supervisord]]..
    
    Code:
    # ps aux|grep supervisord
    root      9282  0.0  0.6 219408 11880 ?        Ss   12:35   0:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisord.conf
    root      9366  0.0  0.0 112708   980 pts/1    S+   12:36   0:00 grep --color=auto supervisord
    Can you let me know if the issue persists on your system using these same steps and file contents?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice