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

,

Check if your MongoDB is available.

,

Check if your MariaDB is running and available.

Solutions on the web

via Google Groups by AKHRZ, 2 months ago
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
via gmane.org by Unknown author, 1 year ago
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
via Google Groups by Feng Wang, 1 month ago
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
via Google Groups by Hardik Mishra, 2 months ago
The connection attempt failed.
via Google Groups by Gopa Kumar, 2 months ago
The connection attempt failed.
via sourceforge.net by Unknown author, 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.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:180)
at org.postgresql.core.PGStream.(PGStream.java:60)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:116)
at org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:369)
at org.postgresql.Driver.connect(Driver.java:245)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:65)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:550)
at org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:923)
at org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:100)

Users with the same issue

56 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 3 months ago
582 times, 4 months ago
949 more bugmates

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