org.postgresql.util.PSQLException

Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Samebug tips9

Check if your MongoDB is available.


host port isnt set

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1472

  • via GitHub by xhoenner
    , 1 year ago
    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  • via GitHub by blackfinn
    , 7 months ago
    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  • via GitHub by danfruehauf
    , 1 year ago
    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  • Stack trace

    • org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:207)[console-services-release.jar:na] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)[console-services-release.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)[console-services-release.jar:na] at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)[console-services-release.jar:na] at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)[console-services-release.jar:na] at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)[console-services-release.jar:na] at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)[console-services-release.jar:na] at org.postgresql.Driver.makeConnection(Driver.java:410)[console-services-release.jar:na] at org.postgresql.Driver.connect(Driver.java:280)[console-services-release.jar:na] at java.sql.DriverManager.getConnection(DriverManager.java:571)[na:1.7.0_71-icedtea] at java.sql.DriverManager.getConnection(DriverManager.java:187)[na:1.7.0_71-icedtea] at clojure.java.jdbc.deprecated$get_connection.invoke(deprecated.clj:182)[na:na] at clojure.java.jdbc.deprecated$with_connection_STAR_.invoke(deprecated.clj:305)[na:na] at migratus.database$eval24631$fn__24632.invoke(database.clj:196)[na:na] at clojure.lang.MultiFn.invoke(MultiFn.java:227)[console-services-release.jar:na] at migratus.core$migrate.invoke(core.clj:56)[na:na] at puppetlabs.rbac.db_utils$migrate_BANG_.invoke(db_utils.clj:37)[na:na] at puppetlabs.rbac.services.rbac$reify__22438$service_fnk__5284__auto___positional$reify__22445.init(rbac.clj:92)[na:na] at puppetlabs.trapperkeeper.services$eval5120$fn__5121$G__5112__5124.invoke(services.clj:12)[na:na] at puppetlabs.trapperkeeper.services$eval5120$fn__5121$G__5111__5128.invoke(services.clj:12)[na:na] at puppetlabs.trapperkeeper.internal$run_lifecycle_fn_BANG_.invoke(internal.clj:145)[na:na] at puppetlabs.trapperkeeper.internal$run_lifecycle_fns.invoke(internal.clj:173)[na:na] at puppetlabs.trapperkeeper.internal$build_app_STAR_$reify__5977.init(internal.clj:437)[na:na] at puppetlabs.trapperkeeper.internal$boot_services_STAR_$fn__5989.invoke(internal.clj:463)[na:na] at puppetlabs.trapperkeeper.internal$boot_services_STAR_.invoke(internal.clj:462)[na:na] at puppetlabs.trapperkeeper.core$boot_with_cli_data.invoke(core.clj:113)[na:na] at puppetlabs.trapperkeeper.core$run.invoke(core.clj:144)[na:na] at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:159)[na:na] at clojure.lang.RestFn.invoke(RestFn.java:457)[console-services-release.jar:na] at clojure.lang.Var.invoke(Var.java:394)[console-services-release.jar:na] at clojure.lang.AFn.applyToHelper(AFn.java:165)[console-services-release.jar:na] at clojure.lang.Var.applyTo(Var.java:700)[console-services-release.jar:na] at clojure.core$apply.invoke(core.clj:624)[console-services-release.jar:na] at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7)[console-services-release.jar:na] at clojure.lang.RestFn.applyTo(RestFn.java:137)[console-services-release.jar:na] at puppetlabs.trapperkeeper.main.main(Unknown Source)[console-services-release.jar:na] Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method)[na:1.7.0_71-icedtea] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)[na:1.7.0_71-icedtea] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)[na:1.7.0_71-icedtea] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)[na:1.7.0_71-icedtea] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.7.0_71-icedtea] at java.net.Socket.connect(Socket.java:579)[na:1.7.0_71-icedtea] at java.net.Socket.connect(Socket.java:528)[na:1.7.0_71-icedtea] at org.postgresql.core.PGStream.<init>(PGStream.java:60)[console-services-release.jar:na] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:101)[console-services-release.jar:na] ... 35 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    39 times, 1 week ago
    2 times, 2 months ago
    6 times, 9 months ago
    Unknown user
    Once, 1 year ago
    483 more bugmates