Author Topic: Critical! Queue is not enabled in cron. Add following crontab entry: * * * * *  (Read 377 times)

0 Members and 1 Guest are viewing this topic.

Offline andika

  • 153
  • -1
  • Active Participant
  • ****
Hello,

Yesterday I have upgrade VPS size and extend disk using partion tools, all websites from server are fine but it seems like hostbill website have some issues now, I don't know if that's the cause but it came after.

I got this error on admin area : Critical! Queue is not enabled in cron. Add following crontab entry: * * * * * php /home/admin/public_html/mysite.com/queue.php

I already added that line long time ago but I double checked , restarted crond, rebooted server, etc with no result. The strange thing is that automatic terminate/suspend task is affected. When I manually trigger that I get:

Pending auto provisioning tasks:
Attempting to terminate account #3282:  Scheduled
Attempting to terminate account #4097:  Scheduled
Attempting to terminate account #4098:  Scheduled
Attempting to terminate account #4099:  Scheduled
Attempting to terminate account #4100:  Scheduled
Accounts suspended: 0
Accounts terminated: 5
Addons suspended: 0
Addons terminated: 0

When I check the listed accounts, i.e. 3282 the status is supended and today the server should be terminated but it doesn't, instead I get ' delete account task is scheduled' message on right button corner . If I manually trigger terminated nothing happen, the page refresh with the same pop up message. 

Since yesterday all tasks are pending here Extras → System Logs → Task queue log. I also got message  Queue is: Stopped  
I used this command on ssh  php -q /home/admin/public_html/my.site.com/queue.php   with no result

I have updated Hostbill to the last 7.08.2018 version with no result. 

I Just noticed I can't do nothing anymore, deploy new servers, send emails, etc, nothing.

Maybe the automatic task where triggered exactly when I extend the disk and not its stuck somewhere in DB, how to fix my problem because right now I manually have to access SolusVM and terminate each server and change status on hostbill etc. Its a mess..

Thank you !
 
« Last Edit: August 10, 2018, 11:07:36 AM by andika »

Offline andika

  • 153
  • -1
  • Active Participant
  • ****
Any advise on this ?

Offline Fusionhost

  • 252
  • 4
  • Active Participant
  • *****
    • Fusionhost
I think we are having this issue.
fusionhost - www.fusionhost.co.uk
Leading student web host provider utilising SSD cloud platforms

Offline andika

  • 153
  • -1
  • Active Participant
  • ****
I think we are having this issue.

Did you fix it ?

Offline Factor

  • 69
  • 4
  • Active Participant
  • ***
  • Welcome to reality wish you could stay longer..
Are you running HB on Cpanel or some other Panel OR are you running HB through the install on a machine all by itself.  I find on Panel servers you have to use -r

if you want to know if the queue is up and running in the background (this is if you are not doing  -r)
ssh and do

ps -ef | grep 'hostbillqueue'

the log is

tail -f /home/were you put /templates_c/hostbillqueue.log

You also might put the full path to PHP
like
/usr/local/bin/php -q /home/YOUR USER/public_html/YOURFolder/queue.php -r


/usr/local/bin/php -q /home/YOUR USER/public_html/YOURFolder/queue.php -h
Help is under -h

HostBill Queue Manager

USAGE:
  # queue.php

OPTIONS:
  -P              Override PID file to use
  -h              Show help
  -l              Override Log file to use
  -v              Increase verbosity level by one
  -x              Maximum seconds for a worker to live
  -Z              Parse command line options and dump config on screen (debug)
  -D              Number of workers for new queues to run at once
  -r              Force queue to run using cron queue handler (without forking/workers)
  --hb_acc_provisioning=NUMBER     Set number of workers for queue: Provisioning (default: 2). 0 to disable workers on this queue.
  --hb_utilities=NUMBER     Set number of workers for queue: Utilities (default: 2). 0 to disable workers on this queue.
  --hb_dom_provisioning=NUMBER     Set number of workers for queue: Domains (default: 2). 0 to disable workers on this queue.
  --hb_mail_queue=NUMBER     Set number of workers for queue: Mailing (default: 3). 0 to disable workers on this queue.


