Icinga for Windows failed to start on Agent - using self Service API Template

can you register the host using this form?
and please do it from the machine you want to register.
you can delete the host afterwards…
http://192.168.10.180/director/self-service/register-host

If I add “Icingaweb2” to the url you provided: http://192.168.10.180/icingaweb2/director/self-service/register-host
I can register the host fine actually:

sorry forgot about that. (“icingaweb2”).

Seems this may be a bug. I’m running into the same issue. Did you resolve this?

It still persists if I try to autoinstall everything with the script. However, if I change the script and remove the install commands and insert a skip wizard:

& $ScriptFile `
    -ModuleDirectory 'C:\Program Files\WindowsPowerShell\Modules\' `
    -SkipWizard;

and afterwards manually use the IMC (typing “icinga;” in PS) to set it up, everything works fine for me so far! In the IMC I use “connect from this PC” instead of the “Director Self Service API”.

@Johannes @akellar
What are the settings in the “Icinga Agent and zone settings” section of your hosttemplates?

Hey @moreamazingnick
I have this setting currently. Am I lacking something?

change it to establish connection no…

The error persist with that change, when trying to automate the whole installation:

did you remove the host from icinga director before trying again?

I did, yes. And deployed changes of course.

edit: php file located in /usr/share/icingaweb2/modules/director/application/controllers

@Johannes @moreamazingnick found this issue on their github. Implementing the fix PHP fixed my issue without having to make any changes to the script from the host template in the director.

2 Likes

@akellar That did the trick! Thanks so much :slight_smile:

I have the same issue. I tried all suggestions from this thread, but it’s still not working.

This is working btw.

Edit:
If I use the deprecated Icinga 2 Agent from https://github.com/Icinga/icinga2-powershell-module it’s working fine. That’s the Agent I have actually running on my Windows servers.