Can't instal Icinga Agent on one single Windows Server

Hey, there! I’ve got a somewhat difficult problem on my hand. We’ve got roundabout 200 Windows servers monitored via Icinga for Windows.
We updated almost all of the agents to the recommended version 2.14.3 except one. This server behaves somewhat strange. It runs Windows Server 2016 on the most recent updates. It is an application server where there are more of it’s kind but with no problems installing the agent.

There has been an Agent running on this machine up until the failed update

We usually install our agents via Ansible and the kickstart script. This particular Host ran into an error, so i tried installing it manually on the Host with the same kickstart script. The installation runs through pretty much unphased, with the exception of the agent not being installed:

As you can see, the agent isn’t installed, but the framwork, plugins and service are.

Trying to install the MSI on itself results in the following message:

So i tried logging the installation:

=== Verbose logging started: 28.11.2024  15:11:09  Build type: SHIP UNICODE 5.00.10011.00  Calling process: C:\Windows\system32\msiexec.exe ===

[...]

MSI (s) (D8:D4) [15:12:52:946]: Executing op: ActionStart(Name=XtraInstall,,)
Action 15:12:52: XtraInstall. 
MSI (s) (D8:D4) [15:12:52:946]: Executing op: CustomActionSchedule(Action=XtraInstall,ActionType=3090,Source=C:\Program Files (x86)\ICINGA2\sbin\icinga2-installer.exe,Target=install,)
CustomAction XtraInstall returned actual error code -1073740791 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (D8:D4) [15:12:53:338]: Note: 1: 1722 2: XtraInstall 3: C:\Program Files (x86)\ICINGA2\sbin\icinga2-installer.exe 4: install 
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action XtraInstall, location: C:\Program Files (x86)\ICINGA2\sbin\icinga2-installer.exe, command: install
MSI (s) (D8:D4) [15:12:59:355]: Product: Icinga 2 -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action XtraInstall, location: C:\Program Files (x86)\ICINGA2\sbin\icinga2-installer.exe, command: install

[...]

=== Logging stopped: 28.11.2024  15:13:02 ===
MSI (c) (84:10) [15:13:02:789]: Note: 1: 1708 
MSI (c) (84:10) [15:13:02:789]: Product: Icinga 2 -- Installation failed.

MSI (c) (84:10) [15:13:02:790]: Windows Installer installed the product. Product Name: Icinga 2. Product Version: 2.14.3. Product Language: 1033. Manufacturer: Icinga GmbH. Installation success or error status: 1603.

MSI (c) (84:10) [15:13:02:791]: Grabbed execution mutex.
MSI (c) (84:10) [15:13:02:791]: Cleaning up uninstalled install packages, if any exist
MSI (c) (84:10) [15:13:02:792]: MainEngineThread is returning 1603
=== Verbose logging stopped: 28.11.2024  15:13:02 ===


The log itself is not current, but the problem is the same since then.

There seems to be an internal issue with the installer. I think I’m out of luck.

What I tried so far:

  • Installing a different version
  • Installing for a different architecture
  • Installing a different application via MSI (Firefox, it succeeded)
  • using a different target path
  • using a different source path
  • checking that the “SYSTEM” User has rights on both the “Program Files” and “ProgramData” Folders
  • installing the same package on a different machine
  • rebooting the server
  • unregistering and re-registering the MSI-Installer

All actions are made with administrative privileges of course.

I hope that there is somebody out there, who can help me steering this in the right direction.

the agent is quite sensitive about file remnants in appdata or what ever the folder is. clean them out or rename the whole folder and you should be good.

That indeed let me in the right direction.

There was still an icinga2 directory in the ProgramData folder.
However i tried deleting it via powershell which gave me the next curious error.
Everything in it was deleted except “icinga2/var/lib/icinga2”. And for the love of everything that is holy i couldn’t get itself to be deleted.
It always claimed, that the directory is not empty but there where no files inside.
The trick was as stupid as it can be and i can’t fathom to understand why this worked:
I placed a small text file in the empty (or not empty) folder, then delete it via the recycle bin.
The recycle bin is crucial. No Powershell-recurse magic, no shift+del. Plain and simple del or right-click delete.

After that i could install the agent again. Thanks for the help!

1 Like