We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Instead of a graceful exit the scraper panics with a segfault if the listening address is already bound
level=error timestamp=2024-06-12T01:21:25.773821082Z caller=utils.go:76 msg="http server failed: listen tcp :9630: bind: address already in use" panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x88f2d5] goroutine 1 [running]: database/sql.(*DB).Close(0x0) /home/craig/apps/go-1.22/src/database/sql/sql.go:910 +0x35 github.com/Vonng/pg_exporter/exporter.(*Exporter).Close(0xc000228000) /home/craig/projects/EDB/pg_exporter/exporter/exporter.go:209 +0x188 github.com/Vonng/pg_exporter/exporter.Run() /home/craig/projects/EDB/pg_exporter/exporter/main.go:219 +0xd17 main.main() /home/craig/projects/EDB/pg_exporter/main.go:22 +0xf
The text was updated successfully, but these errors were encountered:
The usual exit log would be like:
$ pg_exporter --web.listen-address=:9630 --url='postgres://dbuser_monitor:DBUser.Monitor@:5432/postgres?sslmode=disable&host=/var/run/postgresql' level=info timestamp=2024-06-15T05:55:26.864156054Z caller=utils.go:56 msg="retrieve target url postgres://dbuser_monitor:xxxxx@:5432/postgres?sslmode=disable&host=/var/run/postgresql from command line" level=info timestamp=2024-06-15T05:55:26.86419695Z caller=utils.go:56 msg="fallback on default config path: /etc/pg_exporter.yml" level=info timestamp=2024-06-15T05:55:26.881175487Z caller=utils.go:56 msg="server [postgres] version changed: from [0] to [160002]" level=info timestamp=2024-06-15T05:55:26.882476185Z caller=utils.go:56 msg="pg_exporter for postgres://dbuser_monitor:xxxxx@:5432/postgres?sslmode=disable&host=/var/run/postgresql start, listen on http://:9630/metrics" level=error timestamp=2024-06-15T05:55:26.882562236Z caller=utils.go:76 msg="http server failed: listen tcp :9630: bind: address already in use" level=info timestamp=2024-06-15T05:55:26.882602071Z caller=utils.go:56 msg="pg exporter closed"
This error seems related to the database/sql driver Close connection part. Could you add some more context info about this error?
database/sql
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Instead of a graceful exit the scraper panics with a segfault if the listening address is already bound
The text was updated successfully, but these errors were encountered: