-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Run as Windows Service #6433
Comments
I am having the same issue. Have been running and upgrading otel as service many times, but upgrading from 0.61.0 to 0.63.0 results in failing at startup, complaining that at least one config file must be provided. My command for setting up the service, which has always worked before, is the following: sc.exe create otelcol displayname= otelcol start= delayed-auto binPath= "C:\bin\otelcol\otelcol-contrib.exe --config C:\bin\otelcol\otel-config.yaml" |
/cc @open-telemetry/collector-approvers @open-telemetry/collector-maintainers |
Could you try 0.62.1 and see if the issue also happens there? |
Sure, I'll try that tomorrow. |
If someone wants to give it a try, I built a binary reverting a PR that seemed suspicious based on the info we have so far, you can download it from here: https://github.com/open-telemetry/opentelemetry-collector/actions/runs/3346624945 |
I just tested the core collector from that revert and was able to see the service start |
This should be fixed, we are doing a patch release now. |
This works. Thank you! |
Hello there! I still have this issue with |
@kooshan can you file a new issue for this? It is likely that the problem you are facing is not the same as the one on this issue. |
When running as a windows service installed by new-service (PS) or sc.exe I get
Error from windows event logs
The OpenTelemetry service terminated with the following error:
An exception occurred in the service when handling the control request.
I know this was added
#1119
What is the correct way to add + run + run with config file as a windows service
Sample code:
New-Service -Name "OpenTelemetry" -BinaryPathName '"C:\OpenTelemetry\otelcol-contrib.exe --config otel-iis.yaml"'
New-Service -Name "OpenTelemetry" -BinaryPathName '"C:\OpenTelemetry\otelcol-contrib.exe --config C:\OpenTelemetry\otel-iis.yaml"'
Neither works with obviously bin an config file in that location.
Windows event logs
EventData
param1 OpenTelemetry
param2 %%1064
4F00700065006E00540065006C0065006D0065007400720079000000
The text was updated successfully, but these errors were encountered: