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 »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • 4.4.3 Cron Job Fails: Invalid username and/or password
Pages: [1] 2 3

Author Topic: 4.4.3 Cron Job Fails: Invalid username and/or password  (Read 9378 times)

conductorchris

  • I post frequently
  • ***
  • Posts: 167
  • Karma: 9
    • Vermont Rail Action Network
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 3.2.7
  • MySQL version: 5.5.32
  • PHP version: 5.3.26
4.4.3 Cron Job Fails: Invalid username and/or password
December 27, 2013, 06:04:09 pm
After upgrade to 4.4.3 (from 3.4.7) on Joomla 3.2.0, I can't get the cron job working, getting an "ERROR: Invalid username and/or password."

I have set a separate Joomla user just for cron jobs.  For the purposes of this debugging I set it as a super administrator (not my intention to keep it so).  I verified that this user can log into Joomla and access civiCRM and make changes.

I have had somebody else look at the cronjob code and they didn't spot anything wrong with the username/password.  There are no special characters, only letters and numbers.

When the cron job failed and emailed an error, I tried running  in the browser and also got an error running http://<site urs>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=<cron user name>&<cron user password&<site key>.  The cron job I set up does have this text enclosed with '   ', but the browser won't run that way.

I modified the permissions of  <site root>/administrator/components/com_civicrm/civicrm/bin/cli.php to 755, but this made no difference.

