Vonng / pg_exporter

Advanced PostgreSQL & Pgbouncer Metrics Exporter for Prometheus
https://pigsty.io
Apache License 2.0
167 stars 44 forks source link

Dial tcp: lookup postgres on 127.0.0.53:53: server misbehaving, retrying in 10s source="pg_exporter.go:1379" #2

Closed Grimcrow closed 4 years ago

Grimcrow commented 4 years ago

When I run the following command.

pg_exporter --url=postgresql://user:password@localhost:5432/?sslmode=disable&host=/var/run/postgresql --config=pg_exporter.yaml

I get the following error

INFO[0000] retrieve target url postgresql://user:password@localhost:5432/?sslmode=disable from command line  source="pg_exporter.go:1626"
INFO[0000] fallback on default config path: pg_exporter.yaml  source="pg_exporter.go:1666"
ERRO[0000] fail connecting to primary server: fail fetching server version: dial tcp: lookup postgres on 127.0.0.53:53: server misbehaving, retrying in 10s  source="pg_exporter.go:1379"
ERRO[0010] fail connecting to primary server: fail fetching server version: dial tcp: lookup postgres on 127.0.0.53:53: server misbehaving, retrying in 10s  source="pg_exporter.go:1383"
ERRO[0020] fail connecting to primary server: fail fetching server version: dial tcp: lookup postgres on 127.0.0.53:53: server misbehaving, retrying in 10s  source="pg_exporter.go:1383"

I am using Ubuntu 20.04 Focal Fossa LTS. pg_exporter version being used: v0.2.0 Any assistance will be highly appreciated.

Grimcrow commented 4 years ago

I am closing this issue because I found the issue to be with the user I used to connect to postgres