Opened 17 months ago
Closed 16 months ago
#499 closed defect (fixed)
NSClient++ loses communication with Nagios
| Reported by: | davidlac | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.4.0 |
| Component: | NRPE | Version: | 0.3.8 |
| Severity: | Bugs | Keywords: | |
| Cc: |
Description
Dear,
NSclient works fine for my check services but for no reasons, nsclient stops to communicate with Nagios.
On Nagios console i've got the following message: State : Unknown : CHECK_NRPE: Error receiving data from daemon.
On Nsclient Log: error:modules\NRPEListener\NRPEListener.cpp:289: Unauthorize access from: xxx.xxx.xxx.xxx
My Nagios IP xxx.xxx.xxx.xxx is declared in nsc.ini.
allowed_hosts=xxx.xxx.xxx.xxx
My version of nsclient is V0.3.8.75
Restart Nsclient service on W2k3, W2K, W2k8 or XP resolves this PB.
Any idea why nsclient needs to be restarted sometimes?
Attachments (4)
Change History (18)
comment:1 Changed 17 months ago by davidlac
- Milestone 0.4.1 deleted
- Version changed from 0.4.0-rc to 0.3.8
comment:2 Changed 17 months ago by davidlac
- Component changed from Core to NRPEListener
comment:3 Changed 17 months ago by mickem
Changed 17 months ago by davidlac
Changed 17 months ago by davidlac
comment:4 Changed 17 months ago by davidlac
Hello,
My debug logs from nsclient++:
debugbefore.txt = debug when nsclient failed to communicate. Error error:modules\NRPEListener\NRPEListener.cpp:289: Unauthorize access from: xxx.xxx.xxx.xxx
debugafter.txt = debug after nsclient service restarted. Communication OK
comment:5 Changed 17 months ago by mickem
Well, what I need is the debug log *when* it stops working.
Easiest way is to enable FileLogger module and set debug=true...
Michael Medin
comment:6 Changed 17 months ago by davidlac
Ok I enable debug mode on several clients.
I'll send you results soon.
Changed 17 months ago by davidlac
comment:7 Changed 17 months ago by davidlac
Here a log of nsclient with debug mode enable.
The host agent communication failed since nsclient started at 2012-02-06 22:41:40
After investigation, the server restarted, so nsclient started too.
Does it happen for other users after system restart?
comment:8 Changed 17 months ago by mickem
- Owner changed from MickeM to mickem
This was very usefull...
I have had reports (sporadic) from people who claim just this.
Out of curiously xxx.xxx.xxx.xxx is that you editing out the ip or is that the actual message?
But I think this could be due to service dependencies actually it could be that we need to start nsclient++ "after" network is online I shall investigate and hopefully you can help me test this...
Michael Medin
comment:9 Changed 17 months ago by mickem
Also are you using a hostname or IP address for in the allowed hosts file?
And could you also try setting:
[NRPE] ; ... cache_allowed_hosts=0
This will prevent the client to not caching the allowed hosts list meaning it might be reevaluated when the network stack is up...
Michael Medin
comment:10 Changed 17 months ago by davidlac
I edit IP by xxx.xxx.xxx.xxx.
I detected this bug several months ago and I created dependence on DNS with nsclient services because my allowed_hosts in nsc.ini uses dns name. Without this configuration all of nsclient agent bugs after host restart. With this dependence only a few of them have a problem. (50 of 2050)
I'll try cache_allowed_hosts=0
Changed 17 months ago by davidlac
comment:11 Changed 17 months ago by davidlac
Hello,
I configured cache_allowed_hosts=0 on 4 clients with this problem. Next reboot is planned on 02/23/2012.
I'll check and tell you if it works on march.
Thanks for advices
comment:12 Changed 16 months ago by mickem
- Milestone set to 0.4.0
comment:13 Changed 16 months ago by mickem
- Component changed from NRPEListener to NRPE
comment:14 Changed 16 months ago by mickem
- Resolution set to fixed
- Status changed from new to closed
Added dependency to Tcpip on the service install which in conjunction with the cache_allowed_hosts=0 flag hopefully solves this issue. If not please reopen...
Michael Medin









Could you provide debug logs from NSClient++?