-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Metricbeat service times-out at startup on Windows #3018
Comments
When i run the "Start-Service metricbeat" command in PowerShell,it was failed as bellow:
The OS's version is windows 7. |
@qhlHelo, try to run Powershell with administratives privileges. |
@maddin2016 |
@qhlHelo, do you mean you had the same problem like @Cylindric? Or only to start the service with powershell. |
@maddin2016, just a moment ago,i had a test with the current version(5.0.1) again, this time i could start the service with powershell correctly. I think I have known why the problem occurred before. At the time of the previous test, I opened the local services window with "services.msc" and I usually observed the status of all kinds of services, then I started the service with powershell while the service window remained opening. I think this is the cause. Nothing but I had started the service, I met the err info in metricbeat's log as below:
I will test it with metricbeat-6.0.0-alpha1-SNAPSHOT-windows-x86_64.zip |
@andrewkroh, i have look trough the codebase and i think there is too much work until the service gives a signal that he is running. For example all that init stuff to run through all the modules i would put into the |
Looks like the same issue I've been seeing from the start - #2817 |
@maddin2016
I don't advise doing this because it will break the configuration validation ( Each module's factory function is supposed to run fast and only validate config and do minimal setup (no external connections, no fetching, etc.). The system-process MetricSet is violating this concept here. I suspect that if this is moved into the Fetch method and only run once on the first |
Ok, sounds good. I will test and probably open a PR. |
I am running MetricBeat on about 30 Windows servers, and on one of them it's having trouble. Running it manually seems to work fine, although I get a whole bunch of "Skip process pid" messages due to missing pids, but I think that's fine.
If I start it as a service however, it appears to start correctly, start to read pids, and then just silently terminates. In the Service Manager, it seems to take ages to start, at which point the SM gives up with a timeout error.
This is the debug log output. The "error getting process details" ones repeat about 60 times.
It gets to that first ERR line REALLY quickly, so it does look like it's not sending a service signal correctly for some reason. Interestingly, on the other ~20 servers I have, it's not a problem - just on two.
They are all Windows Server 2012 R2.
I originally brought this up on the forum, and @andrewkroh may have found a possible cause:
The text was updated successfully, but these errors were encountered: