Nagios - Mod Gearman

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aceadm
Posts: 23
Joined: Thu Jun 11, 2020 8:13 am

Nagios - Mod Gearman

Post by aceadm »

Hello,
Anyone knows or has any good installation and configuration guide for a mod gearman implementation?
The one in Consol Lab is quite old.

Thanks
aceadm
Posts: 23
Joined: Thu Jun 11, 2020 8:13 am

Re: Nagios - Mod Gearman

Post by aceadm »

SO, I found the below guide:
https://assets.nagios.com/downloads/nag ... ios_XI.pdf

Unfortunately, whenever I install Mod_gearman, I get below error in the end and I can't stop/start it.

Restarting gearmand (via systemctl): Job for gearmand.service failed because a configured resource limit was exceeded. See "systemctl status gearmand.service" and "journalctl -xe" for details.
[FAILED]
Redirecting to /bin/systemctl restart nagios.service
gearmand.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig gearmand on
Redirecting to /bin/systemctl restart mod-gearman-worker.service


Any clues guys?
aceadm
Posts: 23
Joined: Thu Jun 11, 2020 8:13 am

Re: Nagios - Mod Gearman

Post by aceadm »

aceadm wrote:SO, I found the below guide:
https://assets.nagios.com/downloads/nag ... ios_XI.pdf

Unfortunately, whenever I install Mod_gearman, I get below error in the end and I can't stop/start it.

Restarting gearmand (via systemctl): Job for gearmand.service failed because a configured resource limit was exceeded. See "systemctl status gearmand.service" and "journalctl -xe" for details.
[FAILED]
Redirecting to /bin/systemctl restart nagios.service
gearmand.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig gearmand on
Redirecting to /bin/systemctl restart mod-gearman-worker.service


Any clues guys?
And, when checking the status:

[root@nagios tmp]# systemctl status gearmand.service
● gearmand.service - LSB: start and stop the Gearman server
Loaded: loaded (/etc/rc.d/init.d/gearmand; bad; vendor preset: disabled)
Active: failed (Result: resources) since Fri 2021-01-15 10:08:29 EET; 3min 45s ago
Docs: man:systemd-sysv-generator(8)

Jan 15 10:08:29 nagios systemd[1]: Starting LSB: start and stop the Gearman server...
Jan 15 10:08:29 nagios runuser[28140]: pam_unix(runuser:session): session opened for user gearmand by (uid=0)
Jan 15 10:08:29 nagios runuser[28140]: pam_unix(runuser:session): session closed for user gearmand
Jan 15 10:08:29 nagios gearmand[28135]: Starting gearmand: [ OK ]
Jan 15 10:08:29 nagios systemd[1]: Failed to parse PID from file /var/run/gearmand/gearmand.pid: Invalid argument
Jan 15 10:08:29 nagios systemd[1]: Failed to start LSB: start and stop the Gearman server.
Jan 15 10:08:29 nagios systemd[1]: Unit gearmand.service entered failed state.
Jan 15 10:08:29 nagios systemd[1]: gearmand.service failed.
aceadm
Posts: 23
Joined: Thu Jun 11, 2020 8:13 am

Re: Nagios - Mod Gearman

Post by aceadm »

Found the issue within the logs!

ERROR 2021-01-15 10:56:49.000000 [ main ] socket()(Address family not supported by protocol) -> libgearman-server/gearmand.cc:482


Had to modify the /etc/rc.d/init.d/gearmand and add "-L 0.0.0.0" when it start so it only uses ipv4.

start() {
echo -n $"Starting $prog: "
daemon --pidfile=$pidfile --user=gearmand $gearmand -d $OPTIONS -L 0.0.0.0
RETVAL=$?
echo
[ $RETVAL = 0 ] && (touch $lockfile; pgrep -f $gearmand > $pidfile)
return $RETVAL
}


This thread can close
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios - Mod Gearman

Post by benjaminsmith »

Hi,
This thread can close
Great. Thanks for posting your solution.

Have a great weekend!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked