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

fix lb strategy logging error #346

Merged
merged 2 commits into from
Apr 10, 2022
Merged

Conversation

mnotti
Copy link
Contributor

@mnotti mnotti commented Mar 16, 2022

To address issue #313

Issue was supposed to be resolved here: 76c59b6

... But I was still getting the same error when building the latest master and running locally - e.g.

➜  dist git:(master) ✗ ./ghz --insecure \
--proto=usage_data_gateway.proto \
--call=UsageDataGateway.Ping \
--lb-strategy=round_robin \
localhost:6421

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x134edf2]

goroutine 1 [running]:
go.uber.org/zap.(*SugaredLogger).log(0x0, 0x1, {0x0, 0x0}, {0xc00053d9d0, 0x8, 0x5}, {0x0, 0x0, 0x0})
	/Users/markusnotti/go/pkg/mod/go.uber.org/[email protected]/sugar.go:221 +0x52
go.uber.org/zap.(*SugaredLogger).Warn(...)
	/Users/markusnotti/go/pkg/mod/go.uber.org/[email protected]/sugar.go:107
main.main()
	/Users/markusnotti/code_personal/ghz/cmd/ghz/main.go:319 +0x53c

Have tested locally (macOS) with make build and run the same command as above successfully.

Also tested with --debug=debug.json option and confirmed the log line appears and looks as it should i.e.
{"level":"warn","time":"2022-03-16T14:55:33.914884-07:00","message":"Load balancing strategy set without using DNS (dns:///) scheme. ","strategy":"round_robin","host":"localhost:6421"}

@bojand bojand merged commit 310c25f into bojand:master Apr 10, 2022
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.

2 participants