port 5666: Connection refused SAVE ME , I tried everything
Posted: Tue Feb 06, 2018 11:08 pm
First, I download nrpe from source, upon configuring, i reached this step:
sed -i '/^allowed_hosts=/s/$/,10.25.5.2/' /usr/local/nagios/etc/nrpe.cfg
which i need to put my nagios server ip there, but it shows something sed: unknown option 's'
So i tried download nrpe script which it could configure automatically and i just have to type nagios server ip to allowed to connect to nrpe.
I even tiredvi /etc/xinetd.d/nrpe , the nagios server ip is written allowed.
but when i test /usr/local/nagios/libexec/check_nrpe -H <my nagios server ip>
it says could not connect, connection reset by peer
and on the web interface it shows (No output on stdout) stderr: connect to address 192.168.0.137 port 5666: Connection refused
so i googled alot, some say i should install telnet, but it shows pycurl error 22, 401 autherization required
some say it may be behind a proxy, but when i try curl -vv http://mirror.centos.org/centos/6/cr/x8 ... repomd.xml
it says HTTP/1.1 401 Authentication Required, Connection: keep alive
so im not sure if im behind a proxy or not but i tried https://support.nagios.com/kb/article.php?id=147 to solve it
it says i need to access SSH, then triedhttps://assets.nagios.com/downloads/nagiosxi/docs/Monitoring_Hosts_Using_SSH.pdf#_ga=2.146673457.448019268.1517793230-1858215736.1517278131
when i reach the stepssh-copy-id -i ~/.ssh/id_rsa.pub nagios@remoteip
it says could not resolve hostname remote ip, name or service not known
i also tried /etc/yum.conf
and it says permission denied
i tried everything and everything seems to have a problem with 401 authorization required or permission denied
I really dont know what to do anymore
sed -i '/^allowed_hosts=/s/$/,10.25.5.2/' /usr/local/nagios/etc/nrpe.cfg
which i need to put my nagios server ip there, but it shows something sed: unknown option 's'
So i tried download nrpe script which it could configure automatically and i just have to type nagios server ip to allowed to connect to nrpe.
I even tiredvi /etc/xinetd.d/nrpe , the nagios server ip is written allowed.
but when i test /usr/local/nagios/libexec/check_nrpe -H <my nagios server ip>
it says could not connect, connection reset by peer
and on the web interface it shows (No output on stdout) stderr: connect to address 192.168.0.137 port 5666: Connection refused
so i googled alot, some say i should install telnet, but it shows pycurl error 22, 401 autherization required
some say it may be behind a proxy, but when i try curl -vv http://mirror.centos.org/centos/6/cr/x8 ... repomd.xml
it says HTTP/1.1 401 Authentication Required, Connection: keep alive
so im not sure if im behind a proxy or not but i tried https://support.nagios.com/kb/article.php?id=147 to solve it
it says i need to access SSH, then triedhttps://assets.nagios.com/downloads/nagiosxi/docs/Monitoring_Hosts_Using_SSH.pdf#_ga=2.146673457.448019268.1517793230-1858215736.1517278131
when i reach the stepssh-copy-id -i ~/.ssh/id_rsa.pub nagios@remoteip
it says could not resolve hostname remote ip, name or service not known
i also tried /etc/yum.conf
and it says permission denied
i tried everything and everything seems to have a problem with 401 authorization required or permission denied
I really dont know what to do anymore