bin folder missing from /usr/local/nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: bin folder missing from /usr/local/nagios

Post by tgriep »

Can you look on the log file on the Solaris server and post any errors you find?
The file to look in is typically

Code: Select all

/var/adm/syslog
Be sure to check out our Knowledgebase for helpful articles and solutions!
katya
Posts: 224
Joined: Mon Aug 18, 2014 9:07 am

Re: bin folder missing from /usr/local/nagios

Post by katya »

Nov 29 04:22:24 ssbpmutu sshd[23996]: [ID 800047 auth.info] Received disconnect from 10.146.1.100: 11: Terminating connection
Nov 29 04:22:39 ssbpmutu inetd[405]: [ID 317013 daemon.notice] nrpe[24561] from 10.146.1.100 33954
Nov 29 04:22:39 ssbpmutu inetd[405]: [ID 317013 daemon.notice] nrpe[24561] from 10.146.1.100 33954
Nov 29 04:22:39 ssbpmutu nrpe[24561]: [ID 927837 mail.info] connect from ssbpops01.ssb.sungard.com
Nov 29 04:22:39 ssbpmutu tcpd[24561]: [ID 826424 mail.error] error: cannot execute /application/nagios/bin/nrpe: No such file or directory
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: bin folder missing from /usr/local/nagios

Post by tgriep »

Can you login to the Solaris system as root, run the following and post the output?

Code: Select all

svcs
grep 5666 /etc/services
ls -lR /usr/local/nagios
Be sure to check out our Knowledgebase for helpful articles and solutions!
katya
Posts: 224
Joined: Mon Aug 18, 2014 9:07 am

Re: bin folder missing from /usr/local/nagios

Post by katya »

Code: Select all

