1

We are setup with iATS for credit/debit card and ACH transactions and are in the last stages of testing. One time card and ACH contributions are working. For the sake of testing, we are doing daily recurring contributions to make sure the mechanism works. We haven't yet tested recurring ACH. Recurring credit card transactions are going through, but with mixed results.

Issue: Within the last week, we've gotten intermittent errors during the recurring contribution scheduled job that prevents the contribution from being marked Complete in Civi. The error is "Error Fetching HTTP Headers."

Symptoms: Two transactions with through perfectly (Aug 17 12:00am; Aug 23 12:00am) and emailed automatic receipts. The other transactions, however, are processing (visible in iATS' journal and with my bank), but marked Pending (Incomplete Transaction) in Civi. The Civi source reads: iATS Payments Recurring Contribution (id=2) Unexpected Server Error, please see your logs. Emails for these Pending transactions did not send.

Details:

In the Job Log for iatsrecurringcontributions: The job last night started at 2016-08-24 00:00:04 and then finished at 2016-08-24 00:01:07 with these details:

Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}

Full message: Finished execution of iATS Payments Recurring Contributions with result: Success (1 contribution record(s) were processed.

Failed to process recurring contribution id 2: Unexpected Server Error, please see your logs Created activity record for contact id 203)

In looking at the Drupal logs, I have two relevant records for last night's Pending (Incomplete Transaction), an error and a notice, both from hostname 127.0.0.1.

The error:

SoapFault: SoapFault Object (
[message:protected] => Error Fetching http headers
[...a long list of arrays detailing the transaction, our iATS information, API calls and drush commands]
[previous:Exception:private] => 
[faultstring] => Error Fetching http headers
[faultcode] => HTTP
)

The notice:

Raw Response:
HEADER:
BODY:
BODYEND:

Attempted Resolution: From initial searches in Stackexchange and Google at large, it might be a server setting, perhaps? After a couple days of trouble initially, I increased two settings in my /etc/my.cnf file just to test and then restarted httpd and nginx:

max_allowed_packet = 128M (was 16M)
wait_timeout = 300 (was 60)

Since I still had the issue last night, it must be something else. Any ideas on how to resolve the "Error Fetching http headers"?

Civi 4.6.14 (will be updating to 4.6.20 before go-live); Drupal 7.44; iATS Payments extension 1.5.3; CentOS Linux 7.2.1511; Plesk 12.5.3; PHP 5.6.24 on website; PHP 5.4.16 on command line; nginx 1.11.1; Apache 2.4.6

1 Answer 1

2

Sorry - we've not seen this (yet) - best to post an issue on our GitHub queue: https://github.com/iATSPayments/com.iatspayments.civicrm - so that both Alan and myself as well as iATS staff sees this.

Perhaps the automatic ones are not run as -u your webuser but as another user - different env - different drush?

My favourite/most stable/like clockwork (no drift) way to run the recurring contributions job is:

to switch it OFF in the scheduled jobs GUI

and then to:

apache crontab for drupal/civicrm:

0 2 * * * /usr/bin/php /usr/local/bin/drush.php --root='/var/www/platform/site/' --uri='https://site.org' -u 1 civicrm-api job.iatsrecurringcontributions auth=0 -y

and then run the scheduled jobs that are switched ON:

3 * * * * /usr/bin/php /usr/local/bin/drush.php --root='/var/www/platform/site/' --uri='https://site.org' -u 1 civicrm-api job.execute auth=0 -y

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.