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

Setting metrics port to null in config.yaml panics #8670

Closed
timsehn opened this issue Dec 11, 2024 · 0 comments
Closed

Setting metrics port to null in config.yaml panics #8670

timsehn opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working panic

Comments

@timsehn
Copy link
Contributor

timsehn commented Dec 11, 2024

$ grep -3 metrics config.yaml 

cfg_dir: .doltcfg

metrics:
  host: localhost
  port: null
  labels: {"process": "dolt-sql-server"}
$ dolt sql-server --config=config.yaml
Starting server with Config HP="127.0.0.1:3310"|T="28800000"|R="false"|L="debug"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x101dc3a94]

goroutine 66 [running]:
github.com/dolthub/dolt/go/libraries/doltcore/servercfg.YAMLConfig.MetricsPort(...)
	/Users/timsehn/dolthub/git/dolt/go/libraries/doltcore/servercfg/yaml_config.go:416
github.com/dolthub/dolt/go/cmd/dolt/commands/sqlserver.ConfigureServices.func21({0x103379530?, 0x14000174f50?})
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/commands/sqlserver/server.go:454 +0x58
github.com/dolthub/dolt/go/libraries/utils/svcs.AnonService.Init(...)
	/Users/timsehn/dolthub/git/dolt/go/libraries/utils/svcs/controller.go:48
github.com/dolthub/dolt/go/libraries/utils/svcs.(*Controller).Start(0x14000f1a240, {0x103379530, 0x14000174f50})
	/Users/timsehn/dolthub/git/dolt/go/libraries/utils/svcs/controller.go:221 +0x20c
created by github.com/dolthub/dolt/go/cmd/dolt/commands/sqlserver.Serve in goroutine 1
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/commands/sqlserver/server.go:91 +0x164

This is especially confusing because the remotesapi.port defaults to null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working panic
Projects
None yet
Development

No branches or pull requests

2 participants