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

Handle collector Start error #2647

Merged

Conversation

albertteoh
Copy link
Contributor

Signed-off-by: albertteoh [email protected]

Which problem is this PR solving?

Short description of the changes

  • Handle error from Start call in collector.
  • Fixes symptom of collector not reporting error and exiting if port 14250 is taken.

Testing

Tested happy path where no port conflicts exist as well as failure case:

$ SPAN_STORAGE_TYPE=memory go run ./cmd/collector/main.go
...
{"level":"fatal","ts":1606280888.116083,"caller":"collector/main.go:100","msg":"Failed to start collector","error":"could not start gRPC collector failed to listen on gRPC port: listen tcp :14250: bind: address already in use","stacktrace":"main.main.func1\n\t/Users/albertteoh/go/src/github.com/albertteoh/jaeger/cmd/collector/main.go:100\ngithub.com/spf13/cobra.(*Command).execute\n\t/Users/albertteoh/go/pkg/mod/github.com/spf13/[email protected]/command.go:826\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/albertteoh/go/pkg/mod/github.com/spf13/[email protected]/command.go:914\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/albertteoh/go/pkg/mod/github.com/spf13/[email protected]/command.go:864\nmain.main\n\t/Users/albertteoh/go/src/github.com/albertteoh/jaeger/cmd/collector/main.go:135\nruntime.main\n\t/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:204"}
exit status 1

Signed-off-by: albertteoh <[email protected]>
@albertteoh albertteoh requested a review from a team as a code owner November 25, 2020 05:10
@albertteoh albertteoh requested a review from vprithvi November 25, 2020 05:10
@mergify mergify bot requested a review from jpkrohling November 25, 2020 05:10
@yurishkuro yurishkuro merged commit d1fffab into jaegertracing:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jaeger collector not reporting "bind address already in use" error
3 participants