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) »
  • Nonrecoverable error while running civimail.cronjob.php
Pages: [1] 2

Author Topic: Nonrecoverable error while running civimail.cronjob.php  (Read 6072 times)

kngo

  • Guest
Nonrecoverable error while running civimail.cronjob.php
December 07, 2007, 08:49:33 am
I was trying to run the cron script so my mail would be sent, but I get this when navigating to the cron script:


     Sorry. A non-recoverable error has occurred.

    Return to home page.

Error Details:
Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] =>
    [message] => not connected
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="not connected" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

When I run the script again, I get a blank page, and CiviCRM indicates that the mailing has been sent--with a 100% bounce rate (reason unknown). Can someone tell me what this means? I'm running CiviCRM 1.9.12432 on Drupal 5.3 with PHP 5.0. I'm on shared hosting (Fedora Core 4).[/code]
« Last Edit: December 07, 2007, 11:27:42 am by kngo »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Nonrecoverable error while running civimail.cronjob.php
December 09, 2007, 09:45:33 pm
Hm, this is strange; it most probably means CiviCRM can’t connect to your SMTP server. Are you sure you have it setup properly in Administer CiviCRM – i.e., that the server indicated there accepts emails from your server on the indicated port?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Nonrecoverable error while running civimail.cronjob.php
December 10, 2007, 07:52:00 pm
I think this was the same error I was getting when the  file I was changing was not the settings file being used.   I was changing smtp password in <site install directory>/sites/all/modules/civicrm/civicrm.settings.php which seemed logical to me, however, the file that I seem to be using is actually, <install directory>/sites/default/civicrm.settings.php - when I changed this last file, the test email started going out.  I'm still manually triggering the mail queue, but that is another issue.

I gather civicrm or drupal hunts  around for this file with some algorithm and I'm not sure were it should be located to be found straight away.

Anyway - tripped me up.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Nonrecoverable error while running civimail.cronjob.php
December 10, 2007, 09:35:24 pm
In Drupal 5, all configuration files should go to sites/default or sites/domain.example.com directories.

Also, we moved most of the settings (including SMTP ones) to the ‘Administer CiviCRM’ interface inside CiviCRM itself; we fall back to the settings file only if the setting is not set in the web interface.

(We actually moved most of our settings to the interface now, which should lessen the burden of changing them.)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

kngo

  • Guest
Re: Nonrecoverable error while running civimail.cronjob.php
December 19, 2007, 06:15:15 pm
Denver Dave was spot on. Thanks!

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Nonrecoverable error while running civimail.cronjob.php
December 20, 2007, 11:13:23 pm
Quote
In Drupal 5, all configuration files should go to sites/default
When run from
http://<your drupal site>/civicrm/mailing/queue?reset=1
this config file is used, however and not like I know anything about cron jobs, but the civimail.cronjob.php that is located at
<my install site>/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=user&pass=password contains the commands:
    require_once '../civicrm.config.php';
    require_once 'CRM/Core/Config.php';

Wouldn't this run the civicrm.config.php file located at:
<my install site>/sites/all/modules/civicrm/

So is the website process using the civicrm.config.php at one location and the cron job using the civicrm.config.php file at a different location?

« Last Edit: December 21, 2007, 08:23:08 am by Denver Dave »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Nonrecoverable error while running civimail.cronjob.php
December 27, 2007, 01:21:12 am
Quote from: Denver Dave on December 20, 2007, 11:13:23 pm
the civimail.cronjob.php that is located at <my install site>/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=user&pass=password contains the commands:
    require_once '../civicrm.config.php';
    require_once 'CRM/Core/Config.php';

Wouldn't this run the civicrm.config.php file located at:
<my install site>/sites/all/modules/civicrm/

Yes, it would (and it does).

Quote from: Denver Dave on December 20, 2007, 11:13:23 pm
So is the website process using the civicrm.config.php at one location and the cron job using the civicrm.config.php file at a different location?

