Skip to content
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

v0.29.0-rc.0 Installer #1622

Closed
Kherm13 opened this issue Sep 11, 2024 · 7 comments · Fixed by #1623
Closed

v0.29.0-rc.0 Installer #1622

Kherm13 opened this issue Sep 11, 2024 · 7 comments · Fixed by #1623
Labels

Comments

@Kherm13
Copy link

Kherm13 commented Sep 11, 2024

Current Behavior

Installing new version windows_exporter v0.29.0.rc.0 how I normally would via PowerShell and windows service not starting up. Windows Event Viewer shows 'Cannot create another system semaphore.'

Normal Install Process:
msiexec.exe /i "C:\temp\windows_exporter-0.29.0-rc.0-amd64.msi" /q --% EXTRA_FLAGS="--config.file=C:\windows_exporter\config\windows_exporter-config.yml"

After looking at the windows service, it looks like its passing the new default path for --config.file AND also my extra_flags (along with --collectors.enabled [defaults])

windows_exporter path to executable
"C:\Program Files\windows_exporter\windows_exporter.exe" --log.file eventlog --config.file="C:\Program Files\windows_exporter\config.yaml" --collectors.enabled [defaults] --config.file=C:\windows_exporter\config\windows_exporter-config.yml

If I remove the first --config.file and --collectors.enabled[defaults] via the registry for the windows service, it works as expected.

"C:\Program Files\windows_exporter\windows_exporter.exe" --log.file eventlog --config.file=C:\windows_exporter\config\windows_exporter-config.yml

Expected Behavior

powershell install with custom config file should work normally. With the new installer, its passing arguments that I don't want/need. It should take into consideration what's being passed unless there is some other way I should be passing them now?

Steps To Reproduce

Run installer via PowerShell and pass EXTRA_FLAGS
Windows Service does not start up and throws 'Cannot create another system semaphore' in Event Viewer
Removing the additional --config.file and --collectors.enabled[defaults] from registry manually fixes it

Environment

  • windows_exporter Version: v0.29.0-rc.0
  • Windows Server Version: Windows Server 2022

windows_exporter logs

Cannot create another system semaphore.

Anything else?

No response

@jkroepke
Copy link
Member

Hey @Kherm13

thanks for open a report. I appreciate that you test pre-releases.

Cannot create another system semaphore.

Thats an error that I even observe on healthy system from windows_exporter. At the moment, I have no idea what the root cause here.

I will introduce a separate flag similar to EXTRA_FLAGS which makes the config file configurable. If empty, the flat will be omit.
The background is #1466 where we would introduce a default config yaml without having the requirement to configure a YAML file.

If ENABLED_COLLECTORS is set to an empty string, e.g. msiexec.exe /i "C:\temp\windows_exporter-0.29.0-rc.0-amd64.msi" /q ENABLED_COLLECTORS=, then the collectors.enabled flag will be omit to.

I guess the best solution here is to revert the change and leave the property with an empty value by default.

@jkroepke
Copy link
Member

@Kherm13
Copy link
Author

Kherm13 commented Sep 12, 2024

Ran the amd64 installer with the following command

msiexec.exe /i "C:\temp\windows_exporter-0.29.0-rc.0-5-g2d5b0a7-amd64.msi" /q --% EXTRA_FLAGS="--config.file=C:\windows_exporter\config\windows_exporter-config.yml"

It not longer has the --collectors.enabled [defaults] but it still has the first --config.file entry for the windows_exporter service

windows_exporter path to executable
"C:\Program Files\windows_exporter\windows_exporter.exe" --log.file eventlog --config.file="C:\Program Files\windows_exporter\config.yaml" --config.file=C:\windows_exporter\config\windows_exporter-config.yml

@jkroepke
Copy link
Member

but it still has the first --config.file entry for the windows_exporter service

This is expected. You have 2 choices here:

msiexec.exe /i "C:\temp\windows_exporter-0.29.0-rc.0-5-g2d5b0a7-amd64.msi" /q --% CONFIG_FILE="" EXTRA_FLAGS="--config.file=C:\windows_exporter\config\windows_exporter-config.yml"

or

msiexec.exe /i "C:\temp\windows_exporter-0.29.0-rc.0-5-g2d5b0a7-amd64.msi" /q --% CONFIG_FILE="C:\windows_exporter\config\windows_exporter-config.yml"

@Kherm13
Copy link
Author

Kherm13 commented Sep 12, 2024

Got ya - will give it another try and report back! Thanks for the quick responses

@Kherm13
Copy link
Author

Kherm13 commented Sep 12, 2024

This appears to work

msiexec.exe /i "C:\temp\windows_exporter-0.29.0-rc.0-5-g2d5b0a7-amd64.msi" /q --% CONFIG_FILE="C:\windows_exporter\config\windows_exporter-config.yml"

@jkroepke
Copy link
Member

I'm aware that there is a breaking change, I will try to highlight this more at the final changelog.

The background was that some users had serious issues like #1466 and the msi installer is not so fully flexible to cover a breaking change.

I hope thats fine here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants