Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Error while hitting the cloudera manager url:-org.postgresql.util.PSQLException

avatar
Expert Contributor

whenever i am hitting the cloudera's manager Url on port 8080-

It gives unable to connect and when i restarted cloudera-scm-server from the linux rhel server it gives me an error of:-

 

2014-10-20 13:41:19,954  WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0:resourcepool.BasicResourcePool@1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5a739a0a -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (5). Last acquisition attempt exception:
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:136)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
    at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
    at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
    at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
    at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
    at org.postgresql.Driver.makeConnection(Driver.java:393)
    at org.postgresql.Driver.connect(Driver.java:267)
    at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
    at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.<init>(Socket.java:425)
    at java.net.Socket.<init>(Socket.java:208)
    at org.postgresql.core.PGStream.<init>(PGStream.java:62)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
    ... 16 more
2014-10-20 13:41:19,956  WARN [main:spi.SqlExceptionHelper@145] SQL Error: 0, SQLState: null
2014-10-20 13:41:19,960 ERROR [main:spi.SqlExceptionHelper@147] Connections could not be acquired from the underlying database!
2014-10-20 13:41:19,965  INFO [main:support.DefaultListableBeanFactory@422] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@47125a42: defining beans [commandLineConfigurationBean,entityManagerFactoryBean,com.cloudera.server.cmf.TrialState,com.cloudera.server.cmf.TrialManager,com.cloudera.cmf.crypto.LicenseLoader]; root of factory hierarchy
2014-10-20 13:41:19,966 ERROR [main:cmf.Main@202] Server failed.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cloudera.server.cmf.TrialState': Cannot resolve reference to bean 'entityManagerFactoryBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection

 

 

 

Is this because the license has expired or the manager has crashed?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

This issue got resolved.

apparently the licensed key expired and also the /var and /opt folder somehow got the permissions of 777 instead or default permissions due to which the postgres got crashed.Also the /var and /opt got filled to their maximum level.Above 75%.

 

The Cloudera did not find enough space to log into /var/log so the postgres got crashed.

Basically everything happened all at once.

 

Now have set up SQL as metadata database for cloudera.

 

cheers 🙂

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

Not port 8080 but 7180

Typo error.

avatar
Expert Contributor

This issue got resolved.

apparently the licensed key expired and also the /var and /opt folder somehow got the permissions of 777 instead or default permissions due to which the postgres got crashed.Also the /var and /opt got filled to their maximum level.Above 75%.

 

The Cloudera did not find enough space to log into /var/log so the postgres got crashed.

Basically everything happened all at once.

 

Now have set up SQL as metadata database for cloudera.

 

cheers 🙂