We have set up our own internal repositories following a directory hierarchy similar to:
https://packages.icinga.com/IcingaForWindows/stable/
Our repository stores different versions of Icinga components, and we have a custom script to install the Icinga2 agent. Recently, while attempting to upgrade the agent, we encountered the following error:
[Error]: Failed to convert retrieved content from repository "Icinga Stable" with location "http://****/Software/Icinga2/Windows/Installer/IcingaForWindows/stable" to JSON
This issue arises when updating ifw.repo.json
to pick up the latest Icinga PowerShell Framework version (e.g., 1.13.0 or higher). The installation works fine with version 1.11.1, but any attempt to use a newer version results in the above JSON conversion error, regardless of how many times we try.
Workaround Attempted:
- I manually downloaded the Icinga PowerShell Framework 1.13.0 via PowerShell and replaced the existing 1.11.1 installation.
- Interestingly, this worked as expected because the plugin version (icinga-powershell-plugins-1.13.0.zip) is available in the repository.
- However, the script still fails to download and install the framework automatically during agent installation.
Background:
We have created our own internal repositories for Icinga2 and structured them similarly to the official Icinga repository:
Example Directory Hierarchy:
http://<internal-repo>/Software/Icinga2/Windows/Installer/IcingaForWindows/stable/
This repository stores multiple versions of Icinga components, allowing us to manage different versions of the agent and framework.
We have also developed a custom PowerShell script to install the Icinga2 Agent from our internal repository.
Issue Encountered:
Recently, we attempted to upgrade the Icinga2 Agent by modifying our ifw.repo.json
file to use the latest Icinga PowerShell Framework version 1.13.0 instead of 1.11.1.
Previous Working Entry (1.11.1):
{
"Hash": "EXAMPLE_HASH",
"Location": "framework/icinga-powershell-framework-1.11.1.zip",
"RelativePath": true,
"Version": "1.11.1",
"Snapshot": false,
"Architecture": "Multi"
}
When using version 1.11.1, the installation works perfectly.
Updated Entry for 1.13.0 (Causing Issues):
{
"Hash": "0770E311C418D98536F81422F7C2E10A43D8BE211D169D36E6C5351D13CA98C4",
"Location": "framework/icinga-powershell-framework-1.13.0.zip",
"RelativePath": true,
"Version": "1.13.0",
"Snapshot": false,
"Architecture": "Multi"
}
After making this change, we repeatedly encounter the following error during installation:
Error Message:
[Error]: Failed to convert retrieved content from repository "Icinga Stable" with location "http://****/Software/Icinga2/Windows/Installer/IcingaForWindows/stable" to JSON
This error persists regardless of how many times we try to install the agent using the updated ifw.repo.json
.
Troubleshooting Steps Taken:
- Checked JSON Formatting:
- Validated the
ifw.repo.json
file to ensure it is correctly structured. - Confirmed that there are no trailing commas or syntax errors.
- Verified File Accessibility:
- Confirmed that
icinga-powershell-framework-1.13.0.zip
is accessible from the repository URL. - Downloaded the file manually to verify it exists and is not corrupted.
- Compared with Working Version (1.11.1):
- No changes in repository structure or installation script.
- Only difference is the updated version in
ifw.repo.json
.
- Attempted to Reinstall Multiple Times:
-
No success. The same error occurs every time.
-
Why does Icinga fail to parse the repository JSON when switching to version 1.13.0?
-
Are there known issues with the Icinga PowerShell Framework 1.13.0 in internal repositories?
-
Does Icinga validate the hash or file differently for newer versions?
-
Is there a way to debug why the repository conversion fails?
Any insights or suggestions would be greatly appreciated!