Page 1 of 1

Nagios - Mod Gearman

Posted: Thu Jan 14, 2021 1:54 pm
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

Re: Nagios - Mod Gearman

Posted: Fri Jan 15, 2021 3:22 am
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?

Re: Nagios - Mod Gearman

Posted: Fri Jan 15, 2021 3:26 am
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.

Re: Nagios - Mod Gearman

Posted: Fri Jan 15, 2021 4:22 am
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

Re: Nagios - Mod Gearman

Posted: Fri Jan 15, 2021 2:09 pm
by benjaminsmith
Hi,
This thread can close
Great. Thanks for posting your solution.

Have a great weekend!