Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daily cron job does not work (version 0.20 b2) #1216

Closed
demux79 opened this issue Sep 29, 2015 · 16 comments
Closed

Daily cron job does not work (version 0.20 b2) #1216

demux79 opened this issue Sep 29, 2015 · 16 comments

Comments

@demux79
Copy link

demux79 commented Sep 29, 2015

The hourly cron works fine. However, the daily cron (placed in root crontab) does not succeed.

ERROR Tue, 29 Sep 2015 23:06:50 +0200 yii\base\ErrorException:1
exception 'yii\base\ErrorException' with message 'Call to a member function getContentName() on a non-object' in /var/www/html/humhub/protected/humhub/modules/content/activities/views/mail/created.php:7 Stack trace: #0 [internal function]: yii\base\ErrorHandler->handleFatalError() #1 {main}

@daglex
Copy link

daglex commented Sep 29, 2015

Same problem

@demux79
Copy link
Author

demux79 commented Oct 1, 2015

This goes along with the error
$_SERVER = [ 'HOME' => '/var/www' 'LOGNAME' => 'www-data' 'PATH' => '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin' 'LANG' => 'en_US.UTF-8' 'SHELL' => '/bin/sh' 'PWD' => '/var/www' 'PHP_SELF' => '/var/www/html/humhub/protected/yii' 'SCRIPT_NAME' => '/var/www/html/humhub/protected/yii' 'SCRIPT_FILENAME' => '/var/www/html/humhub/protected/yii' 'PATH_TRANSLATED' => '/var/www/html/humhub/protected/yii' 'DOCUMENT_ROOT' => '' 'REQUEST_TIME_FLOAT' => 1443715201.0861 'REQUEST_TIME' => 1443715201 'argv' => [ 0 => '/var/www/html/humhub/protected/yii' 1 => 'cron/daily' ] 'argc' => 2 ]

@Havok75
Copy link

Havok75 commented Oct 2, 2015

@demux79 i have this problem

@luke-
Copy link
Contributor

luke- commented Oct 4, 2015

Can you please backup your database and run 'yii integrity/run'.

Sounds like an broken update process for a module.

@daglex
Copy link

daglex commented Oct 4, 2015

Deleting file id 1 without existing target! (yes|no) [no]:
Deleting notification id 89 without valid module! (yes|no) [no]:
Deleting mentioning 7 of non existing user! (yes|no) [no]:

and so on ...What to answer such questions? You can delete or simply enter

@demux79
Copy link
Author

demux79 commented Oct 5, 2015

It worked after deleting the inconsistencies. Is there a good way to keep inconsistencies to a minimum?

@luke-
Copy link
Contributor

luke- commented Oct 5, 2015

@demux79 Normally this shouldn't happen - can you send me the output of the command? It's possibly related to a broken module update (0.11 to 0.20) .

@demux79
Copy link
Author

demux79 commented Oct 5, 2015

There were a few inconsistencies here and there in the tables. I said yes to everything and now the cron job works fine. I do not have the output anymore. However, I started directly with 0.20. I never did an upgrade from 0.11.

@daglex
Copy link

daglex commented Oct 5, 2015

@demux79 You Daily cron job working now?

@daglex
Copy link

daglex commented Oct 5, 2015

I also said yes to everything, but daily cron job does not work.

@luke-
Copy link
Contributor

luke- commented Oct 5, 2015

@daglex Same error?

@demux79 thats interesting, which modules do you use?

@luke- luke- closed this as completed in 72d4a67 Oct 6, 2015
@daglex
Copy link

daglex commented Oct 6, 2015

Do not run

exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [] does not comply with RFC 2822, 3.6.2.' in /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:348 Stack trace: #0 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(263): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('') #1 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php(68): Swift_Mime_SimpleHeaderFactory->createMailboxHeader('To', Array) #5 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(323): Swift_Mime_SimpleHeaderSet->addMailboxHeader('To', Array) #6 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2-swiftmailer/Message.php(112): Swift_Mime_SimpleMessage->setTo('') #7 /var/www/nesterenko/data/www/humunity.ru/protected/humhub/modules/content/Events.php(164): yii\swiftmailer\Message->setTo('') #8 [internal function]: humhub\modules\content\Events::onCronRun(Object(yii\base\Event)) #9 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/base/Event.php(188): call_user_func(Array, Object(yii\base\Event)) #10 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/base/Component.php(549): yii\base\Event::trigger(Object(humhub\commands\CronController), 'daily', NULL) #11 /var/www/nesterenko/data/www/humunity.ru/protected/humhub/commands/CronController.php(56): yii\base\Component->trigger('daily') #12 [internal function]: humhub\commands\CronController->actionDaily() #13 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array) #14 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array) #15 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('daily', Array) #16 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('daily', Array) #17 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/console/Application.php(167): yii\base\Module->runAction('cron/daily', Array) #18 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/console/Application.php(143): yii\console\Application->runAction('cron/daily', Array) #19 /var/www/nesterenko/data/www/humunity.ru/protected/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request)) #20 /var/www/nesterenko/data/www/humunity.ru/protected/yii(29): yii\base\Application->run() #21 {main}

@luke-
Copy link
Contributor

luke- commented Oct 6, 2015

@daglex hmm, that's an other error... maybe some user has an invalid/empty e-mail adress or the humhub mail is invalid?

@daglex
Copy link

daglex commented Oct 6, 2015

Hourly cron works correctly

@daglex
Copy link

daglex commented Oct 6, 2015

If at least one user to the wrong address, delivery will not work?

@daglex
Copy link

daglex commented Oct 6, 2015

You're absolutely right, one of the members was an empty email address. Now cron correctly fulfilled request. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants