Page 1 of 1
host port 21 connection refused
Posted: Thu Feb 22, 2018 7:55 am
by pohlin
Hi,can anyone help me please?
I installed nagios core 4.3.4 on ubuntu 14.04
after adding a new host
i used some services like check load, total processes ,ping, html,zombie processes.
ping is doing fine, html showed port 80 connection refused HTTP CRITICAL - Unable to open TCP socket
the host im monitoring is a gateway, so could it be it doesnt have a tcp socket?
and for the rest services, im getting port 21 connection refused, i tried googling,there isnt anyone who faced this issue.
i tried ufw allow , also allowed from my nagios server ip.
PLEASE HELP
Re: host port 21 connection refused
Posted: Thu Feb 22, 2018 5:39 pm
by bolson
Can you ping the host from your core server?
What type of host are you monitoring and what agent are you using?
Re: host port 21 connection refused
Posted: Thu Feb 22, 2018 7:53 pm
by pohlin
yes i can ping.
its a gateway running on linux, im using nrpe
Re: host port 21 connection refused
Posted: Fri Feb 23, 2018 1:39 am
by pohlin
but when i try /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
its fine
and tried my nagios server ip is fine too
but when i try the host ip
it says connect to address 192.168.0.127 port 5666: Connection refused
connect to host 192.168.0.127 port 5666: Connection refused
Re: host port 21 connection refused
Posted: Fri Feb 23, 2018 3:58 am
by pohlin
- nrpe.cfg
- (7.05 KiB) Downloaded 750 times
this is my nrpe.cfg file
Re: host port 21 connection refused
Posted: Fri Feb 23, 2018 4:17 am
by pohlin
my xinetd file i have already add the host ip, nagios server ip to the only from
Re: host port 21 connection refused
Posted: Fri Feb 23, 2018 1:11 pm
by scottwilkerson
Is port 5666 open in the firewall on the remote computer?
Re: host port 21 connection refused
Posted: Sun Feb 25, 2018 7:53 pm
by pohlin
i think so
testing@SenzoServer:~$ sudo ufw status
Status: active
To Action From
-- ------ ----
80 ALLOW Anywhere
Apache ALLOW Anywhere
22 ALLOW Anywhere
21 ALLOW Anywhere
5666 ALLOW Anywhere
21/tcp ALLOW Anywhere
22 ALLOW 192.168.0.144
21 ALLOW 192.168.0.144
21 ALLOW 192.168.0.127
22 ALLOW 192.168.0.127
990/tcp ALLOW Anywhere
22/tcp ALLOW 192.168.0.144
80 ALLOW 192.168.0.144
80 ALLOW 192.168.0.127
80 ALLOW 127.0.0.1
8888 ALLOW Anywhere
22/tcp ALLOW 192.168.0.5
8888/tcp ALLOW 192.168.0.5
80/tcp ALLOW 192.168.0.5
21/tcp ALLOW 192.168.0.5
8888/tcp ALLOW 192.168.0.0/24
5666 ALLOW 192.168.0.144
5666 ALLOW 192.168.0.127
5666 ALLOW 192.168.0.72
NRPE ALLOW Anywhere
80 (v6) ALLOW Anywhere (v6)
Apache (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
21 (v6) ALLOW Anywhere (v6)
5666 (v6) ALLOW Anywhere (v6)
21/tcp (v6) ALLOW Anywhere (v6)
990/tcp (v6) ALLOW Anywhere (v6)
8888 (v6) ALLOW Anywhere (v6)
NRPE (v6) ALLOW Anywhere (v6)
Re: host port 21 connection refused
Posted: Sun Feb 25, 2018 7:55 pm
by pohlin
Re: host port 21 connection refused
Posted: Mon Feb 26, 2018 11:14 am
by scottwilkerson
in your nrpe.cfg you shared you have an allowed_hosts configuration which needs to contain the IP of your nagios server unless you are runninf NRPE from under xinetd
yours posted above currently says