Page 2 of 3

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 11:16 am
by siriideepak
Hi,

root@ip-172-16-1-108:~# /etc/init.d/xinetd stop
[ ok ] Stopping xinetd (via systemctl): xinetd.service.
root@ip-172-16-1-108:~# /etc/init.d/xinetd start
[ ok ] Starting xinetd (via systemctl): xinetd.service.
root@ip-172-16-1-108:~# /usr/local/nagios/libexec/check_nrpe -H 172.16.3.14
CHECK_NRPE: Error - Could not complete SSL handshake.

Unable to find the tail /var/log/messages

root@ip-172-16-1-108:~# tail /var/log/
alternatives.log cloud-init.log mail.log.1
alternatives.log.1 cloud-init-output.log mail.log.2.gz
alternatives.log.2.gz dist-upgrade/ mail.log.3.gz
alternatives.log.3.gz dpkg.log mail.log.4.gz
alternatives.log.4.gz dpkg.log.1 mysql/
alternatives.log.5.gz dpkg.log.2.gz syslog
apache2/ dpkg.log.3.gz syslog.1
apport.log dpkg.log.4.gz syslog.2.gz
apport.log.1 dpkg.log.5.gz syslog.3.gz
apport.log.2.gz fsck/ syslog.4.gz
apt/ kern.log syslog.5.gz
auth.log kern.log.1 syslog.6.gz
auth.log.1 kern.log.2.gz syslog.7.gz
auth.log.2.gz kern.log.3.gz sysstat/
auth.log.3.gz kern.log.4.gz unattended-upgrades/
auth.log.4.gz lastlog varnish/
btmp lxd/ wtmp
btmp.1 mail.log wtmp.1

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 11:39 am
by bolson
Run the following on the host that you are monitoring and post the results:

/usr/local/nagios/libexec/check_nrpe -H localhost -n

ls -l /var/log

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 11:47 am
by siriideepak
Please find below results..

root@ip-172-16-1-108:~# /usr/local/nagios/libexec/check_nrpe -H localhost -n
connect to address 127.0.0.1 port 5666: Connection refused
connect to host localhost port 5666: Connection refusedroot@ip-172-16-1-108:~#
root@ip-172-16-1-108:~# ls -l /var/log
total 2812
-rw-r--r-- 1 root root 0 Aug 1 06:25 alternatives.log
-rw-r--r-- 1 root root 6376 Jul 31 11:25 alternatives.log.1
-rw-r--r-- 1 root root 210 Jun 20 11:57 alternatives.log.2.gz
-rw-r--r-- 1 root root 173 May 18 04:17 alternatives.log.3.gz
-rw-r--r-- 1 root root 251 Apr 28 15:01 alternatives.log.4.gz
-rw-r--r-- 1 root root 510 Mar 6 16:20 alternatives.log.5.gz
drwxr-x--- 2 root adm 4096 Aug 1 15:27 apache2
-rw-r----- 1 root adm 0 Jul 26 06:25 apport.log
-rw-r----- 1 root adm 114368 Jul 26 04:42 apport.log.1
-rw-r----- 1 root adm 288 Jul 10 14:00 apport.log.2.gz
drwxr-xr-x 2 root root 4096 Aug 1 06:25 apt
-rw-r----- 1 syslog adm 194966 Aug 1 16:45 auth.log
-rw-r----- 1 syslog adm 538583 Jul 30 06:25 auth.log.1
-rw-r----- 1 syslog adm 101302 Jul 24 06:25 auth.log.2.gz
-rw-r----- 1 syslog adm 14819 Jul 16 06:25 auth.log.3.gz
-rw-r----- 1 syslog adm 18254 Jul 10 06:25 auth.log.4.gz
-rw------- 1 root utmp 384 Aug 1 15:48 btmp
-rw------- 1 root utmp 423552 Jul 27 13:20 btmp.1
-rw-r--r-- 1 syslog adm 489741 Aug 1 15:48 cloud-init.log
-rw-r--r-- 1 root root 14169 Aug 1 15:48 cloud-init-output.log
drwxr-xr-x 2 root root 4096 Jan 5 2017 dist-upgrade
-rw-r--r-- 1 root root 0 Aug 1 06:25 dpkg.log
-rw-r--r-- 1 root root 224548 Aug 1 04:37 dpkg.log.1
-rw-r--r-- 1 root root 3940 Jun 30 17:52 dpkg.log.2.gz
-rw-r--r-- 1 root root 2020 May 30 16:24 dpkg.log.3.gz
-rw-r--r-- 1 root root 2545 Apr 28 15:01 dpkg.log.4.gz
-rw-r--r-- 1 root root 12774 Mar 30 07:17 dpkg.log.5.gz
drwxr-xr-x 2 root root 4096 Feb 24 14:17 fsck
-rw-r----- 1 syslog adm 51901 Aug 1 15:48 kern.log
-rw-r----- 1 syslog adm 52382 Jul 28 03:40 kern.log.1
-rw-r----- 1 syslog adm 176 Jul 21 15:01 kern.log.2.gz
-rw-r----- 1 syslog adm 10865 Jul 20 12:57 kern.log.3.gz
-rw-r----- 1 syslog adm 448 Mar 29 10:40 kern.log.4.gz
-rw-rw-r-- 1 root utmp 292584 Aug 1 15:52 lastlog
drwxr-xr-x 2 root root 4096 Feb 3 16:30 lxd
-rw-r----- 1 syslog adm 3608 Aug 1 15:48 mail.log
-rw-r----- 1 syslog adm 48213 Jul 29 07:26 mail.log.1
-rw-r----- 1 syslog adm 2411 Jul 21 16:55 mail.log.2.gz
-rw-r----- 1 syslog adm 1379 Jul 15 06:45 mail.log.3.gz
-rw-r----- 1 syslog adm 1836 Jul 9 15:14 mail.log.4.gz
drwxr-x--- 2 mysql adm 4096 Aug 1 06:25 mysql
-rw-r----- 1 syslog adm 112643 Aug 1 16:45 syslog
-rw-r----- 1 syslog adm 104791 Aug 1 06:25 syslog.1
-rw-r----- 1 syslog adm 5917 Jul 31 06:25 syslog.2.gz
-rw-r----- 1 syslog adm 7869 Jul 30 06:25 syslog.3.gz
-rw-r----- 1 syslog adm 7601 Jul 29 06:25 syslog.4.gz
-rw-r----- 1 syslog adm 28374 Jul 28 06:25 syslog.5.gz
-rw-r----- 1 syslog adm 6157 Jul 27 06:25 syslog.6.gz
-rw-r----- 1 syslog adm 25992 Jul 26 06:25 syslog.7.gz
drwxr-xr-x 2 root root 4096 May 12 2016 sysstat
drwxr-x--- 2 root adm 4096 Aug 1 06:25 unattended-upgrades
drwxr-x--- 2 varnishlog varnish 4096 Aug 1 06:25 varnish
-rw-rw-r-- 1 root utmp 5376 Aug 1 15:52 wtmp
-rw-rw-r-- 1 root utmp 59904 Aug 1 04:38 wtmp.1
root@ip-172-16-1-108:~#

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 2:07 pm
by bolson
The error "Connection refused" typically indicates that nrpe is not running or a firewall rule is preventing the connection. Is firewalld running? If so issue this command on the nrpe host:

