nagios Connection refused by host

服务端(192.168.2.110)无法访问客户端的NRPE: 

[[email protected] ~]# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1

NRPE v2.12

[[email protected] ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.120

Connection refused by host

客户端(192.168.2.120):

[[email protected] etc]# lsof -i :5666

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

nrpe    18703 nagios    4u  IPv4  85766      0t0  TCP localhost:5666 (LISTEN)#只在本地有效,所有外部的IP无法访问

[[email protected] etc]# vim nrpe.conf +44

将以下内容注释掉:

#server_address=127.0.0.1

[[email protected] etc]# pkill nrpe

[[email protected] etc]# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

[[email protected] etc]# lsof -i :5666

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

nrpe    18766 nagios    4u  IPv4  89670      0t0  TCP *:5666 (LISTEN)

这个就可以正常访问了

服务端访问:

[[email protected] etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.120 -c check_iostat

IOSTAT OK - user 0.28 nice 0.00 sys 0.30 iowait 0.31 idle 0.00  | iowait=0.31%;; idle=0.00%;; user=0.28%;; nice=0.00%;; sys=0.30%;;

时间: 2024-10-27 05:08:47

nagios Connection refused by host的相关文章

“Connection refused” vs “No route to host”

曾经在http://blog.csdn.net/bisal/article/details/42496583这篇博文中提到一个端口连接的验证: "[email protected]$telnet 172.101.19.57 1521Trying 172.101.19.57...telnet: connect to address 172.101.19.57: No route to host如果端口未开,实际报错:[email protected]$telnet 172.27.19.56 152

ssh: connect to host localhost port 22: Connection refused (2)

命令:ssh localhost 错误信息:ssh: connect to host localhost port 22: Connection refused 错误原因: 1.sshd 未安装 2.sshd 未启动 3.防火墙 解决方法: 1.确定安装sshd:  sudo apt-get install openssh-server 2.启动sshd: net start sshd 3.检查防火墙设置 检验方法: 输入命令:ssh localhost 若成功,则表示安装成功,且连接通过: 转

Ubuntu下 ssh : connect to host localhost port 22:Connection refused

Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因可能是ssh-server未安装或者未启动.ubuntu 11.10 默认安装openssh-client,但是木有安装server 运行 ps -e | grep ssh,查看是否有sshd进程 如果没有,说明server没启动,通过 /etc/init.d/ssh -start 启动server

ssh: connect to host github.com port 22: Connection refused

假设git例如,下面的问题时,远程推送: [[email protected] learngit]$ git push -u origin master ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the reposit

ubuntu安装配置ssh-connect to host localhost port 22: Connection refused

在安装ssh,经常出现 ssh: connect to host localhost port 22: Connection refused 从以下几点去检查: 1.是否安装ssh-server: 打开"终端窗口",输入"sudo ps -e |grep ssh"-->回车-->有sshd,说明ssh服务已经启动,如果没有启动,输入"sudo service ssh start"-->回车-->ssh服务就会启动.若无ss

Linux--ssh: connect to host localhost port 22: Connection refused

今日在进行SSH免密码登陆的时候,使用SSH进行测试,抛出下面异常 ssh: connect to host localhost port 22: Connection refused 在网上收了下,答复很多,基本都是 1.没启动SSH 2.没安装SSH 3.没关防火墙 4.-. ,千篇一律. 上面的解决方案我都看了,但是还是不好使. 调研了些关于SSH的资料,内容如下, SSH:是一种安全通道协议,主要用来实现字符界面的远程登录,远程复制等功能(使用TCP的22号端口).SSH协议对通信双方的

mac connect to host localhost port 22: Connection refused

在Mac OS X 10.10.5学习hadoop的过程中,输入命令ssh localhost得到 ssh: connect to host localhost port 22: Connection refused 解决方法是选择系统偏好设置->选择共享->点击远程登录 然后再输入命令ssh localhost发现已经解决问题 找到解决方案来自于 http://stackoverflow.com/questions/6313929/how-do-i-open-port-22-in-os-x-

hive jdbc connection refused

hive jdbc 连接时抛异常: Exception in thread "main" java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.206.128:10000/default: java.net.ConnectException: Connection refused: connect     at org.apache.hive.jdbc.Hiv

scp出现ssh port 22: Connection refused 问题解决具体步骤

[root(0)@sys11 09:20:29 /home/work/Code_release/bj]# scp ./release.sh  [email protected]:/Users/a2014102/Downloadsssh: connect to host 192.168.161.151 port 22: Connection refusedlost connection Solution: One possible reason is that because the ssh se