Page 1 of 1
plugin timeout with gearman
Posted: Fri Mar 27, 2015 7:25 am
by morabanc
Hello,
We're expecting problems with a plugin when using gearman, the services using this plugin crashed with a timeout message. In gearman worker's log appears this message: timeout (180s) hit for servicecheck.
All the others plugins are working correctly, even very similar plugins. And this plugin works correctly if I disable the gearman broker_module to use nagios.
I attach debug from gearman
Regards
Re: plugin timeout with gearman
Posted: Fri Mar 27, 2015 12:13 pm
by cmerchant
Do you have any firewall issues between the gearman worker and the oracle server? What are the similar checks, are they to the same host?
Re: plugin timeout with gearman
Posted: Mon Mar 30, 2015 1:33 am
by morabanc
There are not firewall issues, and the checks are to the same hosts.
Re: plugin timeout with gearman
Posted: Mon Mar 30, 2015 12:10 pm
by cmerchant
Your gearman worker server does not have the necessary prereqs to do perform the oracle sql query. Could you show us the check plugin script that runs from the XI server?
Re: plugin timeout with gearman
Posted: Tue Mar 31, 2015 1:29 am
by morabanc
Hello,
I attach the plugin
Regards.
Re: plugin timeout with gearman
Posted: Tue Mar 31, 2015 4:39 am
by morabanc
An update about that issue:
If line "kill_sqlplus $$ 30 ${TMP_FILE} &" is commented then script with gearman works fine.
Re: plugin timeout with gearman
Posted: Tue Mar 31, 2015 5:16 pm
by jdalrymple
It looks like this is a stateful plugin - meaning it remembers stuff from one iteration to the next. You will need to make sure this plugin is always run from the same server if you want it to output useful results.
Re: plugin timeout with gearman
Posted: Wed Apr 01, 2015 4:47 am
by morabanc
It seems "&" to execute script "kill_sqplus" is not working, this script is executed in background, and original script continue executing, but when gearman is working, script stops at this point, as kill_sqlpus is executing more than timeout configured (this is the reason why is executed in background) the "main" script crashes with a timeout.
Someone has had a similar problem? There are another way to execute a script in background?
Re: plugin timeout with gearman
Posted: Wed Apr 01, 2015 1:13 pm
by lmiltchev
You will need to make sure this plugin is always run from the same server if you want it to output useful results.
@morabanc
Is the mod gearman worker a local worker? You need to run the plugin from the same sever as jdalrymple pointed out.
It seems "&" to execute script "kill_sqplus" is not working...
Can you elaborate on this? Did you try modifying the script? Have you tried increasing the timeout?