root@ssbpmutu:/# svcs
STATE          STIME    FMRI
legacy_run     Nov_26   lrc:/etc/rc2_d/S05netconfig
legacy_run     Nov_26   lrc:/etc/rc2_d/S10lu
legacy_run     Nov_26   lrc:/etc/rc2_d/S20sysetup
legacy_run     Nov_26   lrc:/etc/rc2_d/S40llc2
legacy_run     Nov_26   lrc:/etc/rc2_d/S42ncakmod
legacy_run     Nov_26   lrc:/etc/rc2_d/S47pppd
legacy_run     Nov_26   lrc:/etc/rc2_d/S70uucp
legacy_run     Nov_26   lrc:/etc/rc2_d/S72autoinstall
legacy_run     Nov_26   lrc:/etc/rc2_d/S73cachefs_daemon
legacy_run     Nov_26   lrc:/etc/rc2_d/S79opsware-agent
legacy_run     Nov_26   lrc:/etc/rc2_d/S81dodatadm_udaplt
legacy_run     Nov_26   lrc:/etc/rc2_d/S89PRESERVE
legacy_run     Nov_26   lrc:/etc/rc2_d/S89bdconfig
legacy_run     Nov_26   lrc:/etc/rc2_d/S91ifbinit
legacy_run     Nov_26   lrc:/etc/rc2_d/S91jfbinit
legacy_run     Nov_26   lrc:/etc/rc2_d/S94ncalogd
legacy_run     Nov_26   lrc:/etc/rc2_d/S98deallocate
legacy_run     Nov_26   lrc:/etc/rc2_d/S98mqm_qmgr
legacy_run     Nov_26   lrc:/etc/rc2_d/S99mqm_lsr
legacy_run     Nov_26   lrc:/etc/rc3_d/S16boot_server
legacy_run     Nov_26   lrc:/etc/rc3_d/S50apache
legacy_run     Nov_26   lrc:/etc/rc3_d/S52imq
legacy_run     Nov_26   lrc:/etc/rc3_d/S80mipagent
legacy_run     Nov_26   lrc:/etc/rc3_d/S84appserv
legacy_run     Nov_26   lrc:/etc/rc3_d/S99Galaxy
legacy_run     Nov_26   lrc:/etc/rc3_d/S99Notification
disabled       Nov_26   svc:/system/fpsd:default
online         Nov_26   svc:/system/svc/restarter:default
online         Nov_26   svc:/network/loopback:default
online         Nov_26   svc:/network/pfil:default
online         Nov_26   svc:/network/tnctl:default
online         Nov_26   svc:/system/filesystem/root:default
online         Nov_26   svc:/system/installupdates:default
online         Nov_26   svc:/network/physical:default
online         Nov_26   svc:/system/scheduler:default
online         Nov_26   svc:/system/identity:node
online         Nov_26   svc:/system/boot-archive:default
online         Nov_26   svc:/system/filesystem/usr:default
online         Nov_26   svc:/system/device/local:default
online         Nov_26   svc:/system/keymap:default
online         Nov_26   svc:/system/filesystem/minimal:default
online         Nov_26   svc:/system/name-service-cache:default
online         Nov_26   svc:/system/power:default
online         Nov_26   svc:/system/resource-mgmt:default
online         Nov_26   svc:/system/coreadm:default
online         Nov_26   svc:/system/identity:domain
online         Nov_26   svc:/ldoms/agents:default
online         Nov_26   svc:/system/rmtmpfiles:default
online         Nov_26   svc:/system/cryptosvc:default
online         Nov_26   svc:/system/sysevent:default
online         Nov_26   svc:/platform/sun4v/drd:default
online         Nov_26   svc:/system/picl:default
online         Nov_26   svc:/system/device/fc-fabric:default
online         Nov_26   svc:/network/ipsec/ipsecalgs:default
online         Nov_26   svc:/milestone/devices:default
online         Nov_26   svc:/network/ipsec/policy:default
online         Nov_26   svc:/system/pkgserv:default
online         Nov_26   svc:/milestone/network:default
online         Nov_26   svc:/application/print/ppd-cache-update:default
online         Nov_26   svc:/system/manifest-import:default
online         Nov_26   svc:/system/patchchk:default
online         Nov_26   svc:/network/initial:default
online         Nov_26   svc:/milestone/single-user:default
online         Nov_26   svc:/system/sysidtool:net
online         Nov_26   svc:/platform/sun4v/efdaemon:default
online         Nov_26   svc:/network/routing-setup:default
online         Nov_26   svc:/network/rpc/bind:default
online         Nov_26   svc:/network/rpc/keyserv:default
online         Nov_26   svc:/network/nis/client:default
online         Nov_26   svc:/milestone/name-services:default
online         Nov_26   svc:/network/nfs/mapid:default
online         Nov_26   svc:/network/nfs/cbd:default
online         Nov_26   svc:/network/ilomconfig-interconnect:default
online         Nov_26   svc:/network/service:default
online         Nov_26   svc:/network/iscsi/initiator:default
online         Nov_26   svc:/network/ntp:default
online         Nov_26   svc:/system/filesystem/local:default
online         Nov_26   svc:/network/shares/group:default
online         Nov_26   svc:/network/shares/group:zfs
online         Nov_26   svc:/system/boot-archive-update:default
online         Nov_26   svc:/network/nfs/status:default
online         Nov_26   svc:/system/sysidtool:system
online         Nov_26   svc:/system/cron:default
online         Nov_26   svc:/milestone/sysconfig:default
online         Nov_26   svc:/network/nfs/nlockmgr:default
online         Nov_26   svc:/system/sac:default
online         Nov_26   svc:/network/inetd:default
online         Nov_26   svc:/system/postrun:default
online         Nov_26   svc:/application/management/wbem:default
online         Nov_26   svc:/system/utmp:default
online         Nov_26   svc:/system/console-login:default
online         Nov_26   svc:/network/pe-mcollective:default
online         Nov_26   svc:/application/font/fc-cache:default
online         Nov_26   svc:/network/rpc/gss:default
online         Nov_26   svc:/application/x11/xfs:default
online         Nov_26   svc:/application/font/stfsloader:default
online         Nov_26   svc:/network/rpc/rstat:default
online         Nov_26   svc:/network/nfs/client:default
online         Nov_26   svc:/network/cde-spc:default
online         Nov_26   svc:/network/stlisten:default
online         Nov_26   svc:/network/shell:default
online         Nov_26   svc:/network/rpc/smserver:default
online         Nov_26   svc:/network/rpc/cde-ttdbserver:tcp
online         Nov_26   svc:/network/rpc/rusers:default
online         Nov_26   svc:/network/rpc/cde-calendar-manager:default
online         Nov_26   svc:/system/filesystem/volfs:default
online         Nov_26   svc:/network/stdiscover:default
online         Nov_26   svc:/system/filesystem/autofs:default
online         Nov_26   svc:/network/finger:default
online         Nov_26   svc:/network/rpc-100235_1/rpc_ticotsord:default
online         Nov_26   svc:/network/nrpe/tcp:default
online         Nov_26   svc:/system/system-log:default
online         Nov_26   svc:/network/ssh:default
online         Nov_26   svc:/system/dumpadm:default
online         Nov_26   svc:/network/sendmail-client:default
online         Nov_26   svc:/network/smtp:sendmail
online         Nov_26   svc:/application/management/seaport:default
online         Nov_26   svc:/BESClient:default
online         Nov_26   svc:/application/management/snmpdx:default
online         Nov_26   svc:/application/management/sma:default
online         Nov_26   svc:/system/fmd:default
online         Nov_26   svc:/application/management/dmi:default
online         Nov_26   svc:/application/management/webmin:default
online         Nov_26   svc:/milestone/multi-user:default
online         Nov_26   svc:/system/boot-config:default
online         Nov_26   svc:/application/stosreg:default
online         Nov_26   svc:/application/graphical-login/cde-login:default
online         Nov_26   svc:/application/cde-printinfo:default
online         Nov_26   svc:/milestone/multi-user-server:default
online         Nov_26   svc:/system/zones:default
online         Nov_26   svc:/system/basicreg:default
online         Nov_26   svc:/system/webconsole:console
offline        Nov_26   svc:/application/print/ipp-listener:default
offline        Nov_26   svc:/application/print/rfc1179:default
maintenance    Nov_26   svc:/network/nagios/nrpe:default

Code: Select all

root@ssbpmutu:/# svcs -a | grep nrpe
online         Nov_26   svc:/network/nrpe/tcp:default
maintenance    Nov_26   svc:/network/nagios/nrpe:default
root@ssbpmutu:/# 

Code: Select all

root@ssbpmutu:/# grep 5666 /etc/services
nrpe            5666/tcp                        #Nagios nrpe 

Code: Select all

root@ssbpmutu:/# ls -lR /usr/local/nagios
/usr/local/nagios:
total 23
drwxrwxr-x   2 nagios   nagios         4 Nov 20 06:52 bin
drwxrwxr-x   2 nagios   nagios         3 Nov 20 06:52 etc
drwxr-xr-x   2 nagios   app            2 May 27  2015 include
drwxr-xr-x   2 nagios   app            3 May 27  2015 lib
drwxrwxr-x   2 nagios   nagios        64 Nov 20 06:52 libexec
drwxr-xr-x   3 nagios   app            3 May 27  2015 share
drwxr-xr-x   2 nagios   nagios         3 Nov 26 13:37 var

/usr/local/nagios/bin:
total 539
-rwxr-xr-x   1 root     root      131888 Nov 20 06:52 nrpe
-rwxr-xr-x   1 root     root       10694 Nov 20 06:52 nrpe-uninstall

/usr/local/nagios/etc:
total 22
-rw-r--r--   1 nagios   nagios     10367 Nov 20 07:05 nrpe.cfg

/usr/local/nagios/include:
total 0

/usr/local/nagios/lib:
total 3
-rw-r--r--   1 nagios   app          635 May 27  2015 charset.alias

