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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Firewall might be blocking your connection, or MySQL it's not running on your server machine.

,
Expert tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.

Solutions on the web

via Stack Overflow by Deepak Naik
, 10 months ago
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
via Oracle Community by 843859, 11 months ago
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
via sqlpower.ca by Unknown author, 2 years ago
The connection attempt failed.
via Stack Overflow by user2328488
, 2 years ago
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
via sourceforge.net by Unknown author, 1 year ago
ConexÒo negada. Verifique se o nome da mßquin a e a porta estÒo corretos e se o postmaster estß aceitando conex§es TCP/IP.
via Google Groups by Chase Preuninger, 2 years ago
The connection attempt failed.
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at java.net.DualStackPlainSocketImpl.connect0(Native Method)

Users with the same issue

168 times, 7 hours ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
823 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.