Skip to content

Can't use UNIX socket connection #133

Description

@caseyandgina

'user=app_sql_exporter dbname=postgres host=/run/postgresql port=5432'
...results in:
{"caller":"job.go:189","err":"sql: unknown driver \"\" (forgotten import?)","job":"example","level":"warn","msg":"Failed to connect","ts":"2024-07-26T17:50:10.540688846Z"}

'postgres://app_sql_exporter:testpw@%2Frun%2Fpostgresql:5432/postgres'
...results in:
{"caller":"job.go:104","err":"parse \"postgres://app_sql_exporter@%2Frun%2Fpostgresql:5432/postgres\": invalid URL escape \"%2F\"","job":"example","level":"error","msg":"Failed to parse URL","ts":"2024-07-26T17:49:26.091765976Z","url":"postgres://app_sql_exporter@%2Frun%2Fpostgresql:5432/postgres"}

'postgres://app_sql_exporter:testpw@/run/postgresql:5432/postgres'
...results in:
{"caller":"job.go:189","err":"pq: no pg_hba.conf entry for host \"127.0.0.1\", user \"app_sql_exporter\", database \"run/postgresql:5432/postgres\", SSL encryption","job":"example","level":"warn","msg":"Failed to connect","ts":"2024-07-26T17:48:58.382065441Z"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions