windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

Can't install both .exe and .msi package

Open amigthea opened this issue 2 years ago • 8 comments

When I execute the .exe it gives me this error in the terminal window

panic: ReqQueryValueEx failed: The system cannot find the file specified. errno 2

goroutine 1 [running]:
github.com/leoluk/perflib_exporter/perflib.QueryNameTable({0x89eb20, 0xb})
        C:/Users/runneradmin/go/pkg/mod/github.com/leoluk/[email protected]/perflib/nametable.go:43 +0x257
github.com/leoluk/perflib_exporter/perflib.init.0()
        C:/Users/runneradmin/go/pkg/mod/github.com/leoluk/[email protected]/perflib/perflib.go:269 +0x29

when I execute the .msi packages the installer freeze for some time and then it pops this error

Service 'windows_exporter' (windows_exporter) failed to start. Verify that you have sufficient privileges to start system services.

I know that's not a problem of privileges because yesterday it worked, I installed and uninstalled the .msi packages a few times without problem, same machine and same windows account (with admin privileges)

amigthea avatar May 02 '22 11:05 amigthea

what are the command line params on the service? what cli params did you launch with?

trippinnik avatar May 05 '22 18:05 trippinnik

The .exe is not an installer

amigthea avatar May 05 '22 18:05 amigthea

what are the command line params on the service? what cli params did you launch with?

It would output the same error even without any command line params Beside that, for the .exe, I just doubleclick on it and that error pops out

amigthea avatar May 07 '22 12:05 amigthea

Some additional info. If to use this ansible role https://github.com/sbaerlocher/ansible.wmi_exporter - it is now impossible to install .msi package as a service, the error appeared The windows_exporter service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. (tried 0.18.0, 017.1, 0.17.0) And i found this answer on stackoverflow https://stackoverflow.com/a/3582179 that, seems to me is about this error. I am not so proficient with building the apps like windows_exporter, but I tried to use nssm tool, mentioned in the thread below this answer, and it helps.

usefree avatar May 16 '22 13:05 usefree

@Azertooth it sounds like the exporter is failing to start. Check the event logs to see if the exporter is outputting any useful information.

@usefree I can't speak for the Ansible role as I'm unfamiliar with it, but please also check the event logs to see if the exporter is logging any errors.

breed808 avatar May 18 '22 09:05 breed808

@breed808 the problem is not in Ansible role at all, please, don't take it to your attention. The problem is : now the exe file of wondows exporter could not be used for creating windows service with sc command. And there are no other messages in windows logs except The windows_exporter service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. thanks!

usefree avatar May 18 '22 10:05 usefree

@breed808 the problem is not in Ansible role at all, please, don't take it to your attention. The problem is : now the exe file of wondows exporter could not be used for creating windows service with sc command. And there are no other messages in windows logs except The windows_exporter service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. thanks!

I can confirm the same vague logs in the event collector

amigthea avatar May 18 '22 10:05 amigthea

Are any flags being provided to the MSI installer? I recall experiencing the same issue some time ago. The EXTRA_FLAGS provided to the MSI installer were incorrect, causing the exporter to fail on startup and resulting in the installation failing.

It may be worth running the EXE with the same flags that have been provided to the MSI, and reviewing the output.

Hopefully that helps. I'm not sure I can be of much further assistance without more info.

breed808 avatar May 28 '22 23:05 breed808

I have recently had the same issue on 2 machine. they are AWS instances which our IT built from images. Fix for me was to rebuild the resource counters. launch cmd as admin and execute: lodctr /r Note: on one machine rebuild gave me a error but a second run worked and then installation of windows exporter worked fine. What led me to this discovery was I tried to open performance counter and got a error and then found I could one add any counters. Reference to instructions I used. technet

SuperSonicFlea avatar Sep 22 '22 21:09 SuperSonicFlea

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

github-actions[bot] avatar Nov 25 '23 02:11 github-actions[bot]