Code: Select all

firewall-cmd --permanent --zone=public --add-port=5666/tcp
Then issue this command and post your result

Code: Select all

netstat -an | grep 5666

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 7:29 pm
by siriideepak
Hi,

Output of /var/log/syslog

root@ip-172-16-1-108:/var/log# tail -f syslog
Aug 2 00:13:03 localhost xinetd[4047]: * Stopping internet superserver xinetd
Aug 2 00:13:03 localhost xinetd[4047]: ...done.
Aug 2 00:13:03 localhost systemd[1]: Stopped LSB: Starts or stops the xinetd daemon..
Aug 2 00:13:03 localhost systemd[1]: Starting LSB: Starts or stops the xinetd daemon....
Aug 2 00:13:03 localhost xinetd[4057]: grep: /etc/xinetd.conf: No such file or directory
Aug 2 00:13:03 localhost xinetd[4057]: * Starting internet superserver xinetd
Aug 2 00:13:03 localhost xinetd[4057]: ...done.
Aug 2 00:13:03 localhost systemd[1]: Started LSB: Starts or stops the xinetd daemon..
Aug 2 00:13:03 localhost xinetd[4069]: open( /etc/xinetd.conf ) failed: No such file or directory (errno = 2)
Aug 2 00:13:03 localhost xinetd[4069]: 4069 {init_services} couldn't get configuration. Exiting...

Regards,
Deepak.P

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 8:32 pm
by siriideepak
Hi,

We have rectified some of the issues and finally we are getting this error. Kindly update on this. Thanks!!

root@ip-172-16-1-108:/etc# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not complete SSL handshake.
root@ip-172-16-1-108:/etc# tail -f /var/log/syslog
Aug 2 01:29:05 localhost nrpe[4829]: Error: Could not complete SSL handshake. 1
Aug 2 01:29:15 localhost nrpe[4831]: Error: Could not complete SSL handshake. 1
Aug 2 01:29:28 localhost dhclient[894]: DHCPREQUEST of 172.16.1.108 on ens3 to 172.16.1.1 port 67 (xid=0x697121c1)
Aug 2 01:29:28 localhost dhclient[894]: DHCPACK of 172.16.1.108 from 172.16.1.1
Aug 2 01:29:28 localhost root: /etc/dhcp/dhclient-enter-hooks.d/samba returned non-zero exit status 1
Aug 2 01:29:28 localhost dhclient[894]: bound to 172.16.1.108 -- renewal in 1562 seconds.
Aug 2 01:29:34 localhost nrpe[4847]: Error: Could not complete SSL handshake. 1
Aug 2 01:30:27 localhost nrpe[4848]: Error: Could not complete SSL handshake. 1
Aug 2 01:30:52 localhost nrpe[4849]: Error: Could not complete SSL handshake. 1
Aug 2 01:30:55 localhost nrpe[4851]: Error: Could not complete SSL handshake. 5

Regards,
Deepak.P

Re: NRPE Installation Error(make all)

Posted: Wed Aug 02, 2017 9:34 am
by bolson
As a test, comment out the only_from directive in /etc/xinetd.d/nrpe as:

Then issue the following commands and post your result:

Code: Select all

service xinetd restart
/usr/local/nagios/libexec/check_nrpe -H localhost
tail /var/log/messages

Re: NRPE Installation Error(make all)

Posted: Wed Aug 02, 2017 10:26 am
by siriideepak
Hi,

Please find the below output

root@ip-172-16-1-108:~# tail -f /var/log/syslog
Aug 2 15:24:05 localhost xinetd[19050]: Reading included configuration file: /etc/xinetd.d/nrpe [file=/etc/xinetd.conf] [line=14]
Aug 2 15:24:05 localhost xinetd[19050]: Reading included configuration file: /etc/xinetd.d/nsca [file=/etc/xinetd.d/nsca] [line=16]
Aug 2 15:24:05 localhost xinetd[19050]: Server /usr/local/nagios/bin/nsca is not executable [file=/etc/xinetd.d/nsca] [line=10]
Aug 2 15:24:05 localhost xinetd[19050]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/nsca] [line=10]
Aug 2 15:24:05 localhost xinetd[19050]: Must specify a server in nsca
Aug 2 15:24:05 localhost xinetd[19050]: xinetd Version 2.3.15 started with libwrap loadavg options compiled in.
Aug 2 15:24:05 localhost xinetd[19050]: Started working: 1 available service
Aug 2 15:24:17 localhost nrpe[19052]: Error: Could not complete SSL handshake. 1
Aug 2 15:24:18 localhost nrpe[19054]: Error: Could not complete SSL handshake. 5
Aug 2 15:24:30 localhost nrpe[19055]: Error: Could not complete SSL handshake. 1

Regards,
Deepak.P

Re: NRPE Installation Error(make all)

Posted: Wed Aug 02, 2017 12:28 pm
by bolson
Try this:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1

Re: NRPE Installation Error(make all)

Posted: Wed Aug 02, 2017 11:44 pm
by siriideepak
Hi,

Again the same thing is happening

ubuntu@ip-172-16-1-108:~$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not complete SSL handshake.

ubuntu@ip-172-16-1-108:~$ tail -f /var/log/syslog
Aug 3 04:35:04 localhost dhclient[894]: DHCPREQUEST of 172.16.1.108 on ens3 to 172.16.1.1 port 67 (xid=0x697121c1)
Aug 3 04:35:04 localhost dhclient[894]: DHCPACK of 172.16.1.108 from 172.16.1.1
Aug 3 04:35:04 localhost root: /etc/dhcp/dhclient-enter-hooks.d/samba returned non-zero exit status 1
Aug 3 04:35:04 localhost dhclient[894]: bound to 172.16.1.108 -- renewal in 1449 seconds.
Aug 3 04:35:09 localhost nrpe[26745]: Error: Could not complete SSL handshake. 1
Aug 3 04:35:24 localhost nrpe[26746]: Error: Could not complete SSL handshake. 1
Aug 3 04:36:16 localhost nrpe[26751]: Error: Could not complete SSL handshake. 1
Aug 3 04:36:17 localhost systemd[1]: Started Session 347 of user ubuntu.
Aug 3 04:36:39 localhost nrpe[26825]: Error: Could not complete SSL handshake. 5
Aug 3 04:37:07 localhost nrpe[26827]: Error: Could not complete SSL handshake. 1
Aug 3 04:38:13 localhost nrpe[26829]: Error: Could not complete SSL handshake. 1
Aug 3 04:38:44 localhost nrpe[26830]: Error: Could not complete SSL handshake. 1
Aug 3 04:39:01 localhost CRON[26832]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Aug 3 04:39:13 localhost nrpe[26833]: Error: Could not complete SSL handshake. 1
Aug 3 04:39:23 localhost nrpe[26834]: Error: Could not complete SSL handshake. 1
Aug 3 04:39:34 localhost systemd[1]: Starting Clean php session files...
Aug 3 04:39:34 localhost sessionclean[26835]: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_gd2.dll' - /usr/lib/php/20151012/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Aug 3 04:39:35 localhost systemd[1]: Started Clean php session files.
Aug 3 04:40:09 localhost nrpe[26904]: Error: Could not complete SSL handshake. 1
Aug 3 04:40:24 localhost nrpe[26905]: Error: Could not complete SSL handshake. 1

Regards
Deepak.p