Exception Message "Unable to connect to the remote server" when using JEA

Hi,
i am trying to set up monitoring on a windows server.
After having installed the JEA profile with Install-IcingaSecurity i am getting the following message in icinga web:
Icinga Exception: Unable to start the PowerShell.exe with the provided JEA profile "IcingaForWindows" for CheckCommand: Invoke-IcingaCheckTimeSync
and the Windows Event Log says:
Failed to query Icinga check over internal REST-Api check handler A service check could not be executed by using the internal REST-Api check handler. The check either ran into a timeout or could not be processed. Maybe the check was not registered to be allowed for being executed. Further details can be found below. Icinga for Windows exception report: Exception Message: Unable to connect to the remote server Invocation Name: Invoke-WebRequest Command Origin: Internal Script Line Number: 3192 Exact Position: At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\cache\framework_cache.psm1:3192 char:22 + ... ApiResult = Invoke-WebRequest -Method POST -UseBasicParsing -Uri ([st ... +

I believe I followed all steps in the guide/docs but the more I look at it the more i am confused.

IIRC the checks did work without JEA.
Anyone with an idea how to “debug” this further?
How, for example, do I check if the JEA Profile is installed correctly?

Thanks for any hint,
Christian

Hi all.
Today finally was some time to investigate further into this.
I found out the icinga services (“Icinga 2” and “Icinga PowerShell Service”) were NOT running as user “icinga”.
I tried to force setting the user to “icinga” with the commands “Use-Icinga” and " Set-IcingaServiceUser icinga".
Findung out that the user is configured after that but restarting the service failed with wrong credentials.
A newly fired “Install-IcingaSecurity” did finally fix it.
Just in case someone else has similar problems.
No idea what caused this: Either a bug or some misconfiguration on my side…
And unfortunately (for me) impossible to reproduce (meaning i have no idea where to start with that).

Cheers,
Christian

1 Like

I had similar problem after Updating the Icinga complete framework.
NOw I’m having all checks with this error:

Icinga Exception: Unable to start the PowerShell.exe with the provided JEA profile “IcingaForWindows” for CheckCommand: Invoke-Icingaxxxxxxxxxxx
For all the checks I have
My Icingafor windows event log says:
Icinga for Windows JEA context not available

The Icinga for Windows JEA session is no longer available and is attempted to be restarted on the system. This could have either happened due to a crash or a user action, like restarting the WinRM service.

Can you details more in details how you correct this ?
THX