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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • 4.2.2 Fatal error in bounce processing
Pages: [1]

Author Topic: 4.2.2 Fatal error in bounce processing  (Read 3937 times)

charlie

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.5.8 (testing 4.6.2)
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.27
  • PHP version: 5.3.28
4.2.2 Fatal error in bounce processing
October 06, 2012, 12:34:37 pm
I have a fresh install of 4.2.2 on Drupal 7.15; added three records for testing purposes, one with an intentionally mangled email address. CiviMail bulk mailing processing works fine, and the bad address bounces as expected to the bounce processing address (a Gmail account set up for this purpose).

Running Fetch Bounces via the "execute now" method from the Scheduled Jobs screen yields this message in the Jobs Log:

Finished execution of Fetch Bounces with result: Failure, Error message: A fatal error was triggered.

The frustrating thing is there are no additional diagnostic messages to be found, either in the Apache error log, the PHP logs, or in files/civicrm/ConfigAndLog -- and this is with debug enabled.  I've no clue about the cause of the fatality.

I've tried running the Fetch Bounces job using the PHP command line method and the URL method.  In both cases the command returns silently, with nothing logged anywhere.  I have a sense that the job is failing early in the process; it does not appear that Gmail bounce account is ever opened.  I have a mirror 4.2.2 implementation set up on a test server and bounce processing works fine, so the main difference is the hosting provider (BlueHost).

Any suggestions for diagnosing this symptom would be much appreciated.

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: 4.2.2 Fatal error in bounce processing
October 07, 2012, 08:46:35 am

is this related to your issue:

http://forum.civicrm.org/index.php/topic,26323.msg111422.html#msg111422

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

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 02:47:38 am
I have exactly the same problem in Civicrm 4.2.0, working with a local e-mail account (tried IMAP and Maildir but that makes no difference).
I don't know how to give more info, because as the topic starter states, you don't get any extra debug info.
Could be helpful also if people would show the way to get more debug info or if you need to know what server software/installation info you need, please ask.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 03:53:10 am
Hey Stijn,

Have you enabled debug+traceback?

When debugging, I tend to run the jobs from the command line, and be sure I display all the E_NOTICE and all, so can see what's wrong.

Running from the cli allows to easily re-run if you start putting debug (print_r...) statements in the chain of call

If doing it on a local dev, I have xdebug enabled, tend to make things easier to read too

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

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 06:00:33 am
Oops I didn't have the logging enabled but doing that doesn't make me much wiser though.
I get an error logged:
Quote
Warning: mkdir(): Permission denied in CRM_Mailing_MailStore->maildir() (line 151 of /var/www/xxx/public/sites/all/modules/civicrm/CRM/Mailing/MailStore.php).
I did check the permissions for the folder (applied this and even tried to set permissions to 777 - owner www-data.www-data
How do I run 'fetch bounce'  cron job from the command line?
Thank you for helping out.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 06:41:32 am

Check out this doc:
http://wiki.civicrm.org/confluence/display/CRMDOC42/CiviMail+Installation#CiviMailInstallation-FromaCLICommandLine

Code: [Select]
$php bin/cli.php  -j -sdefault -umailprocess -pseol-lzprm42amv-psyc  -e Job -a fetch_bounces

print the complete path of the folder it tries to create, might be that something isn't configured properly and it tries to create it in the wrong place.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 06:54:16 am
Thank you Xavier, I'm learning.
Now when I do that I get an error
Quote
Jobs called from cli.php require valid user as parameter
which make me doubt about my user setup. I always thought that the use I had to define here was a Drupal user not a Linux user. Is that correct?
So in the example 'umailprocess' is a Drupal user?
Could it have to do with the fact that the user I use for the database is a separate 'mysql_website' user which only has permission to use the database but is not part of the www-data group or owns any other rights?

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 07:24:47 am
I re-ran the job but add -u and -p and it ran without error in php cli.
Also in the Schduled jobs log I find:
Quote
Finished execution of Bounces fetcher with result: Success (a:0:{})
Also I see the right folders are created now.  :)
But now no mails are processed. They are also not in Civimail.ignored.

Now I see in the Drupal logs following errors:
Quote
Location   http://sitename.org/../all/modules/civicrm/bin/cli.php?../all/modules/civicrm/bin/cli.php
does that look normal? The error:
Quote
Notice: Undefined index: REQUEST_METHOD in drupal_page_is_cacheable() (line 1077 of /var/www/xxx/public/includes/bootstrap.inc).
(twice) and then
Quote
Notice: Undefined index: SERVER_SOFTWARE in require_once() (line 13 of /var/www/ceo/public/includes/mail.inc).
.
I don't know whether that is related.

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: 4.2.2 Fatal error in bounce processing
October 08, 2012, 08:05:25 am

Those are notices and should not effect execution of the script

can u make sure your machine can access the imap port of your mail server. Someone else reported that was causing the issue and hence abort of the script. not sure why this does not percolate back to the screen / error message

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

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 08:10:57 am
Thak you Lobo, but the web installation and mail server are on the same machine so I suppose it is not a ports issue. Is there a way I can check it from the civicrm installation? I'm pretty sure the mail account as such is set up right: I receive the bounce messages in the account, I can access the account from my mail client, they do contain a line
Quote
X-CiviMail-Bounce: newsletter+b.41.22389.blabla@xxx.org
« Last Edit: October 08, 2012, 08:16:05 am by Stijn | Yichalal »

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: 4.2.2 Fatal error in bounce processing
October 08, 2012, 08:16:15 am

i would verify that it is not a ports issue before assuming it :)

i dont think u can check this within civi, but would be a good addition to add to the script (i.e. a flag to check for mail account validity etc)

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

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 08:55:07 am
OK. I suppose I should find a notice in the system logs of the IMAP user trying to login but I don't.
I do have a rule in iptables though that all lo traffic should be accepted...

Stijn | Yichalal

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: MySQL version 5.1.66
  • PHP version: 5.3.3-7+squeeze15
Re: 4.2.2 Fatal error in bounce processing
October 08, 2012, 09:00:24 am
Also worth noting is that it does work in php-cli (well I see a succes in the logs and the command itself doesn't give any errors), but when executing from the scheduled jobs page I still get the same Fatal error message.

Modify: it actually seems it didn't work from php-cli and that we got  this working by removing the 'Mail to Activity' mail account and setting the bounce processing account to POP3, though IMAP should work to.   
« Last Edit: January 08, 2013, 02:19:58 am by Stijn | Yichalal »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • 4.2.2 Fatal error in bounce processing

This forum was archived on 2017-11-26.