host port 21 connection refused

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.
Locked
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

host port 21 connection refused

Post 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 :cry:
bolson

Re: host port 21 connection refused

Post by bolson »

Can you ping the host from your core server?

What type of host are you monitoring and what agent are you using?
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

Re: host port 21 connection refused

Post by pohlin »

yes i can ping.
its a gateway running on linux, im using nrpe
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

Re: host port 21 connection refused

Post 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
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

Re: host port 21 connection refused

Post by pohlin »

nrpe.cfg
(7.05 KiB) Downloaded 745 times
this is my nrpe.cfg file
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

Re: host port 21 connection refused

Post by pohlin »

my xinetd file i have already add the host ip, nagios server ip to the only from
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: host port 21 connection refused

Post by scottwilkerson »

Is port 5666 open in the firewall on the remote computer?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

Re: host port 21 connection refused

Post 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)
pohlin
Posts: 18
Joined: Wed Jan 31, 2018 10:08 pm

Re: host port 21 connection refused

Post by pohlin »

Capture.PNG
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: host port 21 connection refused

Post 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

Code: Select all

allowed_hosts=127.0.0.1
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked