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

Errors Running as a Windows Service #121

Open
eagle-rr opened this issue Dec 2, 2021 · 2 comments
Open

Errors Running as a Windows Service #121

eagle-rr opened this issue Dec 2, 2021 · 2 comments

Comments

@eagle-rr
Copy link

eagle-rr commented Dec 2, 2021

We are trying to run the Apache Exporter executable as a Windows service. When running the script using command-line; it works fine. As a windows service, we get the error:

Error 1053: The service did not respond to the start or control request in a timely fashion.

Any suggestions?

@postwarbreakout
Copy link

I just ran into the same issue but could create a service with this tool: NSSM - the Non-Sucking Service Manager
The .exe seems to be missing something that allows it running as service, but NSSM kinda works like a proxy to override this.

Here's an example how it could be installed with a batch file:

xcopy apache_exporter.exe "%PROGRAMFILES%\apache_exporter\"
xcopy nssm.exe "%PROGRAMFILES%\apache_exporter\"
"%PROGRAMFILES%\apache_exporter\nssm.exe" install apache_exporter "%PROGRAMFILES%\apache_exporter\apache_exporter.exe"
nssm set apache_exporter DependOnService Apache2.4
net start apache_exporter

@splitt3r
Copy link

If someone tries to implement this https://github.com/prometheus-community/windows_exporter/blob/master/exporter.go#L466-L491 can be used as a template to add Windows Service funcionality to an Exporter.

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

No branches or pull requests

3 participants