-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
receiver/splunkhec does not start when both logs and metrics are enabled : failed to bind to address :8088: listen tcp :8088: bind: address already in use #18734
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Yes, you will need to use separate ports for each as we don't currently support reusing the http server between receivers. Make sure to define an additional splunk_hec receiver for metrics for example. This is still a valid issue - we can look into this. |
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/internal/sharedcomponent can provide a way to use the same port for multiple signals. |
Thanks @atoulme. I guess, I just misunderstood the README (or it's might be not quite certain about that?). |
The Splunk HEC receiver is old, we can definitely use this shared component. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Fixed by #19189 |
Component(s)
receiver/splunkhec
What happened?
Description
The collector with splunkhec receiver does not start if both logs and metrics flows enabled
Steps to Reproduce
Run the collector with the below config
Expected Result
The collector should start
Actual Result
Got the following error:
Error: cannot start pipelines: failed to bind to address :8088: listen tcp :8088: bind: address already in use
Collector version
v0.71.0
Environment information
Environment
OS: Amazon Linux 2
Compiler: go version go1.19.1 darwin/arm64 (cross-compiled)
OpenTelemetry Collector configuration
Log output
Additional context
I noticed, that when the Start() method is called for the second time, the following condition should become true
opentelemetry-collector-contrib/receiver/splunkhecreceiver/receiver.go
Line 186 in fdd01de
but it does not (r.server.Handler is not nil) and it's trying to bind again, and, obviously fails
The text was updated successfully, but these errors were encountered: