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

org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. #632

Open
pragatiipatil opened this issue Apr 20, 2023 · 0 comments

Comments

@pragatiipatil
Copy link

Hi,

I'm getting the error 'org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.' error when I'm trying to run my application on docker.
Please help me with the fix.

Below are some of the details:
System OS: mac OS
postgres port: 5432

I made changes in the postgresql.conf and set listen_addresses = '*'

and in pg_hba.conf
host all all 0.0.0.0/0
changed the 127.0.0.1/32 change to 0.0.0.0/0

Thank you.

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