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

Won't work with the docker swarm #47

Open
Cyber-Cowboy opened this issue Aug 5, 2022 · 0 comments
Open

Won't work with the docker swarm #47

Cyber-Cowboy opened this issue Aug 5, 2022 · 0 comments

Comments

@Cyber-Cowboy
Copy link

Hi, after migrating from docker compose to docker swarm I noticed, that pgbouncer-exporter stopped working. It fails with the following error on start:

File "/usr/local/lib/python3.6/wsgiref/simple_server.py", line 153, in make_server
     server = server_class((host, port), handler_class)
   File "/usr/local/lib/python3.6/socketserver.py", line 456, in __init__
     self.server_bind()
   File "/usr/local/lib/python3.6/wsgiref/simple_server.py", line 50, in server_bind
     HTTPServer.server_bind(self)
   File "/usr/local/lib/python3.6/http/server.py", line 136, in server_bind
     socketserver.TCPServer.server_bind(self)
   File "/usr/local/lib/python3.6/socketserver.py", line 470, in server_bind
     self.socket.bind(self.server_address)
 socket.gaierror: [Errno -2] Name does not resolve

It appears, that it cannot handle service name in PGBOUNCER_EXPORTER_HOST setting, I replaced it with localhost and it started fine, but I cannot connect to it from other services(because it waits on localhost).

My settings are:

PGBOUNCER_EXPORTER_PORT={some port}
PGBOUNCER_USER={some_user}
PGBOUNCER_PASS={some_password}
PGBOUNCER_EXPORTER_HOST={pgbouncer_exporter_sevice_name}
PGBOUNCER_HOST={pgbouncer_sevice_name}
PGBOUNCER_PORT={pgbouncer_port}
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