Page 1 of 2
NMS / CGJobMgr stuck on "starting"
Posted: Wed Jan 08, 2014 8:42 pm
by juliensos
I'm using newsletter made simple and when I create and start a job, it just gets stuck on the "starting" status. This is just sending to one email for testing. I have also tested the mailer and it works. I have used the url provided by CGJobMgr to manually activate the jobs which does change the status to "error" and I set it so that it emails me the error. Here is what I get:
=========
A CGJobMgr Job has terminated
You are receiving this notification to inform you of a job that has terminated with an important status.
Job Name: NMS - Job created at: 01/08/14 15:19:04
Job Id: 18
Job Owner: 1
Job Status: error
Job Started At: 01/08/14 15:19:48
Job Finished At: 01/08/14 15:19:49
Message: Invalid function specification
You are advised to login to the admin interface on your site to review the error log.
=========
Nothing gets written in the error log or mail log. I`m using the latest version of cmsms and the modules. On php 5.3.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 12:32 am
by applejack
Provide much more info and also test using a very basic NMS template as well as checking that the servers mail and CMS modules mailer preferences are configured correctly.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 3:25 am
by JohnnyB
test using a very basic NMS template
This is important because a Smarty error in the template will fail the delivery. I once forgot to wrap my inline CSS with {literal}...{/literal} and realized a day later what I did wrong...
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 2:39 pm
by juliensos
I tested using the default template:
<__html>
</__body>
{nms_content name='content' prompt='HTML Content'}
<__body>
</__html>
I tested the CMSMailer and the email went through without any issues. What other information do I need to provide?
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 4:40 pm
by applejack
The template which failed might be a good starting point. Also have you tried the failed template with just a single word for the content? , if not do so.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 4:42 pm
by JohnnyB
What other information do I need to provide?
Is there anything in your email message (HTML Content) that could trigger an error? Like Javascript or Smarty tags?
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 4:45 pm
by juliensos
No JS or Smart. Just the word "test".
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 5:19 pm
by juliensos
I commented out the code that catches the error so that the real error gets written to the error_log. I don't know if this helps or not but this is the error that was written:
mod_fcgid: stderr: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'nms_process_job' not found in /var/www/vhosts/*domain*/httpdocs/dev/modules/CGJobMgr/lib/class.cgjobmgr_simpletask.php on line 55, referer: *url*/dev/admin/moduleinterface.php?_sx_=3ef959f0&module=CGJobMgr
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 6:01 pm
by Dr.CSS
Did you set up the cron job..?
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 6:14 pm
by JohnnyB
Paste your System Information found under Site Admin. There is a link in the upper, right to get a text only view.
I have a feeling it is just a PHP configuration, or compatibility, or error_reporting issue.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 6:17 pm
by applejack
If it works sending via the minimal template then it is likely that the error lies somewhere in the other template so I suggest you de-construct it then re-construct part by part.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 6:37 pm
by juliensos
It does NOT work with the minimal template.
Here is the info requested:
----------------------------------------------
Cms Version: 1.11.9
Installed Modules:
CMSMailer: 5.2.2
FileManager: 1.4.3
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.14.1
Printing: 1.0.4
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FCKeditorX: 1.1.0
CGExtensions: 1.38.1
NMS: 2.7.4
CGFeedMaker: 1.0.17
CMSPrinting: 1.0.5
MicroTiny: 1.2.5
CGJobMgr: 1.3.1
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 128000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: false
Php Information:
phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 128M
session_save_path: /var/lib/php/session (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.95
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
----------------------------------------------
Re: NMS / CGJobMgr stuck on "starting"
Posted: Thu Jan 09, 2014 8:38 pm
by JohnnyB
I don't see any big red flags. But I do see something worth changing.
Php Information:
phpversion: 5.3.3
max_execution_time: 60
PHP 5.3: should be at the most current 5.3 release which is 5.3.28. The big reason for this is there is a security issue with other 5.3 releases.
Max Execution: I always increase this from the PHP's default for CMSMS sites. I would try max_execution_time: 120
As far as the NMS and CGJobMgr error, is it possible to uninstall and remove both modules from the server and then install again? It is possible there was something buggy.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Fri Jan 10, 2014 2:51 pm
by juliensos
I deleted both modules and re-installed. Tried to run a job with the sample template and I still got the exact same results.
Re: NMS / CGJobMgr stuck on "starting"
Posted: Fri Jan 10, 2014 3:10 pm
by JohnnyB
Here's more to try/test:
1) Create a new Layout Template that will process the jobs. Make it very minimal, e.g.,
Code: Select all
{process_pagedata}
<!doctype html>
<__html lang="en">
<head>
{metadata}
</head>
</__body>
{content}
<__body>
</__html>
2) Create a new content page that will process the jobs. Be sure to disable caching, keep it active, but you probably don't want it in the menu. Disable the WYSIWYG editor for this page. And, instead of actual content, just use a smarty comment like {* empty page *}
Assign it your new template from step 1.
3) Select that the page under "Default Page for Processing" option of the the CGJobMgr Settings.
4) Be sure your default home page does not redirect to another page or to another URL. This may also stop the job from processing...
5) Add the following to your config.php:
$config['debug'] = 'TRUE';
$config['debug_to_log'] = 'TRUE';
The first one will print debug statements in the backend and may ask you to continue as you submit pages and such in the backend. The second will print to a log under the /tmp/cache/ directory.
6) Create a new job in NMS, start the job, then go to cgjobmgr and trigger the job using the link provided under settings.
Then, if it continues to fail, there may be useful debug info on the actual admin page and in the debug log file that can help.