https://hostbill.atlassian.net/wiki/spaces/DOCS/pages/491527/HostBill+Queue+Performance
« Last Edit: March 11, 2019, 08:12:42 PM by bdacus01 »
Thanks,
The Factor

Offline andika

  • 153
  • -1
  • Active Participant
  • ****
Are you running HB on Cpanel or some other Panel OR are you running HB through the install on a machine all by itself.  I find on Panel servers you have to use -r

if you want to know if the queue is up and running in the background (this is if you are not doing  -r)
ssh and do

ps -ef | grep 'hostbillqueue'

the log is

tail -f /home/were you put /templates_c/hostbillqueue.log

You also might put the full path to PHP
like
/usr/local/bin/php -q /home/YOUR USER/public_html/YOURFolder/queue.php -r


/usr/local/bin/php -q /home/YOUR USER/public_html/YOURFolder/queue.php -h
Help is under -h

HostBill Queue Manager

USAGE:
  # queue.php

OPTIONS:
  -P              Override PID file to use
  -h              Show help
  -l              Override Log file to use
  -v              Increase verbosity level by one
  -x              Maximum seconds for a worker to live
  -Z              Parse command line options and dump config on screen (debug)
  -D              Number of workers for new queues to run at once
  -r              Force queue to run using cron queue handler (without forking/workers)
  --hb_acc_provisioning=NUMBER     Set number of workers for queue: Provisioning (default: 2). 0 to disable workers on this queue.
  --hb_utilities=NUMBER     Set number of workers for queue: Utilities (default: 2). 0 to disable workers on this queue.
  --hb_dom_provisioning=NUMBER     Set number of workers for queue: Domains (default: 2). 0 to disable workers on this queue.
  --hb_mail_queue=NUMBER     Set number of workers for queue: Mailing (default: 3). 0 to disable workers on this queue.


https://hostbill.atlassian.net/wiki/spaces/DOCS/pages/491527/HostBill+Queue+Performance

Hello,

Forgot the update the topic, it worked find for some months but now, after server reboot its failing again. All my cron jobs are located on file /etc/crontab , if I change to user from root to admin it triggers the the script , if I left root user (worked for months with no issue ! ) it doesn't trigger the queue. So it works only with admin user, but with admin user it triggers alarm on LFD and it sends emails to me every single minute. I tried to disable triggers from lfd but fail, all I need is to make it work again with root user. I don't know what happened on reboot , please advice ! Thank you

working line on server etc/crontab file :

* * * * * admin php -q /home/admin/public_html/mydomain.com/queue.php -r

not working:

* * * * * root php -q /home/admin/public_html/mydomain.com/queue.php -r

Offline Factor

  • 69
  • 4
  • Active Participant
  • ***
  • Welcome to reality wish you could stay longer..
Well I can tell you I don't personally run the queue that fast.  I find the -r takes a bit longer to process and overlapping can cause issues in general. 

I use

*/3 * * * * php -q /home/admin/public_html/mydomain.com/queue.php -r


It should not run as root.  I needs to run as the user you installed the hostbill system in.  Since I can't tell that here I assume it is admin.


to edit cron in most linux systems it would be


Code: [Select]
crontab -e -u admin  Again change admin to whatever your hostbill user is. 


what do you get with
Code: [Select]
ps -ef | grep 'hostbillqueue'

Again though it hard to tell.  I could help you more if you told me more.  Did you try any of the suggestions? Did you look for the log and issues?  Is the hostbill install current as of this Monday.  Are the server up to date (yum update -y).

« Last Edit: October 01, 2019, 10:37:37 AM by Factor »
Thanks,
The Factor