Yesod app uses wrong port when connecting to PostgreSQL

Hi folks! I'm struggling with following error: libpq: failed (could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? I see such messages in Keter's log (in app folder). The VPS where the app deployed running PostgreSQL 9.6 on port 5433. I have changed default port in: - config/settings - config/keter.yaml - /opt/keter/etc/postgres.yaml on server side None of these steps helped. I wasn't able to find other port configuration places. What else can I do?

Hi,
It may help to know that libpq also looks to environment variables to get
its config: https://www.postgresql.org/docs/9.3/static/libpq-envars.html
Cheers,
David
(Apologies for the double mail, I failed to CC the list in the first time)
On 6 Mar 2017 19:55, "Geraldus"
Hi folks!
I'm struggling with following error:
libpq: failed (could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
I see such messages in Keter's log (in app folder). The VPS where the app deployed running PostgreSQL 9.6 on port 5433. I have changed default port in:
- config/settings - config/keter.yaml - /opt/keter/etc/postgres.yaml on server side
None of these steps helped. I wasn't able to find other port configuration places. What else can I do?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Thank you David! I've exported *PGPORT *variable and restarted Keter. Now everything works!

On Mar 6, 2017, at 2:55 PM, Geraldus
wrote: Hi folks!
I'm struggling with following error:
libpq: failed (could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
I see such messages in Keter's log (in app folder). The VPS where the app deployed running PostgreSQL 9.6 on port 5433. I have changed default port in:
• config/settings • config/keter.yaml • /opt/keter/etc/postgres.yaml on server side None of these steps helped. I wasn't able to find other port configuration places. What else can I do?
On my system: $ grep '543[23]' /etc/services postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database -- Viktor.
participants (3)
-
David Turner
-
Geraldus
-
Viktor Dukhovni