You are here

Redhat linux agent segfaults

8 posts / 0 new
Last post
binoj.jose
binoj.jose's picture
Redhat linux agent segfaults

Old agents worked fine. Installing new agent segfaults.

Installing : opsview-agent-5.0.2.556-1.el6.x86_64   
/etc/init.d/opsview-agent: line 159: 34898 Segmentation fault      $DAEMON -c $CONFIG -d

Red Hat Enterprise Linux Server release 6.4 (Santiago)

Can't find anything amiss so far. Any help will be apperciated 

Duncan Ferguson
dferguson's picture
Can you please provide the

Can you please provide the output from

uname -a
lsb_release -a
ldd /usr/local/nagios/bin/nrpe
bash -x /etc/init.d/opsview-agent start
rpm -qi opsview-agent

Thanks

  Duncs

Duncan Ferguson
dferguson's picture
A test on my server shows

A test on my server shows this works without issue

[root@duncs-rh6-64 yum.repos.d]# ps -ef | grep [n]rpe
nagios    1673     1  0 04:35 ?        00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
[root@duncs-rh6-64 yum.repos.d]# uname -a
Linux duncs-rh6-64.opsview.com 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@duncs-rh6-64 yum.repos.d]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID:    RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 6.7 (Santiago)
Release:    6.7
Codename:    Santiago
[root@duncs-rh6-64 yum.repos.d]# ldd /usr/local/nagios/bin/nrpe
    linux-vdso.so.1 =>  (0x00007ffd39509000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f202a9de000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f202a5fa000)
    libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f202a3e0000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f202a04c000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f2029e08000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f2029b20000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f202991c000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f20296f0000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f20294eb000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f20292d5000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f202ac51000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f20290ca000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f2028ec6000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f2028cac000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2028a8f000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f202886f000)
[root@duncs-rh6-64 yum.repos.d]# rpm -qa opsview-agent
opsview-agent-5.0.2.556-1.el6.x86_64
[root@duncs-rh6-64 yum.repos.d]# rpm -qi opsview-agent
Name        : opsview-agent                Relocations: /usr/local/nagios
Version     : 5.0.2.556                         Vendor: (none)
Release     : 1.el6                         Build Date: Fri 04 Dec 2015 01:29:21 PM EST
Install Date: Wed 27 Apr 2016 04:35:44 AM EDT      Build Host: ov-build-rhel6-64.opsera.com
Group       : System Environment/Daemons    Source RPM: opsview-base-5.0.2.556-1.el6.src.rpm
Size        : 4715652                          License: See associated files for each software
Signature   : (none)
URL         : http://www.opsview.org
Summary     : Opsview Agent
Description :
This is the agent for Opsview, to be installed on systems to be monitored by Opsview

 

  Duncs

binoj.jose
binoj.jose's picture
output from requested commands
$ uname -a
Linux  2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 6.4 (Santiago)
Release:        6.4
Codename:       Santiago

$ sudo ldd /usr/local/nagios/bin/nrpe
        linux-vdso.so.1 =>  (0x00007ffff10d2000)
        libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f8477968000)
        libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f8477584000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f847736a000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f8476fd6000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f8476d92000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f8476aab000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f84768a7000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f847667b000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f8476476000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f8476260000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8477bdd000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f8476055000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f8475e51000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f8475c37000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8475a1a000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f84757fa000)

$ sudo bash -x /etc/init.d/opsview-agent start
+ id
+ grep 'uid=0('
+ '[' 0 = 0 ']'
+ case "$0" in
+ cmd=/etc/init.d/opsview-agent
+ exec su - nagios -c '/etc/init.d/opsview-agent start'
/etc/init.d/opsview-agent: line 159: 43298 Segmentation fault      $DAEMON -c $CONFIG -d
NRPE started

$ rpm -qi opsview-agent
Name        : opsview-agent                Relocations: /usr/local/nagios
Version     : 5.0.2.556                         Vendor: (none)
Release     : 1.el6                         Build Date: Fri 04 Dec 2015 06:29:21 PM UTC
Install Date: Wed 27 Apr 2016 11:17:28 AM UTC      Build Host: ov-build-rhel6-64.opsera.com
Group       : System Environment/Daemons    Source RPM: opsview-base-5.0.2.556-1.el6.src.rpm
Size        : 4715652                          License: See associated files for each software
Signature   : (none)
URL         : http://www.opsview.org
Summary     : Opsview Agent
Description :
This is the agent for Opsview, to be installed on systems to be monitored by Opsview


$ ps -ef | grep [n]rpe
$



Duncan Ferguson
dferguson's picture
I noticed the test system I

I noticed the test system I used was 6.7 whgereas you have 6.4 - I am currently trying to locate installation media to see if I can more closely replicate your system.

Are you able to update your RHEL server to 6.7 or is this currently not an option?

  Duncs

Duncan Ferguson
dferguson's picture
I have just installed a RHEL

I have just installed a RHEL 6.0 system and the daemon runs successfully from the same package.

What happens when you run the following commands as the nagios user:

$ /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
$ ps -ef | grep [n]rpe

  Duncs

binoj.jose
binoj.jose's picture
no dice
[xxxxx@xxxx ~]$ sudo /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
[sudo] password for xxxx:
[xxxxx@xxxxx ~]$ ps -ef | grep [n]rpe
[xxxxx@xxxxxx ~]$

Upgrading really not an option at this time unfortunately 

 

Duncan Ferguson
dferguson's picture
Can you run the command

Can you run the command through strace to see if it gives any clues? You may need to instrall strace via yum for this.

strace -f /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d 1>/tmp/strace.out 2>&1

Are any core files produced that can be put through gdb?

  Duncs