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

Stack Overflow | nikkidtosh | 8 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0

    How to skip database connection pooling during JUnit unit test execution?

    Stack Overflow | 8 months ago | nikkidtosh
    org.postgresql.util.PSQLException: Connection to 192.168.1.163:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  2. 0

    spring-cloud-stream-app-starters/gpfdist kubernetes problem

    GitHub | 3 months ago | sabbyanandan
    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
  3. 0

    GitHub comment 608#262934281

    GitHub | 4 months ago | liufuyang
    java.lang.IllegalStateException: Failed to load ApplicationContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Failed to pop the queue of analysis reports

    Google Groups | 2 months ago | Unknown author
    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.
  6. 0
    samebug tip
    start Appium server
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection timed out

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)[na:1.8.0_77]
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)[na:1.8.0_77]
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[na:1.8.0_77]
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[na:1.8.0_77]
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.8.0_77]
    6. java.net.Socket.connect(Socket.java:589)[na:1.8.0_77]
    6 frames
  3. PostgreSQL JDBC Driver
    ConnectionFactory.openConnection
    1. org.postgresql.core.PGStream.<init>(PGStream.java:64)[postgresql-9.4.1208.jre7.jar:9.4.1208.jre7]
    2. org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:133)[postgresql-9.4.1208.jre7.jar:9.4.1208.jre7]
    3. org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)[postgresql-9.4.1208.jre7.jar:9.4.1208.jre7]
    3 frames
  4. org.postgresql.jdbc
    PgConnection.<init>
    1. org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215)[postgresql-9.4.1208.jre7.jar:9.4.1208.jre7]
    1 frame
  5. PostgreSQL JDBC Driver
    Driver.connect
    1. org.postgresql.Driver.makeConnection(Driver.java:406)[postgresql-9.4.1208.jre7.jar:9.4.1208.jre7]
    2. org.postgresql.Driver.connect(Driver.java:274)[postgresql-9.4.1208.jre7.jar:9.4.1208.jre7]
    2 frames
  6. org.apache.tomcat
    DataSourceProxy.getConnection
    1. org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307)[tomcat-jdbc-8.0.36.jar:na]
    2. org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)[tomcat-jdbc-8.0.36.jar:na]
    3. org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:710)[tomcat-jdbc-8.0.36.jar:na]
    4. org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:644)[tomcat-jdbc-8.0.36.jar:na]
    5. org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:466)[tomcat-jdbc-8.0.36.jar:na]
    6. org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)[tomcat-jdbc-8.0.36.jar:na]
    7. org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)[tomcat-jdbc-8.0.36.jar:na]
    8. org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)[tomcat-jdbc-8.0.36.jar:na]
    9. org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126)[tomcat-jdbc-8.0.36.jar:na]
    9 frames
  7. org.hibernate.engine
    DatasourceConnectionProviderImpl.getConnection
    1. org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    1 frame
  8. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    2. org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:52)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    3. org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:368)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    4. org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:305)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    5. org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:294)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    6. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:517)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    7. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    7 frames
  9. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl$4.perform
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    2 frames
  10. org.hibernate.boot
    ClassLoaderServiceImpl.withTccl
    1. org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    1 frame
  11. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl.build
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    1 frame
  12. Spring ORM
    AbstractEntityManagerFactoryBean.afterPropertiesSet
    1. org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)[spring-orm-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)[spring-orm-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:319)[spring-orm-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3 frames
  13. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    8 frames
  14. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)[spring-context-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)[spring-context-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)[spring-context-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3 frames
  15. Spring Boot
    SpringApplicationContextLoader.loadContext
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760)[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
    2. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360)[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:306)[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
    4. org.springframework.boot.test.SpringApplicationContextLoader.loadContext(SpringApplicationContextLoader.java:98)[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
    4 frames
  16. org.springframework.test
    DefaultCacheAwareContextLoaderDelegate.loadContext
    1. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2 frames
  17. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:183)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:123)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    4. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    5. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:230)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    6. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    6 frames
  18. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12]
    1 frame
  19. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:249)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3 frames
  20. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12]
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12]
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12]
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12]
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12]
    5 frames
  21. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2 frames
  22. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12]
    1 frame
  23. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    1 frame
  24. JUnit
    ParentRunner.run
    1. org.junit.runners.Suite.runChild(Suite.java:128)[junit-4.12.jar:4.12]
    2. org.junit.runners.Suite.runChild(Suite.java:27)[junit-4.12.jar:4.12]
    3. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12]
    4. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12]
    5. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12]
    6. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12]
    7. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12]
    8. org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12]
    8 frames
  25. JUnit4 Provider
    JUnit4Provider.invoke
    1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)[surefire-junit4-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)[surefire-junit4-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)[surefire-junit4-2.18.1.jar:2.18.1]
    4. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)[surefire-junit4-2.18.1.jar:2.18.1]
    4 frames
  26. SureFire
    ForkedBooter.main
    1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)[surefire-booter-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)[surefire-booter-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)[surefire-booter-2.18.1.jar:2.18.1]
    3 frames