-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS handshake with IfW API on host 'localhost' #771
Comments
Could it be possible that the Icinga Agent certificate is not valid or wasn't signed properly during the initial setup? |
On certain systems we’ve retried to reinstall the agent/certificate and this maybe fixes 30/40% of the cases but not all. Also normal checks/non powershell framework checks work fine on the same systems. |
I am experiencing the same issues reported by Drapiti in the already open issue. The error I am encountering is: TLS handshake with IfW API on host 'localhost' (SNI: 'sbwmop01.xxxxxx') port '5668' failed: stream truncated [asio.ssl.stream:1] I have also noticed some errors in the logs, which I am sharing below: ############################################ A client connection could not be established to this server. This issue is mostly caused by using Self-Signed/Icinga 2 Agent certificates for the server and the client not trusting certificates signed by your trusted CA or setup the client to accept untrusted certificates Icinga for Windows exception report: Exception Message: Command Origin: Script Line Number: Exact Position: StackTrace: Call Stack: Command Arguments Get-IcingaExceptionString {ExceptionObject=Exception calling "Authentic... Object details: Available : Could you please provide support in resolving this issue? Thank you in advance. regards |
@LordHepipud so finally we have a probable cause. It seems that the servers which are not working have a different case in the hostname, so most likely it is not matching with the fqdn which we force lowercase on agent install. Icinga itself comunicates correctly however the icinga powershell framework does not because it may be requiring the actual case which is configured on the specific server. To resolve this issue I would suggest to provide an alias on certificate setup which includes both names in lower and uppercase. Could you please check this? |
Thank you for the details. I have tried to reproduce this behavior, but without any success. To test this, I have created an Icinga Agent certificate with a UPPER case hostname and registered that as the Agents name. Now the certificate does look like this on inspect: Icinga for Windows Certificate:
Issuer => CN=Icinga CA
Subject => CN=DEVWIN2022 By checking the hostname, we can see the result: PS> Get-IcingaHostname
devwin2022
PS> Get-IcingaHostname -ReadConstants
DEVWIN2022 For Icinga for Windows this doesn't matter. The Agent is connecting to the parent node just fine, while the Agent actively calls the Icinga for Windows API directly. For the moment I have absolutely no clue, on how I can reproduce this issue. |
Just out of curiosity - when you re-create the Icinga for Windows certificate by using Start-IcingaForWindowsCertificateThreadTask; and restart Icinga for Windows about a minute later - does this issue still persist? |
Unfortunately yes, there is no change. What I have noticed is that the majority of servers have OS version < 2016, not all but most with this issue. |
Receiving this error still on plugin output of a few servers, using both 1.12.3 and 1.13.0 beta.
TLS handshake with IfW API on host 'localhost' (SNI: 'rsmqspus01.xxxxx') port '5668' failed: stream truncated [asio.ssl.stream:1]
The text was updated successfully, but these errors were encountered: