NRPE v2.15 connection refused centos 6

988

Solution 1

Nothing you have said is self-inconsistent. If you don't specify server_address, NRPE will bind to all interfaces. Connection from 127.0.0.1 is thus expected to work, and you say it does.

If you do specify it, and it's the machine's external address, NRPE will bind only to that address, and connections from 127.0.0.1 will be expected to fail.

As for why you can't connect to it from outside, that is likely a pathway issue. If you couldn't connect to port 5666 on the client's external address, from the client itself, when server_address was left blank, that would be odd. But you don't say that that is the case.

From the NAGIOS server, try telnet client.external.ip 5666, and see if you get anything at all. If you dont' even get a TCP connection, then we must suspect a firewall somewhere along the path (including on the client itself).

Solution 2

Ok so now you are facing issue with only nrpe connection,in this case you have to only review your config file, there is no relation of permissions.
On server side: First make sure port 5666 is running

$ netstat -ntlp   
tcp        0      0 0.0.0.0:5666            0.0.0.0:***   

If running then the problem is in your client machine.

On the client side: inside nrpe.conf (where conf file path is depends upon your linux flavour)
check:

  • server_port=5666 (nrpe port)
  • server_address=X.X.X.X (host IP address which is going to be monitored)
  • allowed_hosts=X.X.X.X (nrpe server IP address)

Note: If you are running this on centos/redhat please flush/stop your iptables or allow 5666 port through it.

Share:
988

Related videos on Youtube

Sadeq9128
Author by

Sadeq9128

Updated on September 18, 2022

Comments

  • Sadeq9128
    Sadeq9128 almost 2 years

    I try to build a new project in android studio 3.4.2.

    But I had the following errors:

    CONFIGURE SUCCESSFUL in 18s

    ERROR: Failed to resolve: androidx.appcompat:appcompat:1.1.0 Show in Project Structure dialog Affected Modules: app

    ERROR: Failed to resolve: androidx.constraintlayout:constraintlayout:2.0.0-beta4 Show in Project Structure dialog Affected Modules: app

    ERROR: Failed to resolve: com.google.android.material:material:1.1.0 Install Repository and sync project Show in Project Structure dialog Affected Modules: app

    ERROR: Failed to resolve: androidx.test:runner:1.2.0 Show in Project Structure dialog Affected Modules: app

    ERROR: Failed to resolve: androidx.test.espresso:espresso-core:3.2.0 Show in Project Structure dialog Affected Modules: app

    • Itai Ganot
      Itai Ganot over 9 years
      Are you running NRPE as a stand-alone daemon or through Xinetd?
    • Kishan K
      Kishan K about 8 years
      What is the output of netstat -atln in those specific cases? What do the logs show?
  • Sadeq9128
    Sadeq9128 about 4 years
    Thank you, But it isn't work for me. I just changed order repository in module gradle ->(google() jcenter()) to (jcenter() google()). :\