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

Panic on start when BindAddr cannot be resolved #217

Closed
buraksezer opened this issue Feb 1, 2023 · 0 comments
Closed

Panic on start when BindAddr cannot be resolved #217

buraksezer opened this issue Feb 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working network Networking releated issues

Comments

@buraksezer
Copy link
Owner

Olric panics on start if BindAddr is invalid or cannot be resolved. It should return an error and quit with exit code 1.

Sample config:

olricd:
  # BindAddr denotes the address that Olric will bind to for communication
  # with other Olric nodes.
  bindAddr: foobar
➜  olric git:(release/v0.5.0) ✗ olricd -c cmd/olricd/olricd-local.yaml
2023/02/01 20:13:24 [INFO] pid: 2055 has been started
2023/02/01 20:13:24 [ERROR] Failed to start Olric: invalid BindAddr: lookup foobar: no such host
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x78 pc=0x10477b6c8]

goroutine 1 [running]:
github.com/buraksezer/olric.(*Olric).Shutdown(0x0, {0x1049b7bd8, 0x140000eddc0})
	/Users/buraksezer/go/src/github.com/buraksezer/olric/olric.go:397 +0x28
github.com/buraksezer/olric/cmd/olricd/server.(*Olricd).Shutdown(...)
	/Users/buraksezer/go/src/github.com/buraksezer/olric/cmd/olricd/server/server.go:101
main.main()
	/Users/buraksezer/go/src/github.com/buraksezer/olric/cmd/olricd/main.go:128 +0x54c
@buraksezer buraksezer added bug Something isn't working network Networking releated issues labels Feb 1, 2023
@buraksezer buraksezer self-assigned this Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working network Networking releated issues
Projects
None yet
Development

No branches or pull requests

1 participant