0

I'm struggling to find which part of the process is causing the issue.

> psql -h my.domain -p 9579 -U postgres
psql: error: connection to server at "my.domain" (my.ip), port 9579 failed: No route to host
        Is the server running on that host and accepting TCP/IP connections?

I can connect locally with > psql -h localhost -p 5432 -U postgres

I'm trying to get nginx to redirect requests for port 9579 to postgres.

I've got a fairly simple nginx config:

stream {
server {
        listen 9579;
        proxy_connect_timeout 60s;
        proxy_socket_keepalive on;
        proxy_pass localhost:5432;
        }
}

I've tried setting up an access_log but nothing seems to be getting recorded so I don't think the requests are making it to nginx in the first place. Not sure if relevant but postgres is running out of a docker while nginx is not (but the command at the top that works if from outside the docker). I haven't made any changes to postgresql.conf or pg_hba.conf but the defaults seem to match correct answers for similar issues.

Shanny
  • 33
  • 4

0 Answers0