I have one issue in TTR/TTO notifications. I schedule cron.php but it is not working. I am using Ubuntu CLI.
but in Ubuntu GUI same this is working fine.
Please help me out.
Regards
Arvind
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I install itop on ubuntu cli 10.04. everything is working fine. but TTR/TTO notification is not working.
Firstly i run this cmd:- php -q /var/www/web/webservices/cron.php -auth_user=admin -auth_pwd=athenta
But no output.
After that i schedule the cron.php via crontab
* * * * * /usr/bin/php /var/www/web/webservices/cron.php -param_file=/var/www/web/webservices/cron.params
It run only first time.
But after that it is not working.
Note:- our time zone is Africa/Nairobi
Regards
Arvind
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Status is not changing to escalated tto/ttr that's why there is no TTR/TTO notification.
e.g. I create 1 ticket and there is 15 min escalation time to TTO. but after 15 min status still the same.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The query SELECT IS_FREE_LOCK('itop.cron.php') is used to make sure that there is just one instance of cron.php running at a given point of time. The process is then supposed to release the lock before dying using the query SELECT RELEASE_LOCK('itop.cron.php').
The idea is that cron.php is allowed to run for a given period of time (cron_max_execution_time in the config) and will be respawned after that time to cleanup PHP's memory leaks. During that period cron may try to create other instances of cron.php. Such instances will terminate immediately saying "Another instance is already running…". So depending on the value of "cron_max_execution_time" and the interval you set for the cron to run, it's normal to see a number of "Another instance is already running" in the output/log of the cron. Finally the new process will take over after first instance of cron.php has terminated its job properly.
It's definitely not easy to implement a robust and portable mutex mechanism in PHP… if anyone has a better idea, just let me know.
- Denis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear All,
I have one issue in TTR/TTO notifications. I schedule cron.php but it is not working. I am using Ubuntu CLI.
but in Ubuntu GUI same this is working fine.
Please help me out.
Regards
Arvind
Hi Arvind,
Could you be more specific about what is not working ? What is the symptom ?
HI Dflaven,
I install itop on ubuntu cli 10.04. everything is working fine. but TTR/TTO notification is not working.
Firstly i run this cmd:- php -q /var/www/web/webservices/cron.php -auth_user=admin -auth_pwd=athenta
But no output.
After that i schedule the cron.php via crontab
* * * * * /usr/bin/php /var/www/web/webservices/cron.php -param_file=/var/www/web/webservices/cron.params
It run only first time.
But after that it is not working.
Note:- our time zone is Africa/Nairobi
Regards
Arvind
one more thing..
Status is not changing to escalated tto/ttr that's why there is no TTR/TTO notification.
e.g. I create 1 ticket and there is 15 min escalation time to TTO. but after 15 min status still the same.
No output: it's normal, by default the script is "silent", try to launch it with the -verbose option to get more information.
command output….
root@ubuntu# php -q /var/www/web/webservices/cron.php -auth_user=admin -auth_pwd=athenta -verbose
Starting: 1311928147
Already running…
Exiting: 1311928148
Just in case someone is interested.
cron.php is locking the db during cron.php run.
SELECT IS_FREE_LOCK("itop.cron.php");
I tried SELECT RELEASE_LOCK("itop.cron.php"); without success.
Restarting the DB fixed the problem of the output "Already running…"
But as already mentioned, this is fixing the problem just for the first run of cron.php.
I`m not sure whats wrong here.
Any hints?
@johndoe,
The query SELECT IS_FREE_LOCK('itop.cron.php') is used to make sure that there is just one instance of cron.php running at a given point of time. The process is then supposed to release the lock before dying using the query SELECT RELEASE_LOCK('itop.cron.php').
The idea is that cron.php is allowed to run for a given period of time (cron_max_execution_time in the config) and will be respawned after that time to cleanup PHP's memory leaks. During that period cron may try to create other instances of cron.php. Such instances will terminate immediately saying "Another instance is already running…". So depending on the value of "cron_max_execution_time" and the interval you set for the cron to run, it's normal to see a number of "Another instance is already running" in the output/log of the cron. Finally the new process will take over after first instance of cron.php has terminated its job properly.
It's definitely not easy to implement a robust and portable mutex mechanism in PHP… if anyone has a better idea, just let me know.
- Denis
use php-cli command instead php -q or php