Skip to main content

Hello,

I would like to open a new ticket concerning problems I am having with Centreon NSClient on Windows Server 2016.

Old topic : 

 

I think that the resolution of the problem last time was a stroke of luck … Always the same mistake: “CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.”

Has anyone had this problem recently?

 

Here are the logs:

 

2022-03-14 10:19:21: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: short read
2022-03-14 10:21:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-03-14 10:22:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:24:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:26:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:28:38: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:29:43: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:31:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-03-14 10:34:50: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:36:04: error:c:\source\0.5.2\include\socket/server.hpp:258: Failed to handle incoming connection: remote_endpoint: Le descripteur de fichier fourni n’est pas valide
2022-03-14 10:36:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:36:39: error:c:\source\0.5.2\include\socket/server.hpp:258: Failed to handle incoming connection: remote_endpoint: Le descripteur de fichier fourni n’est pas valide
2022-03-14 10:37:57: error:c:\source\0.5.2\include\socket/server.hpp:258: Failed to handle incoming connection: remote_endpoint: Le descripteur de fichier fourni n’est pas valide
2022-03-14 10:39:13: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:39:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:40:17: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:41:05: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:41:30: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:44:32: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:46:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:49:21: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application
2022-03-14 10:51:35: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:54:58: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file
2022-03-14 10:56:34: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application

 

Hello
Can you share your nsclient.ini and the command line you’re executing?


Yes of course :

 

# If you want to fill this file with all available options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help

[/settings/log]

; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = info

; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S

; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log

; A list of modules.
[/modules]

; CheckDisk - CheckDisk can check various file and disk related things.
CheckDisk = 1

; CheckEventLog - Check for errors and warnings in the event log.
CheckEventLog = 1

; CheckExternalScripts - Execute external scripts
CheckExternalScripts = 1

; CheckHelpers - Various helper function to extend other checks.
CheckHelpers = 1

; CheckNSCP - Use this module to check the health and status of NSClient++ itself
CheckNSCP = 1

; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1

; NRPEServer - A server that listens for incoming NRPE connection and processes incoming requests.
NRPEServer = 1

; CheckTaskSched - Check status of your scheduled jobs.
CheckTaskSched = 1

; WEBServer - A server that listens for incoming HTTP connection and processes incoming requests. It provides both a WEB UI as well as a REST API in addition to simplifying configuration of WEB Server module.
WEBServer = 0

; CheckNet - Network related check such as check_ping.
CheckNet = 1

; Section for NRPE (NRPEServer.dll) (check_nrpe) protocol options.
[/settings/NRPE/server]

; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true

; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\\]{}) characters in arguments.
allow nasty characters = true

; ALLOWED HOSTS - A coma separated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 127.0.0.1,192.168.31.14

; PORT NUMBER - Port to use for NRPE.
port = 5666

; Needed for long output, with check_centreon_nrpe
payload length = 8192

; EXTENDED RESPONSE - Send more then 1 return packet to allow response to go beyond payload size (requires modified client).
; extended response = true

; ALLOW INSECURE CHIPHERS and ENCRYPTION - Only enable this if you are using legacy check_nrpe client.
insecure = true

; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = false

[/settings/external scripts]
allow arguments = 1
allow nasty characters = 1

[/settings/external scripts/scripts/default]
ignore perfdata = true

[/settings/external scripts/scripts]
check_logfiles=scripts\\centreon\\check_logfiles.exe $ARG1$
check_centreon_plugins=scripts\\centreon\\centreon_plugins.exe --plugin=$ARG1$ --mode=$ARG2$ $ARG3$

I use check_nrpe -H 127.0.0.1, locally on the machine, in the agent's directory.

2022-03-15 11:49:42: error:c:\source\master\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application

2022-03-15 11:52:18: error:c:\source\master\include\socket/connection.hpp:168: Failed to read data: End of file

 

I just tested on another server completely independent of my company's, and the result is the same. I still have an error.

Even disabling the windows firewall does not work.

I recompiled the installer with an old version of NSCP (0.5.2.35), I also have an error.


Hello
 

I invite you to test it from your poller.

But if you really want to test it from your Windows server, you can use this command:

check_nrpe.exe host=127.0.0.1 port=5666 payload-length=8192 insecure

 


It’s the same result :(

 

 


I had the same error message but the “insecure” option solved it:

Here it’s not the same message as previously.

What are the last entries in nsclient.log?


2022-03-15 14:59:01: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application

2022-03-15 14:59:53: error:c:\source\0.5.2\include\socket/connection.hpp:168: Failed to read data: End of file

 


By adding ssl=0 in the command, I have a result. However, by adding "use ssl=false" in the nsclient.ini, it does not work. I added "ssl=0" in nsclient.ini, it doesn't work either.


HI, it appears that you need it on both ends:

  • ssl If this is true we will use SSL encryption on the transport. Notice this flag has to be the same on both ends or you will end up with strange errors. The flag is set on check_nrpe with the -n option (if you use -n no SSL will be used).

https://docs.nsclient.org/howto/nrpe/#nrpe-specific-setting-in-nsclient

 


Great news ! 

 

I modified the nsclient.ini with insecure=false, and it’s work !

 

Thank you for your help!


Reply