The nrpe agent is working just fine but when executing this code above i still getting this error: java.net.SocketException: Software caused connection abort: recv failed
try {
JNRPEClient client = new JNRPEClient("192.168.121.129", 5666, false);
client.setTimeout(30);
ReturnValue ret = client.sendCommand("check_ping -H 192.168.121.129 -t 60 -w 3000.0,80% -c 5000.0,100% -p 5");
System.out.println(ret.getMessage());
System.exit(ret.getStatus().intValue());
} catch (JNRPEClientException exc) {
System.out.println(exc.getCause());
System.out.println(exc.getMessage());
}
将构造函数参数更改为true以启用SSL,这应该可以解决您的问题。
JNRPEClient client = new JNRPEClient("192.168.121.129", 5666, true);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.