Note that the civicrm.config.php files are the same. All the non-UI-set settings go to civicrm.settings.php file, and the location of that file is determined by civicrm.config.php based on the domain it’s being run off of (and can be overridden by a settings_location.php file).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

kenlyle

  • I post occasionally
  • **
  • Posts: 116
  • Karma: 7
Re: Nonrecoverable error while running civimail.cronjob.php
January 20, 2008, 06:01:32 am
How does this apply under Joomla?  There seems to be a gap in the documentation, where the Joomla install doc doesn't mention doing anything with civicrm.settings.php, but then if you try to activate and run CiviMail by navigating to the Cron path, you get
"Could not find valid configuration dir, best guess: /home/BLAH/public_html/com_civicrm/civicrm/../../sites"

In simple terms- what does it mean, and what's the action?

The weird thing is that this file seems to be important, but Contribute and the core Contacts functions where running fine without it, at without the one in public_html / com_civicrm / civicrm, because there is only the .sample file there.

Thanks,
Ken

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: Nonrecoverable error while running civimail.cronjob.php
January 20, 2008, 08:45:16 am

Most likely you upgraded your system and you just unrolled the tarball rather than install the component as specified in the wiki. In joomla, the installer overwrites the civicrm.config file with a joomla specific version. In my joomla install, my civicrm.config file is:

Code: [Select]
<?php

require_once '/Users/lobo/public_html/joomla-1.0.13/administrator/components/com_civicrm/civicrm.settings.php';

?>


note that you also need to run the cronjob as a url, i.e. wget http://... Please check the wiki docs for more info

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

kenlyle

  • I post occasionally
  • **
  • Posts: 116
  • Karma: 7
Re: Nonrecoverable error while running civimail.cronjob.php
January 20, 2008, 09:55:06 am
Thanks, Lobo.

I found that you meant civicrm.config.php by searching my webroot for administrator/components/com_civicrm

Yeah, I have one of those, exactly analagous to yours.

I believe that I did the install exactly as specified in the Wiki.  I have a lot of functionality working fine, including contributions, contact management, etc.

I *am* running, or trying to run, the Cron as a wget, again just like in the Wiki.

wget 'http://blah/site/com_civicrm/civicrm/bin/civimail.cronjob.php?name=user&pass=thepassword'

I am able to login to my webmail interface using these credentials and successfully send email through Horde.

I am getting an error message about /home/BLAH/public_html/com_civicrm/civicrm/../../sites, which seems to indicate that there is something that's looking for "stuff" in a Drupalesque hierarchy, which I don't have, and, therefore, failing.

I just looked at my /site/components/com_civicrm/civicrm.settings.php, and my define( 'CIVICRM_UF' , 'Joomla' ); is NOT Drupal

I believe that there is a fundamental software issue here, but there are a lot of moving parts, so user error is a distinct possibility.

I'd appreciate any further troubleshooting tips...

Thanks,
Ken

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: Nonrecoverable error while running civimail.cronjob.php
January 20, 2008, 05:05:38 pm

u should use this url instead:

wget 'http://blah/site/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=user&pass=thepassword'

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

kenlyle

  • I post occasionally
  • **
  • Posts: 116
  • Karma: 7
Re: Nonrecoverable error while running civimail.cronjob.php
January 20, 2008, 06:18:43 pm
Wow!  SO much better..."invalid username or password"

I tried, along with the password:

username
username@domain.info
username+domain.info (it's a .info domain)

I again verified that I can login to /webmail and send and receive information on this email account.

I found that there is a second civicrm.settings.php under administrator, and that putting my SMTP p/w in there has restored my ability to send TEST emails from the backend.

I just looked again at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Installation, and two questions are still vague in the instructions for setting up the Cron:

1) Is there some punctuation or something for the parameters username and password on the URL you gave me?  username+domain.tld? @?