The "execute now" option appears to work (or fails silently -- I haven't tested it in any depth).  It is enabled.

Thank you for your help regarding what I might be doing wrong.

Christopher

PS - Is there any documentation that describes the minimum permissions a cron job only user needs? (this is the one cron that rules them all, calling all scheduled jobs).  I'm a bit twitchy about the security of putting this username and password into a plain text cron file on the server available for anyone who hacks in.
« Last Edit: December 27, 2013, 06:30:28 pm by conductorchris »
Thanks to those who help create and enhance civiCRM!

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
December 28, 2013, 06:10:40 am
when you run it via the browser, do you get the same authentication error?
in your url, the password should be passed with pass=[password value]
(in your example, you have the password with no variable term)
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

conductorchris

  • I post frequently
  • ***
  • Posts: 167
  • Karma: 9
    • Vermont Rail Action Network
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 3.2.7
  • MySQL version: 5.5.32
  • PHP version: 5.3.26
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
December 28, 2013, 07:16:30 am
Yes, I get the same error in the browser.

Yes, the password is passed in the form pass=[password value] - just a typo in stripping out the value to post here.

Thanks
Thanks to those who help create and enhance civiCRM!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
December 28, 2013, 11:26:33 am
Quote from: conductorchris on December 27, 2013, 06:04:09 pm
PS - Is there any documentation that describes the minimum permissions a cron job only user needs? (this is the one cron that rules them all, calling all scheduled jobs).  I'm a bit twitchy about the security of putting this username and password into a plain text cron file on the server available for anyone who hacks in.

Anyone smart (and devious) enough to hack into your server is also smart enough to know that he now has full access to your entire database also--he won't be poking around for cron jobs to get into your site. :)

CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

dflorence

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: joomla 2.5 and testing 3.2.1
  • MySQL version: 5.1.69
  • PHP version: 5.3.3
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
January 03, 2014, 11:49:23 am
Hi Conductor Chris,

When you say "After upgrade to 4.4.3 (from 3.4.7) on Joomla 3.2.0, I can't get the cron job working", does this mean that your cron job WAS working with Civi 3.4.7 on Joomla 3.2.0?  - i.e. that CiviCRM 3.4.7. works OK with Joomla 3.2?

Dave

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
January 10, 2014, 11:23:48 am
Having the same issue with a different setup.  Upgraded to 4.4.0 on a WordPress install, from somewhere around the 3.4.7 version, though I can't confirm that particular one.   Upgrading to 4.4.3 did not resolve the issue.  Cron jobs run fine from the web page when logged in as the cron user, however, using any kind of automated process does not work.  (Php-cli or pasting the curl/wget address in a browser all give the Invalid username and/or password error.)  Cron worked perfectly, as evidenced by the 15 minute consistent logs until the 4.4.0 upgrade.  Any more ideas with this?

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
January 10, 2014, 11:30:04 am
And just for completeness, I've tried running the cron job as different users, all of whom are admins.  I've also changed the password, resaved the role info, rebooted, and other such monkeyness.  Username, password and site keys are all valid and URL safe.

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
January 13, 2014, 07:53:45 am
Curl method worked!   :o  However, only if I create the separate data file.   :'( 

Half way down the page of:  https://wiki.civicrm.org/confluence/display/CRMDOC/Running+Command-line+Scripts+via+URL, you'll find a section called:  EXAMPLE: Use curl to send queued CiviMail mailings (Drupal installation)   Side note:  I'm running on CentOS and WP.

Using that example I was able to run the cron job from the command line.  Dropping the job= piece ran all of the scheduled cron jobs and logged the jobs.

All other tests have failed to pass the username/password correctly and given a failed login error message.  The site key is passing correctly, as evidenced by purposely messing up the site key and receiving the appropriate error.

michael23

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.6.2
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.6.23
  • PHP version: 5.5.22
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
February 10, 2014, 10:57:34 pm
I had cron jobs working in 4.4.3. Since upgrading to 4.4.4, it now fails with the invalid username/password error. What's going on?

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
February 11, 2014, 06:43:00 am
did you upgrade Joomla to 2.5.18 at the same time?
there are some changes in the authentication method in 2.5.18 and I think that's what is causing the problem. I'm researching.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
February 11, 2014, 08:14:05 pm
please try this patch:

https://github.com/civicrm/civicrm-core/pull/2512
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

michael23

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.6.2
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.6.23
  • PHP version: 5.5.22
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
February 11, 2014, 10:37:43 pm
Quote from: lcdweb on February 11, 2014, 06:43:00 am
did you upgrade Joomla to 2.5.18 at the same time?
there are some changes in the authentication method in 2.5.18 and I think that's what is causing the problem. I'm researching.

Yes I upgraded to 2.5.18 before applying the new CiviCRM update.

Quote from: lcdweb on February 11, 2014, 08:14:05 pm
please try this patch:

https://github.com/civicrm/civicrm-core/pull/2512

Thank you very much! This appears to work when running the crob job URL from a web browser. I assume it will work when invoked by cron. Will let you know otherwise.

zouz747

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Joomla 2.5.18
  • MySQL version: 5.5.31
  • PHP version: 5.3.10-1ubuntu3.6
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
February 14, 2014, 02:47:59 am
Also fixes the issue with the php cli method.
Many thanks

bighudsonnut

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 2
    • Hudson Essex Terraplane Club site
  • CiviCRM version: 4.6.3
  • CMS version: Joomla 3.4.1
  • MySQL version: 5.5.42
  • PHP version: 5.5.23
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
February 27, 2014, 03:18:09 pm
lcdweb, thank you so much!  This fixed my problem as well.  Thank God you know how to code.  I just carefully pasted your code in, might as well have been in swahili.  And poof my cli.php works.  Please make sure it goes into CiviCRM 4.4.5
« Last Edit: March 01, 2014, 08:02:15 am by bighudsonnut »

globeseek

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 0
Re: 4.4.3 Cron Job Fails: Invalid username and/or password
March 31, 2014, 09:09:54 pm
I am having the same issue -- I get the invalid Username / Password when I try using it at the URL level
when I replace the 3 files with with the 3 in the answer above - I get returned a blank screen and when I check the back end the jobs have not been run
Joomla! version, 3.2.3.  Powered by CiviCRM 4.4.4.

thoughts

Pages: [1] 2 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • 4.4.3 Cron Job Fails: Invalid username and/or password

This forum was archived on 2017-11-26.