CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Civimail cronjob not processing messages
Pages: [1] 2 3 4

Author Topic: Civimail cronjob not processing messages  (Read 12841 times)

dschafer

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 3
    • Backoffice Thinking
  • CiviCRM version: 3.2.3 - 4.4.4
  • CMS version: Drupal 6.x, 7.x, Wordpress
  • MySQL version: 5.1.x - 5.5.x
  • PHP version: 5.2.x - 5.4.x
Civimail cronjob not processing messages
September 02, 2010, 01:20:53 pm
I've seen this issues posted as upgrade related.

However we have 2 installations running 3.2.1. One was an upgrade the other a new install.

In both cases the cron job is setup on the same interval (every 10 mins).

The cron log does not report any errors.
Running the url directly does not generate any errors (just blank page).

But bulk mail jobs never start.

We have a dedicated user account for running the job. It has access CiviCRM adn access CiviMail as its only permissions.

Any ideas




Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civimail cronjob not processing messages
September 02, 2010, 01:38:25 pm

hey dave:

we introduced bootstrapping Drupal during the cron job (so we can fire hooks etc). If i had to guess, there are certain drupal configs where this fails

unfortunately it does work on our machines/servers, so figuring out why its not working is a wee bit hard

would be great if u can investigate the script and trace it. the lines of code of interest in civimail.cronjob.php is:

Code: [Select]
    // load bootstrap to call hooks                                                                                                                                   
    require_once 'CRM/Utils/System.php';
    CRM_Utils_System::loadBootStrap(  );

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dschafer

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 3
    • Backoffice Thinking
  • CiviCRM version: 3.2.3 - 4.4.4
  • CMS version: Drupal 6.x, 7.x, Wordpress
  • MySQL version: 5.1.x - 5.5.x
  • PHP version: 5.2.x - 5.4.x
Re: Civimail cronjob not processing messages
September 02, 2010, 01:44:25 pm
I'll see what I can find out.

It is definitely due to permissions. I added our mail user to the admin role and bingo, the mail started sending.



Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civimail cronjob not processing messages
September 02, 2010, 02:07:30 pm

that gives us a big clue :)

we'll investigate and follow up

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civimail cronjob not processing messages
September 03, 2010, 09:07:04 am

can you please apply this patch and see if it works for u

https://fisheye2.atlassian.com/rdiff/CiviCRM?csid=29542&u&N

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Civimail cronjob not processing messages
September 03, 2010, 12:14:59 pm
Hello dave,

Also it would be great if u apply this patch  https://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.2/CRM/Utils/System/Drupal.php?r1=29542&r2=29546

Make sure to apply first lobo's patch and then apply above patch.

Let us know if it works for you.

Thanks,
Kiran
You Are Designed To Choose... Defined By Choice.

mohrahit

  • Guest
Re: Civimail cronjob not processing messages
September 09, 2010, 06:02:05 pm
I am facing a similar problem in 3.2.3. I guess the patch above exists in 3.2.3.

civimail.cronjob.php is not processing messages. I am using the following command on the shell:
$wget --post-data='name=name&pass=pass&key=key' http://<path-to-modules>/civicrm/bin/civimail.cronjob.php

  • Civimail messages are not processed and no error is reported. The output of the script is blank.
  • I tried giving all permissions to the cron user but it leads to the queue being processed but all messages reporting hard bounces.

Any help would be really appreciated. I have no idea how to debug this... there is just no error reported!

-Mohit

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civimail cronjob not processing messages
September 09, 2010, 09:21:11 pm

can you check your mailer logs and get more details on the hard bounces? i.e. whats the cause of the hard bounce?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mohrahit

  • Guest
Re: Civimail cronjob not processing messages
September 09, 2010, 11:29:24 pm
The mailer logs show two bounces (I had 2 IDs in my mailing list) --
  • Unknown bounce type
  • Not connected


See atttachment for the actual screenshot

-Mohit

mohrahit

  • Guest
Re: Civimail cronjob not processing messages
September 09, 2010, 11:32:25 pm
Moreover, the bounce occurs at sending itself and not after CiviMailProcessor processes it. Thus, it seems a sending issue.

If you need any other logs, do let me know and I will generate those.

thanks and regards
Mohit

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Civimail cronjob not processing messages
September 10, 2010, 04:58:24 am
You need to check your mailserver (SMTP) logs, to see what’s the exact reason for the bounces.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

mohrahit

  • Guest
Re: Civimail cronjob not processing messages
September 10, 2010, 08:58:14 am
Hi All,

I debugged the permissions one-by-one. It works when I give the following three permissions to the cron user:
  • Access CiviCRM
  • Access CiviMail
  • Edit All Contacts

I dont know why do we require it to have "Edit All Contacts" permission. Any pointers would help.

-Mohit

Tony Horrocks

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 7
    • Fabriko Limited
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7
Re: Civimail cronjob not processing messages
September 20, 2010, 02:09:51 am
I hope this helps for Drupal users making cron work in Civi.

1. Make sure you have an anonymous user (user 0)
2. Add this as a file called CrmCron.php to your root directory (the one that already contains cron.php)

<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://mysite.com/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=your drupal admin name&pass=your drupal admin password &key=your site key");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
curl_close($ch);
?>
Tony Horrocks
Author of the CiviCRM CookBook https://www.packtpub.com/web-development/civicrm-cookbook

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Re: Civimail cronjob not processing messages
October 13, 2010, 07:27:03 am
I am having the exact same problem. CiviMail cron was working fine on 3.1.3 but now doesn't work on 3.2.3

We don't have the Login Destination module but do have some custom modules that do stuff with the user object on login. Unfortunately these are business critical modules which we can't disable. Do you think this could be interfering?

I already have a drupal module running the code mentioned by tonyhrx so that it hooks into the drupal cron.

I found the mail processor does run when I comment out the line:
CRM_Utils_System::loadBootStrap(  );
in civimail.cronjob.php

which seems consistent with the things Lobo mentioned above. The user for these mailings has no specific CiviCRM permissions. What exactly does the bulk mailer user need to process these via a http get request to a url like this?
/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=username&pass=password&key=sitekey"


This issue may be related to this:
http://issues.civicrm.org/jira/browse/CRM-6691

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civimail cronjob not processing messages
October 13, 2010, 10:18:53 am
If you want to run the cronjob from the cron, I recommend using the php-cli instead of the wrapper as described in the book

http://en.flossmanuals.net/CiviCRM/SystemConfiguration

Easier and more efficient than having a wrapper around a curl call ;)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1] 2 3 4
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Civimail cronjob not processing messages

This forum was archived on 2017-11-26.