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) »
  • Debug steps / troubleshooting tutorial for mass mailings
Pages: [1]

Author Topic: Debug steps / troubleshooting tutorial for mass mailings  (Read 1015 times)

joejordan

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress
  • MySQL version: mysql Ver 14.14 Distrib 5.1.54
  • PHP version: PHP 5.3.5-1ubuntu7.4
Debug steps / troubleshooting tutorial for mass mailings
May 14, 2012, 06:43:48 am
I'm having a real problem getting any useful errors out of civimail.

I've set up our existing contact database, and I have three groups which I'd like to use as mailing lists. I've also set up all the stuff I can find about from addresses, bounce handling accounts, etc.

For the purposes of this test, i've set up a fourth group with only myself in, created an email using the default template and tried to send.

I've successfully triggered the cron job by various means, i.e. I've got the mailing to go from status "Scheduled" to "Running." However, it only has one recipient (me) and it's taken over half an hour now. Apache log is empty, I can't seem to run the cron.php script from the CLI without some kind of authentication so I can't see the stdout, etc etc.

First question is really this: Is there a step-by-step tutorial about how to debug this problem?

Second also: does anyone have any suggestions for common problems here, that might allow me to cut to the chase quicker?

For a bit more context, this is running inside wordpress (which can and does send emails fine) and it's hosted on an ubuntu VPS.

Thanks,

Joe

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: Debug steps / troubleshooting tutorial for mass mailings
May 14, 2012, 08:53:07 am

1. Check: http://book.civicrm.org/developer/ Not exactly what u want but gives you more insight into developing/debugging CiviCRM

2. Can you try sending the email with:

q=civicrm/mailing/queue&reset=1

and see if that fires and sends the email. That way you know if its a cron issue or a civimail issue

You can ping us on IRC if u need help figuring things out

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

joejordan

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress
  • MySQL version: mysql Ver 14.14 Distrib 5.1.54
  • PHP version: PHP 5.3.5-1ubuntu7.4
Re: Debug steps / troubleshooting tutorial for mass mailings
May 17, 2012, 07:07:30 am
To clarify - I've got the mailings from "scheduled" to "running" by using the queue reset URL; it is just sitting there not sending the mail though.

I'll take a look at the developer documentation and see what I can make of it.

Apologies for long gap(s) between replies; I am a volunteer working around other commitments!

Thanks,

Joe

joejordan

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress
  • MySQL version: mysql Ver 14.14 Distrib 5.1.54
  • PHP version: PHP 5.3.5-1ubuntu7.4
Re: Debug steps / troubleshooting tutorial for mass mailings
May 20, 2012, 07:12:21 am
OK, now having fun trying to get the CLI to work from a cron job (I still can't send email, but I'm working through the setup tasks in order (again) to check everything is in place).

when I run the CLI using a (cron-triggered or manually run) script as www-data like this:

Code: [Select]
#!/bin/bash

# This must be set to the directory where civicrm is installed.
CIVI_ROOT=/var/.../civicrm/civicrm/

# nice -19 forces to run at a lower priority than the web server
PHP="nice -n19 /usr/bin/php"

# like this: PARAMS= -j -s<default or domain> -u<user> -p<password> -e Job -a process_mailing
PARAMS="-j -sdefault -u<real working user> -p<real working password> -e Job -a process_mailing"

cd $CIVI_ROOT
$PHP bin/cli.php $PARAMS

I get the following error:

Code: [Select]
PHP Notice:  Undefined variable: value in /var/.../civicrm/civicrm/bin/cli.php on line 130
PHP Notice:  Undefined variable: value in /var/.../civicrm/civicrm/bin/cli.php on line 130
PHP Notice:  Undefined variable: value in /var/.../civicrm/civicrm/bin/cli.php on line 130
Failed to bootstrap CMS

so, this (line 130) is the part of bin/cli.php where you parse the options, and it's crashing - so something's up with my script in the way it's formatting the options? I've removed any double-spaces and fixed any mistakes I can see.

I'll pop onto IRC to see if anyone's about to help me sort this out, as well as posting here.

Note that it would be a lot more helpful if bin/cli.php posted info about available options when you run it with no arguments, rather than "Failed to bootstrap CMS"...

Thanks,

Joe
« Last Edit: May 20, 2012, 07:42:22 am by joejordan »

joejordan

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress
  • MySQL version: mysql Ver 14.14 Distrib 5.1.54
  • PHP version: PHP 5.3.5-1ubuntu7.4
Re: Debug steps / troubleshooting tutorial for mass mailings
May 22, 2012, 03:00:01 pm
OK, I don't necessarily need to get the cron job working urgently, just the mass mailing functionality itself.

In this vein, I've got myself to CRM_Mailing_BAO_Mailing::processQueue (CRM/Mailing/BAO/Mailing.php line 2293), and I can see plenty of debug messages scattered throughout the code - great! It would be good to see the output of those in a log file somewhere.

Do I need to turn on manual debugging somewhere, so I can see this log file? I can't seem to see anything in the Reporting functionality, which is where following the code leads me (it says 'no results' when I try and view a 'mailing summary' report.)

joejordan

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress
  • MySQL version: mysql Ver 14.14 Distrib 5.1.54
  • PHP version: PHP 5.3.5-1ubuntu7.4
Re: Debug steps / troubleshooting tutorial for mass mailings
May 23, 2012, 04:34:55 am
OK, I can see the problem (but not the cause..)

-> no entry is created in the civicrm_mailing_event_queue table (not when I create / schedule / "send immidiately" the job, and seemingly nor when the schduled job runs.) When the big query is run in CRM_Mailing_BAO_Job::deliver(), it gets no results because this table has (one, old) entry in. it calls the code with a job id like 21, when there is only one entry in there which is id=5.

My next port of call is to try and find the code that INSERTs into the civicrm_mailing_event_queue table, to see why my jobs aren't being scheduled properly - as always, any suggestions appreciated.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Debug steps / troubleshooting tutorial for mass mailings

This forum was archived on 2017-11-26.