Jump to content
  • 0

Cron Task Stuck


evolvewh

Question

There are one or more cron tasks that have been executing for more than 60 minute so I ran cron manually hoping that would do the trick but it didn't. Process Service Renewals is the task stuck and should run every 5 minutes but hasn't for almost 3 hours now. I checked the logs and they say every task is completing. How can that be?

Blesta v. 4.2.1 and running php7

How can I get this resolved?

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0

The Process Service Renewals task says it has completed too? The cron log is missing an end date for that task, so it is either still running (unlikely) or has failed to complete (e.g. encountered a php error). You should be able to clear the task lock by going to the Settings > Company > Automation page, scrolling down to the Process Service Renewals task and clicking the Clear Task Lock link, assuming that link is available for the task, which I think it should be based on your description. Then you may want to run the cron manually from the Settings > System > Automation page so that the output is displayed in your browser and you can check whether an error occurs during that task's execution.

Link to comment
Share on other sites

  • 0
44 minutes ago, Tyson said:

The Process Service Renewals task says it has completed too? The cron log is missing an end date for that task, so it is either still running (unlikely) or has failed to complete (e.g. encountered a php error). You should be able to clear the task lock by going to the Settings > Company > Automation page, scrolling down to the Process Service Renewals task and clicking the Clear Task Lock link, assuming that link is available for the task, which I think it should be based on your description. Then you may want to run the cron manually from the Settings > System > Automation page so that the output is displayed in your browser and you can check whether an error occurs during that task's execution.

Tyson thanks for the help. I've attached a screenshot of the task under Settings > System > Automation and there's no way to 'Clear Task Lock'. When I ran cron manually earlier, the output was that everything ran just fine.

Screen Shot 2018-02-22 at 11.35.36 AM.png

Link to comment
Share on other sites

  • 0
1 hour ago, evolvewh said:

Hi. Only Logicboxes Reloaded from your company.

We have logicboxes reloaded in some installation and never experienced any issue with cron . the cron mechanism in blesta some enhancement, something like logging the cron output in a log file to know why the cron stuck .

try disable the cron for a while, then run it from command line, then you will see the output and the error.

 

Link to comment
Share on other sites

  • 0
2 hours ago, Blesta Addons said:

We have logicboxes reloaded in some installation and never experienced any issue with cron . the cron mechanism in blesta some enhancement, something like logging the cron output in a log file to know why the cron stuck .

try disable the cron for a while, then run it from command line, then you will see the output and the error.

 

I did not figure it was because of your module and I upgraded to 4.2.2. and got lucky. Everything looks ok at the moment.

Link to comment
Share on other sites

  • 0

I spoke too soon and this task is stuck again. I should have mentioned it before but I did comment out 3 lines in the logicboxes module to hide the Domain Forwarding, DNS and privacy protection tabs in the client area. Could I have made a mistake with that?

I commented out these 3 lines in components/logicboxes/logicboxes.php (lines 1338 - 1340) (The get clients tabs function)

//'tabClientDomainforwarding' => Language::_("Logicboxes.tab_domainforwarding.title", true),
//'tabClientDns' => Language::_("Logicboxes.tab_dns.title", true),
//'tabClientPrivacy' => Language::_("Logicboxes.tab_privacy.title", true),

 

This was the 'module' log output:

https://httpapi.com/api/domains/details.json
{"orderid":"xxxxxxxxxxxx","privacyprotectendtime":"1519520532","parentkey":"999999999_80588_481018","creationtime":"1424826132","orderstatus":["transferlock","resellerlock"],"privacy-techcontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"recurring":"false","classname":"com.logicboxes.foundation.sfnb.order.domorder.DomCno","isImmediateReseller":"true","productkey":"domcno","privacy-billingcontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"customerid":"14379684","privacy-registrantcontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"classkey":"domcno","orderSuspendedByParent":"false","endtime":"1519520532","multilingualflag":"f","privacyprotectedallowed":"true","domsecret":"BeZW5oV\u003ekd","isOrderSuspendedUponExpiry":"false","domainname":"ranger-quest.com","allowdeletion":"true","productcategory":"domorder","isprivacyprotected":"true","privacy-admincontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"bulkwhoisoptout":"t","moneybackperiod":"4"}

 

The cron log for 'process service renewals' says this: Attempting to process renewing services. Before trying to renew this service, that same task (for earlier times today) says: Attempting to process renewing services. The process renewing services task has completed.

Link to comment
Share on other sites

  • 0
23 minutes ago, evolvewh said:

I spoke too soon and this task is stuck again. I should have mentioned it before but I did comment out 3 lines in the logicboxes module to hide the Domain Forwarding, DNS and privacy protection tabs in the client area. Could I have made a mistake with that?

I commented out these 3 lines in components/logicboxes/logicboxes.php (lines 1338 - 1340) (The get clients tabs function)

//'tabClientDomainforwarding' => Language::_("Logicboxes.tab_domainforwarding.title", true),
//'tabClientDns' => Language::_("Logicboxes.tab_dns.title", true),
//'tabClientPrivacy' => Language::_("Logicboxes.tab_privacy.title", true),

 

This was the 'module' log output:

https://httpapi.com/api/domains/details.json
{"orderid":"xxxxxxxxxxxx","privacyprotectendtime":"1519520532","parentkey":"999999999_80588_481018","creationtime":"1424826132","orderstatus":["transferlock","resellerlock"],"privacy-techcontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"recurring":"false","classname":"com.logicboxes.foundation.sfnb.order.domorder.DomCno","isImmediateReseller":"true","productkey":"domcno","privacy-billingcontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"customerid":"14379684","privacy-registrantcontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"classkey":"domcno","orderSuspendedByParent":"false","endtime":"1519520532","multilingualflag":"f","privacyprotectedallowed":"true","domsecret":"BeZW5oV\u003ekd","isOrderSuspendedUponExpiry":"false","domainname":"ranger-quest.com","allowdeletion":"true","productcategory":"domorder","isprivacyprotected":"true","privacy-admincontact":{"telno":"8022274003","telnocc":"1","country":"US","company":"Privacy Protect, LLC (PrivacyProtect.org)","emailaddr":"contact@privacyprotect.org","name":"Domain Admin","zip":"01803","privacyprotectionroid":"PP-SP-001","address1":"10 Corporate Drive","state":"MA","city":"Burlington"},"bulkwhoisoptout":"t","moneybackperiod":"4"}

 

The cron log for 'process service renewals' says this: Attempting to process renewing services. Before trying to renew this service, that same task (for earlier times today) says: Attempting to process renewing services. The process renewing services task has completed.

i have not understand, you mean the the above lines are causing the error?

Link to comment
Share on other sites

  • 0
3 minutes ago, evolvewh said:

No. I am asking if they could be causing an error? I edited your file and commented out those 3 lines of code so that those 3 tabs would not show in the client area.

i don't think they can lead to a error. what i suggest is to disable the cron for a while 6 hours. enable error reporting,   then run it from command line and see what is the output.

Link to comment
Share on other sites

  • 0
On 2/23/2018 at 3:36 PM, Blesta Addons said:

i don't think they can lead to a error. what i suggest is to disable the cron for a while 6 hours. enable error reporting,   then run it from command line and see what is the output.

I haven't been able to disable cron but I have narrowed it down that it is only logicboxes services that aren't renewing properly and making the cron stuck. cPanel has gone through just fine.

Link to comment
Share on other sites

  • 0

Based on the error log, I think this might be our issue:

[2018-02-26 19:10:10] general.ERROR: Uncaught Exception Error: "Cannot use object of type stdClass as array" at /home/xxxx/public_html/billing/components/modules/logicboxes/logicboxes.php line 707 {"exception":"[object] (Error(code: 0): Cannot use object of type stdClass as array at /home/xxxx/public_html/billing/components/modules/logicboxes/logicboxes.php:707)"}

 

Link to comment
Share on other sites

  • 0
5 hours ago, evolvewh said:

Based on the error log, I think this might be our issue:

[2018-02-26 19:10:10] general.ERROR: Uncaught Exception Error: "Cannot use object of type stdClass as array" at /home/xxxx/public_html/billing/components/modules/logicboxes/logicboxes.php line 707 {"exception":"[object] (Error(code: 0): Cannot use object of type stdClass as array at /home/xxxx/public_html/billing/components/modules/logicboxes/logicboxes.php:707)"}

 

That does seem to look like a problem with the LogicBoxes Reloaded module.

On 2/23/2018 at 1:48 PM, evolvewh said:

The cron log for 'process service renewals' says this: Attempting to process renewing services. Before trying to renew this service, that same task (for earlier times today) says: Attempting to process renewing services. The process renewing services task has completed.

Each task should at least read "Attempting to process <task>." followed eventually by "The process <task> task has completed." This indicates the task both started and completed successfully. If you do not see that the task has completed, it is either still running (unlikely) or there was a failure processing the task that stopped php execution.

Link to comment
Share on other sites

  • 0
12 hours ago, Tyson said:

That does seem to look like a problem with the LogicBoxes Reloaded module.

Each task should at least read "Attempting to process <task>." followed eventually by "The process <task> task has completed." This indicates the task both started and completed successfully. If you do not see that the task has completed, it is either still running (unlikely) or there was a failure processing the task that stopped php execution.

I'm thinking that the error is stopping the php execution. @Blesta Addons, could this be a php7 issue?

Link to comment
Share on other sites

  • 0
On 27/02/2018 at 1:52 PM, evolvewh said:

I'm thinking that the error is stopping the php execution. @Blesta Addons, could this be a php7 issue?

i will check this tomorrow, you have error_reporting enabled?

 

On 27/02/2018 at 1:07 AM, Tyson said:

Each task should at least read "Attempting to process <task>." followed eventually by "The process <task> task has completed." This indicates the task both started and completed successfully. If you do not see that the task has completed, it is either still running (unlikely) or there was a failure processing the task that stopped php execution.

But between the begin and the end nothing is logged . i still insist to add a logger for the output of the tasks .

Link to comment
Share on other sites

  • 0
20 hours ago, Blesta Addons said:

it was simple to identify the issue, i have make a fix a updated the file.  download the files again and make the update .

Thank you for the fix and I will download it soon. I also want to thank @GosuHost who helped to provide a fix for this a few days ago as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...