org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

Stack Overflow | Mona Jalal | 3 months ago
  1. 0

    tomcat7 and postgresql for SQLNestedException: Cannot create PoolableConnectionFactory

    Stack Overflow | 3 months ago | Mona Jalal
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
  2. 0

    Unhandled exception when PSQL connection is refused

    GitHub | 3 years ago | ChrisCummins
    org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  3. 0

    [Spacewalk-list] rhn-search broken since 2.1 upgrade?

    redhat.com | 7 months ago
    org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Migracja z 6.1.3 do 6.2.0 - Foros | Liferay

    liferay.com | 1 year ago
    org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  6. 0

    Struggling with Install

    openbravo | 1 decade ago | derek_f
    org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

  1. linxiaolong 18 times, last 3 weeks ago
  2. Kialandei 1 times, last 1 month ago
  3. DoktorDoener666 41 times, last 2 weeks ago
  4. kjhdofjosvs 2 times, last 1 month ago
  5. Gatgeagent 1 times, last 2 months ago
22 more registered users
65 unregistered visitors
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 refused

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.<init>
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    6. java.net.Socket.connect(Socket.java:589)
    7. java.net.Socket.connect(Socket.java:538)
    8. java.net.Socket.<init>(Socket.java:434)
    9. java.net.Socket.<init>(Socket.java:211)
    9 frames
  3. PostgreSQL JDBC Driver
    Driver.connect
    1. org.postgresql.core.PGStream.<init>(PGStream.java:62)
    2. org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
    3. org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
    4. org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
    5. org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
    6. org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
    7. org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
    8. org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
    9. org.postgresql.Driver.makeConnection(Driver.java:393)
    10. org.postgresql.Driver.connect(Driver.java:267)
    10 frames
  4. Commons DBCP
    BasicDataSource.getConnection
    1. org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    2. org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
    3. org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
    4. org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
    5. org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
    6. org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    6 frames
  5. Hibernate
    LocalDataSourceConnectionProvider.getConnection
    1. org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
    1 frame
  6. Hibernate
    SchemaUpdate.execute
    1. org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
    2. org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:168)
    2 frames
  7. Hibernate
    SessionFactoryImpl.<init>
    1. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:375)
    1 frame
  8. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
    1 frame
  9. Hibernate
    AbstractSessionFactoryBean.afterPropertiesSet
    1. org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)
    2. org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)
    3. org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
    3 frames
  10. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
    9. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
    11. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
    12. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
    13. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
    14. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
    15. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1073)
    16. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
    17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    18. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    19. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    20. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    21. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
    22. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
    22 frames
  11. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    2 frames
  12. Spring MVC
    HttpServletBean.init
    1. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:467)
    2. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:483)
    3. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:358)
    4. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:325)
    5. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
    5 frames
  13. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)
    1 frame
  14. Glassfish Core
    HostConfig$DeployWar.run
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5290)
    5. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5580)
    6. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    7. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    8. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    9. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    10. org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
    11. org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
    11 frames
  15. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    5. java.lang.Thread.run(Thread.java:745)
    5 frames