Skip to content

Handle collector Start error#2647

Merged
yurishkuro merged 1 commit intojaegertracing:masterfrom
albertteoh:report-bind-address-taken-error
Nov 25, 2020
Merged

Handle collector Start error#2647
yurishkuro merged 1 commit intojaegertracing:masterfrom
albertteoh:report-bind-address-taken-error

Conversation

@albertteoh
Copy link
Copy Markdown
Contributor

Signed-off-by: albertteoh albert.teoh@logz.io

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/cobra@v0.0.5/command.go:826\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/albertteoh/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/albertteoh/go/pkg/mod/github.com/spf13/cobra@v0.0.5/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 <albert.teoh@logz.io>
@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