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

running as a windows services #214

Closed
TimmyGilissen opened this issue Oct 10, 2022 · 12 comments
Closed

running as a windows services #214

TimmyGilissen opened this issue Oct 10, 2022 · 12 comments

Comments

@TimmyGilissen
Copy link

I'm using nssm to install the otel collector as a windows service.

But every-time the service wants to start it goes in pauze mode.

What i'm i missing to install the collector as a windows service?

Using collector version 0.60.0.

thx
Timmy

@elitistphoenix
Copy link

I'd be interested to know how it installs the service? Maybe a windows registry screenshot? I can't get the service to start from a new-service command in powershell

@codeboten
Copy link
Contributor

@elitistphoenix if you're running into issues w/ v0.63.0, it's possibly related to open-telemetry/opentelemetry-collector#6433

@TimmyGilissen
Copy link
Author

i have updated to the new version.

still getting these errors:
2022/11/08 10:47:42 failed to start collector server: The service process could not connect to the service controller.
2022/11/08 10:47:45 failed to start collector server: The service process could not connect to the service controller.

@TimmyGilissen
Copy link
Author

Any news on this topic ?

@jpkrohling
Copy link
Member

I don't think we have any maintainers using Windows, we need your input and engineering help to determine what's the cause and how to fix it.

@Outek
Copy link

Outek commented Dec 15, 2022

I'll try to implement this, we have already some go apps which we install as service on windows.

@TimmyGilissen
Copy link
Author

@Outek that would be awesome thx!

@splitt3r
Copy link

@Outek i think https://github.com/grafana/agent/blob/afd53a233d75df004c04702618918113038fe606/cmd/agent/service_windows.go#L94 and https://github.com/grafana/agent/blob/afd53a233d75df004c04702618918113038fe606/pkg/server/logger_windows.go#L19 are pretty neat examples of how to run a Go application as a Windows Service with logging to the Windows Event Log. Maybe you can get some inspiration from that.

@simcot
Copy link

simcot commented May 16, 2023

I'd be interested to know if @Outek had any success in turning the Otel collector into a windows service as I find myself in the position of using a service creation tool like NSSM 🙏

@PedroMcj
Copy link

Hey @simcot I think I've run into the same problem when using NSSM. After adding the env variable "NO_WINDOWS_SERVICE=1" (as mentioned here ) to the configuration on NSSM, the new service started correctly. Hope this helps!

@pjanotti
Copy link
Contributor

pjanotti commented Feb 5, 2024

@open-telemetry/collector-maintainers I didn't test this on NSSM, I'm not familiar with it, but, I think we can close this one, since detection to run as a service was fixed via open-telemetry/opentelemetry-collector#9042

@mx-psi
Copy link
Member

mx-psi commented Feb 6, 2024

Closing, please file a new issue if you have trouble with running the Collector as a Windows service

@mx-psi mx-psi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@mx-psi mx-psi closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants