Jump to content


Photo

JobMonitor Stuck Issue

JobMonitor

  • Please log in to reply
9 replies to this topic

#1 BHruska

BHruska

    Member

  • Members
  • PipPip
  • 26 posts

Posted 07 January 2015 - 09:15 PM

I've got a job monitor sticking issue.  It has worked just fine for some time, but now its getting stuck... and I can't figure out why.  It will run fine if I run it manually after clearing the stuck job status.  But when it tries to run automatically every five minutes from Zurmo it won't run right.  I tried expanding the timeframe on the CRON command line in case it was a timeout issue.  This was mentioned in another post.

 

Here's the joblog:

 

Script will run at most for 9000 seconds.
Sending output to runtime/jobLogs/Monitor.log
1/7/15 2:55 PM America/Chicago Starting job type: Monitor
2015/01/07 14:55:03 Info  - Script will run at most for 9000 seconds.
2015/01/07 14:55:03 Info  - Starting job type: Monitor
Script will run at most for 9000 seconds.
Sending output to runtime/jobLogs/Monitor.log
1/7/15 3:00 PM America/Chicago Starting job type: Monitor
2015/01/07 15:00:06 Info  - Script will run at most for 9000 seconds.
2015/01/07 15:00:06 Info  - Starting job type: Monitor
2015/01/07 15:00:06 Info  - Existing monitor job detected
2015/01/07 15:00:06 Info  - Existing monitor job is stuck
1/7/15 3:00 PM America/Chicago Ending job type: Monitor
Script will run at most for 9000 seconds.
Sending output to runtime/jobLogs/Monitor.log
1/7/15 3:05 PM America/Chicago Starting job type: Monitor
2015/01/07 15:05:03 Info  - Script will run at most for 9000 seconds.
2015/01/07 15:05:03 Info  - Starting job type: Monitor
2015/01/07 15:05:03 Info  - Existing monitor job detected
2015/01/07 15:05:03 Info  - Existing monitor job is stuck
1/7/15 3:05 PM America/Chicago Ending job type: Monitor
 


#2 BHruska

BHruska

    Member

  • Members
  • PipPip
  • 26 posts

Posted 08 January 2015 - 01:59 PM

I fixed this issue by putting this line at the bottom of console.php:

 

    $common_config['components']['request']['hostInfo']         = 'http://myzurmourl.com';
 
This is similar to this line in perinstance.php:
 
    $instanceConfig['components']['request']['hostInfo']         = 'http://myzurmourl.com';
 
It seems console commands weren't initiating the $_SERVER variable, so yii was freaking out on this line:
 
$this->_hostInfo=$http.'://'.$_SERVER['SERVER_NAME'];
 
Thus giving this error in the log above:
 
2015/01/07 16:20:05 [error] [php] Undefined index: SERVER_NAME (/var/www/zurmo/yii/framework/web/CHttpRequest.php:305)
 
Perhaps the zurmo developers can make changes to avoid this problem in future versions, but in the meantime this might help some of you with the same issue.


#3 oldrose

oldrose

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts
  • LocationAustralia

Posted 08 January 2015 - 09:58 PM

Thanks for that, I've been having the same problem with the monitor becoming stuck at seemingly random intervals.



#4 johant84

johant84

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 09 February 2015 - 03:35 PM

Thanks Bhruska! This fix works fine for me. Because your solution I saved a lot of time!



#5 panda

panda

    Member

  • Members
  • PipPip
  • 23 posts

Posted 06 March 2015 - 09:03 AM

This could be very much related to one of our problems! Zurmo cannot "find" our server probably due to config or path issues because I'm getting lots of http-related errors. I'll paste that ugly code below. But first, Bhruska, do you mean the console.php here:

 

/zurmo/app/protected/config/console.php

 

or here:

 

/zurmo/yii/framework/cli/views/webapp/protected/config/console.php

 

I am most interested in your line "It seems console commands weren't initiating the $_SERVER variable, so yii was freaking out on this line:

$this->_hostInfo=$http.'://'.$_SERVER['SERVER_NAME'];
 
So, after you'd be so kind to let me know which console.php file to add your code above, should I add it after the closing tags, right before them... or nested inside a certain function before the end, etc? I don't know these things yet since I'm still learning so if you could just copy/paste your file I'd appreciate it!
 
Now, if you're interested, here's my error stack trace (minus our server name). As you can see by the execution, it looks like yii freaks out in a loop through filters and can't find certain parameters to fulfill itself to move onto the next part – hence, the hunch that it's http-related:
 
2015/03/06 03:06:52 [error] [exception.CHttpException.404] exception 'CHttpException' in /zurmo/app/protected/modules/marketing/components/EmailTemplatesOrCampaignsBaseController.php:116

Stack trace:

#0 /zurmo/yii/framework/web/actions/CInlineAction.php(49): EmailTemplatesOrCampaignsBaseController->actionSendTestEmail()
#1 /zurmo/yii/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#2 /zurmo/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(Object(CInlineAction))
#3 /zurmo/yii/framework/web/filters/CFilter.php(40): CFilterChain->run()
#4 /zurmo/yii/framework/web/filters/CFilterChain.php(130): CFilter->filter(Object(CFilterChain))
#5 /zurmo/yii/framework/web/filters/CFilter.php(40): CFilterChain->run()
#6 /zurmo/yii/framework/web/filters/CFilterChain.php(130): CFilter->filter(Object(CFilterChain))
#7 /zurmo/yii/framework/web/CController.php(291): CFilterChain->run()
#8 /zurmo/yii/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#9 /zurmo/yii/framework/web/CWebApplication.php(282): CController->run('sendTestEmail')
#10 /zurmo/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('campaigns/defau...')
#11 /zurmo/yii/framework/base/CApplication.php(169): CWebApplication->processRequest()
#12 /zurmo/app/protected/core/components/WebApplication.php(88): CApplication->run()
#13 /zurmo/app/index.php(70): WebApplication->run()
#14 {main}

REQUEST_URI=/zurmo/app/index.php/campaigns/default/sendTestEmail

HTTP_REFERER=http://mysiteurl.com/zurmo/app/index.php/campaigns/default/details?id=1
Thanks,
- panda


#6 panda

panda

    Member

  • Members
  • PipPip
  • 23 posts

Posted 06 March 2015 - 09:43 AM

One more note: All of our jobLogs show "Success" but none of our campaigns and/or "Send Test Emails" are going out. So, I'm not sure if this is related to your original post but ANY help would be greatly appreciated. We've been trying to get outbound emails working for over 4 days...and yes, our settings are fine - the Administration > Email Configuration settings are the only test emails that DO actually work! Nothing else in Zurmo v3 is working related to outbound emails and its marketing module using Yii 9all our errors are Yii-related in my above code). Our crons are fine perfect, too. Sigh...



#7 Administrtr

Administrtr

    Advanced Member

  • Members
  • PipPipPip
  • 174 posts

Posted 06 March 2015 - 10:34 AM

I have seen another topic with chttpexceptions, I believe the installation of v3.0 has a couple of files missing (just a theory) so I'd recommend re-downloading the installation and reinstalling a full installation with the latest possible release (even if it's a nightly version).



#8 panda

panda

    Member

  • Members
  • PipPip
  • 23 posts

Posted 12 March 2015 - 06:09 AM

I reinstalled twice and even used the latest nightly build a third time. Still, the same problems exist as above. No campaigns get sent out either, aside from the "Send Test Email" problem, and they just sit in queue.



#9 smoral

smoral

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 15 April 2015 - 11:59 PM

Thank you everybody for the discussion. I found the same problem and could solve it. In my case, I tried to move Zurmo from another server and could not run the installation process, because the database had already data. So I didn't get a perInstance.php file. Surprisingly, Zurmo runs well with perInstanceDIST.php instead, but I haven't modified the configuration file and filling in the  

    $common_config['components']['request']['hostInfo']   and   $instanceConfig['components']['request']['hostInfo'] 


#10 Burke

Burke

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationLawrenceville, GA

Posted 08 May 2015 - 02:01 AM

experiencing the same issue  Monitor Job randomly (seemingly) gets stuck when run via cron, never seems to hang when run manually via web interface or via command line

 

this is output from our application.log  when it hangs

 

this is version 3.0

 

2015/05/06 16:25:02 [error] [exception.FailedAssertionException] exception 'FailedAssertionException' with message '$lastBean->id > 0' in /lamp/zurmo/app/protected/core/models/RedBeanModel.php:469
Stack trace:
#0 [internal function]: assertFailureInCli('/lamp/zurmo/app...', 469, '$lastBean->id >...')
#1 /lamp/zurmo/app/protected/core/models/RedBeanModel.php(469): assert('$lastBean->id >...')
#2 /lamp/zurmo/app/protected/core/models/RedBeanModel.php(3102): RedBeanModel->__construct(false, Object(RedBean_OODBBean))
#3 /lamp/zurmo/app/protected/core/models/RedBeanModel.php(3129): RedBeanModel::makeModel(Object(RedBean_OODBBean), 'JobInProcess')
#4 /lamp/zurmo/app/protected/core/models/RedBeanModel.php(254): RedBeanModel::makeModels(Array, 'JobInProcess')
#5 /lamp/zurmo/app/protected/modules/jobsManager/jobs/MonitorJob.php(148): RedBeanModel::getSubset(Object(RedBeanModelJoinTablesQueryAdapter), NULL, NULL, '(`jobinprocess`...', NULL)
#6 /lamp/zurmo/app/protected/modules/jobsManager/jobs/MonitorJob.php(82): MonitorJob::getNonMonitorJobsInProcessModels()
#7 /lamp/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(149): MonitorJob->run()
#8 /lamp/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(106): JobsManagerUtil::runMonitorJob(Object(MessageLogger), false)
#9 /lamp/zurmo/app/protected/commands/JobManagerCommand.php(120): JobsManagerUtil::runFromJobManagerCommandOrBrowser('Monitor', 300, 'MessageLogger', false, false)
#10 /lamp/zurmo/yii/framework/console/CConsoleCommandRunner.php(67): JobManagerCommand->run(Array)
#11 /lamp/zurmo/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run(Array)
#12 /lamp/zurmo/yii/framework/base/CApplication.php(169): CConsoleApplication->processRequest()
#13 /lamp/zurmo/app/protected/commands/bootstrap.php(64): CApplication->run()
#14 /lamp/zurmo/app/protected/commands/zurmoc.php(38): require_once('/lamp/zurmo/app...')
#15 /lamp/zurmo/app/protected/commands/zurmoc(4): require_once('/lamp/zurmo/app...')
#16 {main}
---






Also tagged with one or more of these keywords: JobMonitor

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users