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

SIGSEGV: segmentation violation #14

Open
kozicpetar opened this issue Apr 7, 2023 · 1 comment
Open

SIGSEGV: segmentation violation #14

kozicpetar opened this issue Apr 7, 2023 · 1 comment

Comments

@kozicpetar
Copy link

OS version: AlmaLinux release 8.7 (Stone Smilodon)

pdns_exporter version: 0.2.3

powerdns_exporter, version  (branch: , revision: )
  build user:
  build date:
  go version:       go1.10.4

Try to run powerdns exporter:

powerdns-exporter --listen-address="0.0.0.0:9120" --api-url="http://localhost:953/api/v1" --api-key="my_api_key"

Got error:

level=error ts=2023-04-07T10:59:27.588Z caller=powerdns_exporter.go:423 msg="Could not fetch PowerDNS server info" err="Not Found"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x888ec2]

goroutine 1 [running]:
main.main()
	/home/pleal/powerdns_exporter/powerdns_exporter.go:426 +0x932

Curl to PowerDNS api:
curl -s -H 'X-API-Key: my_api_key' http://127.0.0.1:953/api/v1/servers

"autoprimaries_url":"/api/v1/servers/localhost/autoprimaries{/autoprimary}",
"config_url":"/api/v1/servers/localhost/config{/config_setting}",
"daemon_type":"authoritative",
"id":"localhost",
"type":"Server",
"url":"/api/v1/servers/localhost",
"version":"4.7.2",
"zones_url":"/api/v1/servers/localhost/zones{/zone}"
@kozicpetar
Copy link
Author

I found what was the problem, --api-url need to have slash at the end
--api-url="http://localhost:953/api/v1/"

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

No branches or pull requests

1 participant