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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Joomla Cron failing
Pages: [1]

Author Topic: Joomla Cron failing  (Read 949 times)

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Joomla Cron failing
September 15, 2014, 08:35:42 am
Hi,
We have problems getting the Cron job set up
wget -O /dev/null 'http://www.xxx.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=xxx&pass=xxx&key=xxx' > /dev/null

If I run this in a browser it runs fine (well, I get a 200 response). If I run it via the Cron job it fails
HTTP request sent, awaiting response... 401 Authorization Required Authorization failed.

Any clues as to where it's failing? Nothing is getting logged in the local error log or the CiviCRM log

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Joomla Cron failing
September 15, 2014, 11:18:30 am
Are you still using Joomla 2.5.11 and Civi 4.3.3 like your profile says?  Or are you using more recent versions of one or both?
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Joomla Cron failing
September 16, 2014, 02:31:12 am
profile updated - we're actually on J!2.5.24 and Civi 4.4.6

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Joomla Cron failing
September 16, 2014, 08:26:03 am
Ok, that's a bit odd.  There was an issue when Joomla went from 2.5.17 to 2.5.18 because they changed the password encryption.  However, that was patched in 4.4.5 (I believe), so you should be all set there.  The issue is documented at https://issues.civicrm.org/jira/browse/CRM-14208?jql=text%20~%20%22authentication%20joomla%22

Have you tried resetting the password for the cron user through the Joomla user manager?  I have had to do that before to solve this issue.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Joomla Cron failing
September 17, 2014, 03:10:53 am
Hi,
Thanks for the reply. I saw the issue with J!2.5.18. We were on Civi 4.3.something, waited until Civi 4.4.6 to do the upgrade.

I've tried resetting the password, logging on with that user, deleting the user and trying again, sync users to contacts,
I've found a 4.5 fix that needs implementing in 4.4.6 (http://forum.civicrm.org/index.php?topic=33510.0)

Still getting 401 Authorisation error on my cron job

Anyone got any other suggestions for things to try to debug this?

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Joomla Cron failing
September 23, 2014, 07:20:09 am
One step forward, one step back.

I've debugged and hacked the code and got it to the point where it runs - if I run it in a browser. At that point it processes anything that needs it, flags the job as having been run.

However.

If I run exactly the same URL in a Cron job it fails with error 401 Authorisation required
Nothing in the configandlog files. I've got other cron jobs running fine so it's not just that *all* cron jobs are failing.

Anybody know what is failing the authentication check?

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Joomla Cron failing
September 23, 2014, 07:47:03 am
Finally.

Having said I have a number of cron jobs that run OK, I compared the tasks that were actually running. Turns out the Civi one is the only one run from the administrator directory. And we've got an htaccess password protect on the administrator directory.
Although we had 'allow from localhost' in there I had to explicitly allow the server IP - lo and behold the job runs!

Time for a large gin I think

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Joomla Cron failing

This forum was archived on 2017-11-26.