/usr/local/nagios/libexec:
total 13888
-rwxr-xr-x   1 nagios   nagios    292348 May 27  2015 check_apt
-rwxr-xr-x   1 nagios   nagios      2258 May 27  2015 check_breeze
-rwxr-xr-x   1 nagios   nagios    130776 May 27  2015 check_by_ssh
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_clamd -> check_tcp
-rwxr-xr-x   1 nagios   nagios    103196 May 27  2015 check_cluster
-rwxr-xr-x   1 nagios   nagios    125940 May 27  2015 check_dig
-rwxr-xr-x   1 nagios   nagios    335688 May 27  2015 check_disk
-rwxr-xr-x   1 nagios   nagios      9290 May 27  2015 check_disk_smb
-rwxr-xr-x   1 nagios   nagios    138044 May 27  2015 check_dns
-rwxr-xr-x   1 nagios   nagios     67328 May 27  2015 check_dummy
-rwxr-xr-x   1 nagios   nagios      3350 May 27  2015 check_file_age
-rwxr-xr-x   1 nagios   nagios      6316 May 27  2015 check_flexlm
-rwxr-xr-x   1 nagios   nagios    129736 May 27  2015 check_fping
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_ftp -> check_tcp
-rwxr-xr-x   1 nagios   nagios    125096 May 27  2015 check_hpjd
-rwxr-xr-x   1 nagios   nagios    445000 May 27  2015 check_http
-rwxr-xr-x   1 nagios   nagios     15124 May 27  2015 check_ifoperstatus
-rwxr-xr-x   1 nagios   nagios     12601 May 27  2015 check_ifstatus
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_imap -> check_tcp
-rwxr-xr-x   1 nagios   nagios      6888 May 27  2015 check_ircd
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_jabber -> check_tcp
-rwxr-xr-x   1 nagios   nagios    112144 May 27  2015 check_load
-rwxr-xr-x   1 nagios   nagios      5983 May 27  2015 check_log
-rwxr-xr-x   1 nagios   nagios     19903 May 27  2015 check_mailq
-rwxr-xr-x   1 nagios   nagios    107156 May 27  2015 check_mrtg
-rwxr-xr-x   1 nagios   nagios    106548 May 27  2015 check_mrtgtraf
-rwxr-xr-x   1 nagios   nagios    133592 May 27  2015 check_mysql
-rwxr-xr-x   1 nagios   nagios    126716 May 27  2015 check_mysql_query
-rwxr-xr-x   1 nagios   nagios    113316 May 27  2015 check_nagios
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_nntp -> check_tcp
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_nntps -> check_tcp
-rwxrwxr-x   1 nagios   nagios     92632 Nov 20 06:52 check_nrpe
-rwxr-xr-x   1 nagios   nagios    131260 May 27  2015 check_nt
-rwxr-xr-x   1 nagios   nagios    133736 May 27  2015 check_ntp
-rwxr-xr-x   1 nagios   nagios    128916 May 27  2015 check_ntp_peer
-rwxr-xr-x   1 nagios   nagios    126744 May 27  2015 check_ntp_time
-rwxr-xr-x   1 nagios   nagios    149552 May 27  2015 check_nwstat
-rwxr-xr-x   1 nagios   nagios      8781 May 27  2015 check_oracle
-rwxr-xr-x   1 nagios   nagios    120092 May 27  2015 check_overcr
-rwxr-xr-x   1 nagios   nagios    125220 May 27  2015 check_pgsql
-rwxr-xr-x   1 nagios   nagios    135268 May 27  2015 check_ping
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_pop -> check_tcp
-rwxr-xr-x   1 nagios   nagios    310516 May 27  2015 check_procs
-rwxr-xr-x   1 nagios   nagios    117468 May 27  2015 check_real
-rwxr-xr-x   1 nagios   nagios      9582 May 27  2015 check_rpc
-rwxr-xr-x   1 nagios   nagios      1455 May 27  2015 check_sensors
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_simap -> check_tcp
-rwxr-xr-x   1 nagios   nagios    378900 May 27  2015 check_smtp
-rwxr-xr-x   1 nagios   nagios    353280 May 27  2015 check_snmp
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_spop -> check_tcp
-rwxr-xr-x   1 nagios   nagios    114752 May 27  2015 check_ssh
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_ssmtp -> check_tcp
-rwxr-xr-x   1 nagios   nagios    193728 May 27  2015 check_tcp
-rwxr-xr-x   1 nagios   nagios    116640 May 27  2015 check_time
lrwxrwxrwx   1 nagios   app            9 May 27  2015 check_udp -> check_tcp
-rwxr-xr-x   1 nagios   nagios    125580 May 27  2015 check_ups
-rwxr-xr-x   1 nagios   nagios    100616 May 27  2015 check_users
-rwxr-xr-x   1 nagios   nagios      2937 May 27  2015 check_wave
-rwxr-xr-x   1 nagios   nagios     97144 May 27  2015 negate
-rwxr-xr-x   1 nagios   nagios     94288 May 27  2015 urlize
-rwxr-xr-x   1 nagios   nagios      1912 May 27  2015 utils.pm
-rwxr-xr-x   1 nagios   nagios      2791 May 27  2015 utils.sh

/usr/local/nagios/share:
total 3
drwxr-xr-x   4 nagios   app            4 May 27  2015 locale

/usr/local/nagios/share/locale:
total 6
drwxr-xr-x   3 nagios   app            3 May 27  2015 de
drwxr-xr-x   3 nagios   app            3 May 27  2015 fr

/usr/local/nagios/share/locale/de:
total 3
drwxr-xr-x   2 nagios   app            3 May 27  2015 LC_MESSAGES

/usr/local/nagios/share/locale/de/LC_MESSAGES:
total 17
-rw-r--r--   1 nagios   app         7750 May 27  2015 nagios-plugins.mo

/usr/local/nagios/share/locale/fr:
total 3
drwxr-xr-x   2 nagios   app            3 May 27  2015 LC_MESSAGES

/usr/local/nagios/share/locale/fr/LC_MESSAGES:
total 185
-rw-r--r--   1 nagios   app        94001 May 27  2015 nagios-plugins.mo

/usr/local/nagios/var:
total 2
-rw-r--r--   1 nagios   nagios         4 Nov 26 13:37 nrpe.pid
root@ssbpmutu:/#
i saw i have 2 processes for nrpe. how can i remove the process that on maintenence?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: bin folder missing from /usr/local/nagios

Post by dwhitfield »

katya wrote:my machine is Solaris 10.
Do you have any plans to upgrade to Solaris 11? That is what we have to test against. It may be that we have to leave this open for community input.
katya
Posts: 224
Joined: Mon Aug 18, 2014 9:07 am

Re: bin folder missing from /usr/local/nagios

Post by katya »

Hi,

Unfortunately we don’t have any option to upgrade the machine to Solaris 11.

but all my machines are ruuning with solaris 10 and it works! except this one so what it can be?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: bin folder missing from /usr/local/nagios

Post by avandemore »

You seem to have conflicting reports:
katya wrote:root@ssbpmutu:/tmp/nrpe-3.0# svcadm enable nrpe
root@ssbpmutu:/tmp/nrpe-3.0# cd /usr/local/nagios/libexec/
root@ssbpmutu:/usr/local/nagios/libexec# ./check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not connect to 127.0.0.1. Check system logs on 127.0.0.1
katya wrote:root@ssbpmutu:/usr/local/nagios/libexec# ./check_nrpe -H 127.0.0.1 -n
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
While they are both errors, the first one indicates the nrpe daemon wasn't listening, while the second one indicated a security issue. What is the current status?
Previous Nagios employee
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: bin folder missing from /usr/local/nagios

Post by tgriep »

You have 2 separate NRPE daemons configured on your server. One that is online on one that is down in maintenance. Run the following and post the output here so we can see the configuration settings for both of them.

Code: Select all

inetadm -l svc:/network/nrpe/tcp:default
inetadm -l svc:/network/nagios/nrpe:default
I would assume that if you delete the failed one, that should allow the good one to function.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: bin folder missing from /usr/local/nagios

Post by ssax »

I think the one that is online is causing the issue, please run these commands to see if it resolves the problem:

Code: Select all

svccfg delete svc:/network/nrpe/tcp:default
svcadm restart svc:/network/nagios/nrpe:default
Then test again, if it's still not working, send the output of this command:

Code: Select all

svcs -a | grep nrpe
Thank you
katya
Posts: 224
Joined: Mon Aug 18, 2014 9:07 am

Re: bin folder missing from /usr/local/nagios

Post by katya »

Code: Select all

root@ssbpmutu:/# inetadm -l svc:/network/nrpe/tcp:default
SCOPE    NAME=VALUE
         name="nrpe"
         endpoint_type="stream"
         proto="tcp"
         isrpc=FALSE
         wait=FALSE
         exec="/usr/local/bin/tcpd -c /application/nagios/etc/nrpe.cfg -i"
         arg0="/application/nagios/bin/nrpe"
         user="nagios"
default  bind_addr=""
default  bind_fail_max=-1
default  bind_fail_interval=-1
default  max_con_rate=-1
default  max_copies=-1
default  con_rate_offline=-1
default  failrate_cnt=40
default  failrate_interval=60
default  inherit_env=TRUE
default  tcp_trace=TRUE
default  tcp_wrappers=TRUE
default  connection_backlog=10

Code: Select all

root@ssbpmutu:/# inetadm -l svc:/network/nagios/nrpe:default
Error: Specified service instance "svc:/network/nagios/nrpe:default" has no restarter property.  inetd is not the delegated restarter of this instance.

Code: Select all

root@ssbpmutu:/# svccfg delete svc:/network/nrpe/tcp:default
svccfg: Instance svc:/network/nrpe/tcp:default may be running.  Use delete -f if it is not.

Code: Select all

root@ssbpmutu:/#
root@ssbpmutu:/# svcadm restart svc:/network/nagios/nrpe:default

Code: Select all

root@ssbpmutu:/# svcs -a | grep nrpe
online         Dec_03   svc:/network/nrpe/tcp:default
maintenance    Dec_03   svc:/network/nagios/nrpe:default
Last edited by dwhitfield on Tue Dec 06, 2016 12:34 pm, edited 1 time in total.
Reason: code blocks FTW
Locked