Page 1 of 1

Mod-Gearman Init Script

Posted: Wed Dec 13, 2017 5:21 am
by andyb4u
Hi,

We have integrated Mod-Gearman with Nagios XI as per the steps found here: https://support.nagios.com/kb/article.php?id=225

We've noticed an issue with /etc/init.d/gearmand script. It isn't creating the /var/run/gearmand folder and therefore the pidfile (/var/run/gearmand/gearmand.pid) cannot be created.

Has anyone else seen that before?

I was able to workaround it by amending the script to create the folder but I'm not sure if that is the proper way to do it.

I've attached the original gearmand and my amended version.

Regards,
Andy

Re: Mod-Gearman Init Script

Posted: Wed Dec 13, 2017 12:34 pm
by kyang
What OS and version are you on?

When you started the gearmand service, you still saw no pid file created? correct?

Is this what you tried? If not, try these commands again in this order.

Code: Select all

service nagios stop
service gearmand stop

Code: Select all

service gearmand start
service nagios start
After that, what's the status of gearmand?

Code: Select all

service gearmand status
When you amended the script to create a folder, did Mod gearman work with a pid created?

Re: Mod-Gearman Init Script

Posted: Thu Dec 14, 2017 4:40 am
by andyb4u
Hi,
What OS and version are you on?
Nagios XI Version : 5.4.11
Red Hat Enterprise Linux Server release 7.4


Code: Select all

When you started the gearmand service, you still saw no pid file created? correct?
Correct. When I started the gearmand service using the original init script no pid file was created.

Results of running the following commands with the original init script

Code: Select all

service nagios stop
service gearmand stop
service gearmand status
Gearmand Status.JPG
When you amended the script to create a folder, did Mod gearman work with a pid created?
Yes, Mod Gearman shows its status as running and a pid is created:
Gearmand Status Working.JPG

Re: Mod-Gearman Init Script

Posted: Thu Dec 14, 2017 1:14 pm
by kyang
I'll have to see if I can recreate this.

But if that worked for you then that's good!