2) Path\to\civicrm is not quite clear, given that the Joomla install instructions result in the creation of a com_civicrm in the web root.

I've left an opening, and tried to clarify, respectively, in the Wiki, and am still trying to solve my CiviMail problem.

Thanks,
Ken


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: Nonrecoverable error while running civimail.cronjob.php
January 20, 2008, 08:44:08 pm

1. the username / password is your joomla admin username/password. not your smtp credentials.

2. due to joomla directory structure etc, we create both a front end component and an admin component. For further rationale behind this structure, you might want to visit the joomla forums. Please let us know, if we can do stuff in a better / more logical manner

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

kenlyle

  • I post occasionally
  • **
  • Posts: 116
  • Karma: 7
Re: Nonrecoverable error while running civimail.cronjob.php
January 21, 2008, 05:40:41 am
Wait a minute!  I think I might know what is going on.  Joomla 1.0.13 changed the way passwords are stored.  They are (as)"salted" now, something about a random 16 digit string tacked to the hash...so you guys can't just MD5 the password anymore.

If that doesn't explain the password failure, please read on...

Quote from: Donald Lobo on January 20, 2008, 08:44:08 pm

1. the username / password is your joomla admin username/password. not your smtp credentials.

I've echoed that into the Wiki.  I have run the Cron a bunch of times, and am gettting back 200/OK from the wgets, but "ERROR: Invalid username and/or password" when using the exact username and password that I use to login to Joomla as the SuperAdmin, as a URL in Firefox.

My Cron setup in cPanel has the unfortunate side effect of exposing my u and p in the email, but I can live with that in the interests of getting this solved.

Quote from: Donald Lobo on January 20, 2008, 08:44:08 pm
2. due to joomla directory structure etc, we create both a front end component and an admin component. For further rationale behind this structure, you might want to visit the joomla forums. Please let us know, if we can do stuff in a better / more logical manner
lobo

I have seen this "two config" thing before, in Joomla and in OsCommerce, so maybe it can't be avoided.  I wouldn't be the one to know.

Some possibilities:
1a) If the files are identical, or moderately identical, can they be equated somehow by a symlink, or a require statement, or something?
1b) Can an Admin interface be constructed somehow, that inserts the values into the file(s), and keeps them in sync, as appropriate?
2a)  Add some commentary to the civicrm.settings.php file(s) AND the SMTP Global Settings screens regarding which account is to be used and any special syntax that might apply.
2b) Put a Test button next to the SMTP server field on the Global Setttings screen, so that the server address entry can be validated by PING or some other method of your devising...or just try to ping mail.domain.tld and smtp.domain.tld when the page is opened, and show the words in red or green, as a bit of a status indicator?  I have no idea what the overhead or difficulty of doing so would be.
2c) Create the wget string somewhere, maybe within a comment in the civicrm.settings.php, because you are obviously doing some substitutions into that file as part of the component install.

"If you are creating a Cron job in cPanel, you can copy the next line into the Command to run: field in under Cron Jobs in cPanel
wget BLAH&name=username&pass=password
Really, just cut and paste it, with your Joomla Admin username and password in place of username and password in the line above."

2d) Anything else that makes this easier, because it seems pretty torturous in 1.9.

Thanks,
Ken

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: Nonrecoverable error while running civimail.cronjob.php
January 21, 2008, 08:06:51 am

1. You are right with regard to 1.9, but we have fixed and account for the "salting" process in joomla in v2.0. You will have to either wait for 2.0 or try to backport the code from trunk (relevant file is CRM/Utils/System/Joomla.php, function authenticate

2. With regard to your other suggestions, please consider contributing some code and/or hiring some resources to expand and implement some/all of your ideas. Unfortunately we dont have too many joomla developer contributions which makes it a bit harder on us :(

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

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Nonrecoverable error while running civimail.cronjob.php

This forum was archived on 2017-11-26.