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.

what's queueprocd?

Discussion in 'General Discussion' started by nobodyk, Aug 1, 2010.

  1. nobodyk

    nobodyk Well-Known Member

    Joined:
    Aug 1, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    One day I noticed it when I was checking my server status. It was red, so google a bit to learn how to turn it on. I was reading around and ppl say it's a cpanel bug. Is queueprocd suppose to be on or off?
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    queueprocd processes queued tasks

    queueprocd was introduced in cPanel 11.25, and it queues tasks, such as service restarts, so that they can be processed all at once instead of, for example, restarting a particular service repeatedly. Full information about queueprocd is in the 11.25 release notes:

    http://docs.cpanel.net/twiki/pub/AllDocumentation/ReleaseNotes/1125releasenotes.pdf

    queueprocd should normally be running. What is displayed if you try to restart it from the shell using this command as root?

    # /scripts/restartsrv_queueprocd
     
  3. nobodyk

    nobodyk Well-Known Member

    Joined:
    Aug 1, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    I get nothing running that command. I can see it in whm though.
     
  4. Miraenda

    Miraenda Well-Known Member

    Joined:
    Jul 28, 2004
    Messages:
    242
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Coralville, Iowa USA
    Could you try the following command instead as this should tell you if it is running or produce an error if it isn't running when it tries to start it:

    Code:
    /usr/local/cpanel/libexec/queueprocd
    When it's running properly, it will look like this when you run the above command:

    Code:
    [root@itchy:~] # /usr/local/cpanel/libexec/queueprocd
    cPanel TaskQueue Processing Daemon already running, exiting.
     
  5. FreedomOverdose

    Joined:
    Aug 9, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I get nothing when trying to run /scripts/restartsrv_queueprocd

    but I get this when trying to run /usr/local/cpanel/libexec/queueprocd

    Can't locate Cpanel/TaskQueue.pm in @INC (@INC contains: /usr/local/cpanel /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /var/cpanel/perl) at /usr/local/cpanel/libexec/queueprocd line 19.
    BEGIN failed--compilation aborted at /usr/local/cpanel/libexec/queueprocd line 19.


    Tried forcing reinstall to latest Release, restarting, removing from /etc/chkserv.d/chkservd.conf (and still get the darn emails every 5 minutes)

    btw, how do I change the email frequency?
     
  6. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Do you have two Perl binaries?

    What is the output of these commands?

    Code:
    # ls -alh /usr/bin/perl
    # ls -alh /usr/local/bin/perl
    One, but not both, should be a regular file, and one, but not both, should be a symlink to the regular file. For example:

    Code:
    # ls -alh /usr/bin/perl
    -rwxr-xr-x 2 root root 15K Nov  8  2007 /usr/bin/perl*
    # ls -alh /usr/local/bin/perl
    lrwxrwxrwx 1 root root 13 May 30  2008 /usr/local/bin/perl -> /usr/bin/perl*
    /usr/local/bin/perl can be a regular file, with /usr/bin/perl a symlink to /usr/local/bin/perl; that will work just as well.

    If both are regular files, move one to /root and create a symlink in its place. For example:

    Code:
    # mv /usr/local/bin/perl
    # ln -s /usr/bin/perl /usr/local/bin/perl
    will move /usr/local/bin/perl to /root and create a symlink in its place to /usr/bin/perl.

    If the above does not apply, and you have only one Perl binary file and one symlink, then what are the contents of /usr/local/cpanel/src? There should be a Cpanel-TaskQueue-0.3 directory, like this:

    Code:
    # ls -alh /usr/local/cpanel/src/|grep Cpanel
    drwxr-xr-x  6 root wheel 4.0K Jan 13  2010 Cpanel-Class-1.0.5/
    drwxr-xr-x  4 root wheel 4.0K Jan 13  2010 Cpanel-Cleanup-0.4/
    drwxr-xr-x  3 root wheel 4.0K Dec 16  2009 Cpanel-FastMath-0.2/
    drwxr-xr-x  3 root wheel 4.0K Jan 13  2010 Cpanel-FastMath-0.3/
    drwxr-xr-x  3 root wheel 4.0K Dec 16  2009 Cpanel-POSIX-Tiny-0.7/
    drwxr-xr-x  3 root wheel 4.0K Jan 13  2010 Cpanel-POSIX-Tiny-1.1/
    drwxr-xr-x  5 root wheel 4.0K Jan 13  2010 Cpanel-TaskQueue-0.3/
    If it does not exist, you can refresh the /usr/local/cpanel/src directory using the following:

    Code:
    # cd /root
    # wget http://httpupdate.cpanel.net/cpanelsync/RELEASE/src.tar.bz2
    # cd /usr/local/cpanel
    # tar jxvf /root/src.tar.bz2
    If you are not running the RELEASE build (though I note that you are), replace RELEASE in the wget command with the name of the actual build you are running.

    If this does not correct the problem, I recommend submitting a support request so that we can examine the server directly.
     
  7. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    chkservd

    I noticed I forgot to answer your other question. The service failure notification e-mails are generated by chkservd, which is a driver that is part of tailwatchd. This is configured in the WebHost Manager in Main >> Service Configuration >> Service Manager.

    chkservd is what monitors services, as selected in the interface I mentioned above, and sends notifications if they are detected as "down." You will notice that there is no option to deselect monitoring for queueprocd. This is because it is considered a core service. Its basic purpose is to queue restart requests for services so that, for example, Apache will not be restarted several separate times if you add many domains in a short period of time.

    There is no way to change the frequency with which chkservd checks services. It is set to check every five minutes, and there is no way for the user to define the frequency.
     
  8. FreedomOverdose

    Joined:
    Aug 9, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello and thanks for your reply. Both the files were regular files, so I moved one of them in /root (as you indicated) and created a link.

    and I get this when greping:
    Code:
    root@server [~]# ls -alh /usr/local/cpanel/src/|grep Cpanel
    drwxr-xr-x  6 root wheel 4.0K Sep  2 10:39 Cpanel-Class-1.0.5/
    drwxr-xr-x  4 root wheel 4.0K Sep  2 10:39 Cpanel-Cleanup-0.4/
    drwxr-xr-x  3 root wheel 4.0K Dec 17  2009 Cpanel-FastMath-0.2/
    drwxr-xr-x  3 root wheel 4.0K Sep  2 10:39 Cpanel-FastMath-0.3/
    drwxr-xr-x  3 root wheel 4.0K Dec 17  2009 Cpanel-POSIX-Tiny-0.7/
    drwxr-xr-x  3 root wheel 4.0K Sep  2 10:39 Cpanel-POSIX-Tiny-1.1/
    drwxr-xr-x  5 root wheel 4.0K Sep  2 10:39 Cpanel-TaskQueue-0.3/
    
    restarted cpanel, but still the service is down...:S
     
  9. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    checkperlmodules

    I should have mentioned this along with the discussion of the symlink. Since you have moved one of the files and created a symlink, run the following:

    Code:
    # /scripts/checkperlmodules --full
    The reason that having two Perl binary files is bad is that modules can be installed for one or not the other, so the system will look like it has modules properly installed, but they are not accessible by the copy of Perl that is actually running. Having only one copy of the Perl binary eliminates this possibility. If this is what was happening, /scripts/checkperlmodules should install any modules that were missing.

    After the checkperlmodules --full command finishes, try starting queueprocd manually:

    Code:
    # /usr/local/cpanel/etc/init/startqueueprocd
    Is any output given? Also, see if there is any queueprocd process running:

    Code:
    # ps aux|grep queueprocd
     
  10. FreedomOverdose

    Joined:
    Aug 9, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I executed the first two commands, one after the other.

    There's no output when I try to run startqueueprocd. Here's what I get when greping the proccess:
    Code:
    root@server [/tmp/vhcs-2.4.8]# ps aux|grep queueprocd
    root       894  0.0  0.4  90472  6124 pts/1    S    15:47   0:00 queueprocd - wait to process a task
    root       921  0.0  0.0  61280   724 pts/1    S+   15:47   0:00 grep queueprocd
    root@server [/tmp/vhcs-2.4.8]# 
    
     
  11. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    queueprocd is actually running now! Your ps output shows it running. Now try restarting tailwatchd and watching the chkservd log with this:

    Code:
    # /scripts/restartsrv_tailwatchd && tail -f /var/log/chkservd.log
    Use Ctrl+C to stop the tail -f command and return to the shell command prompt. You should see something like this:

    Code:
    # /scripts/restartsrv_tailwatchd && tail -f /var/log/chkservd.log 
    Loading services .....lfd....imap....exim....spamd....ftpd....named....mysql....clamd....syslogd....exim-26....cpanellogd....httpd....ipaliases....queueprocd....cpsrvd..Done
    Service Check Started
    [2010-09-02 08:53:16 -0500] Service check ....syslogd [[check command:+][tcp connect:N/A]]...spamd [[check command:+][tcp connect:N/A]]...queueprocd [[check command:+][tcp connect:N/A]]...named [[check command:+][tcp connect:N/A]]...mysql [[check command:+][tcp connect:N/A]]...lfd [[check command:+][tcp connect:N/A]]...ipaliases [[check command:+][tcp connect:N/A]]...imap [[check command:+][tcp connect:+]]...httpd [[check command:N/A][tcp connect:+]]...ftpd [[check command:+][tcp connect:+]]...exim-26 [[check command:N/A][tcp connect:+]]...exim [[check command:+][tcp connect:+]]...cpsrvd [[check command:N/A][tcp connect:+]]...cpanellogd [[check command:+][tcp connect:N/A]]...clamd [[check command:+][tcp connect:N/A]]...Done
    Service Check Finished
    The important string in that output, in this case, is this:

    Code:
    queueprocd [[check command:+][tcp connect:N/A]]
    This shows that chkservd has detected queueprocd as up, and will take no action to try to restart it. You should see this in your /var/log/chkservd.log at this point.
     
  12. FreedomOverdose

    Joined:
    Aug 9, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I restarted cpanel, now everything works fine :)

    Thank you very much!
     
  13. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You are very welcome!

    I am glad I was able to help.
     
Loading...

Share This Page