quartz scheduler exception

Bala Nair bnairtm at comcast.net
Wed Sep 29 18:31:35 UTC 2010


  Ok, we found the problem.  Nothing to do with clustering - that was a 
red herring.  Simple inability to connect to the postgres datasource 
defined in the rhq server properties file.  The connection-url string in 
the file was incorrect:

rhq.server.database.connection-url=jdbc:postgresql://127.0.0.1:15432/rhq

I'm not sure how the port number got set to 15432 - it's supposed to be 
5432.  Once we changed it the exceptions went away.

Bala Nair


On 9/28/10 3:39 PM, Bala Nair wrote:
>    We're getting a very strange exception in our rhq server log with the
> quartz scheduler.  I have done some reading about this on the web and
> most of the reports are when you are running clustered.  We're not
> running clustered, so I'm confused as to why we're seeing this
> particular error. The only strange thing we're doing is
> uninventorying/reinventorying platforms and servers.  We are still able
> to use the gui w/o problems, but these exceptions are filling up the log
> file.  Any help would be appreciated.  The stack trace is below:
>
> Bala Nair
>
> 2010-09-28 15:18:17,687 WARN
> [org.jboss.resource.connectionmanager.JBossManagedConnectionPool]
> Throwable while attempting to get a new connection: null
> org.jboss.resource.JBossResourceException: Could not create connection;
> - nested throwable: (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.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:190)
>       at
> org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:619)
>       at
> org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:264)
>       at
> org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575)
>       at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
>       at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:332)
>       at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
>       at
> org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
>       at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
>       at
> org.quartz.utils.JNDIConnectionProvider.getConnection(JNDIConnectionProvider.java:160)
>       at
> org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:112)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:164)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3167)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3811)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3847)
> Caused by: 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.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
>       at org.postgresql.Driver.makeConnection(Driver.java:393)
>       at org.postgresql.Driver.connect(Driver.java:267)
>       at
> org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:172)
>       ... 14 more
> Caused by: java.net.ConnectException: Connection refused
>       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:525)
>       at java.net.Socket.connect(Socket.java:475)
>       at java.net.Socket.<init>(Socket.java:372)
>       at java.net.Socket.<init>(Socket.java:186)
>       at org.postgresql.core.PGStream.<init>(PGStream.java:62)
>       at
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
>       ... 21 more
> 2010-09-28 15:18:17,687 ERROR [org.quartz.impl.jdbcjobstore.JobStoreCMT]
> ClusterManager: Error managing cluster: Failed to obtain DB connection
> from data source 'NoTxRHQDS': java.sql.SQLException: Could not retrieve
> datasource via JNDI url 'java:/NoTxRHQDS'
> org.jboss.util.NestedSQLException: Could not create connection; - nested
> throwable: (org.postgresql.util.PSQLException: Connection refused. Check
> that the hostname and port are correct and that the postmaster is
> accepting TCP/IP connections.); - nested throwable:
> (org.jboss.resource.JBossResourceException: Could not create connection;
> - nested throwable: (org.postgresql.util.PSQLException: Connection
> refused. Check that the hostname and port are correct and that the
> postmaster is accepting TCP/IP connections.))
> org.quartz.JobPersistenceException: Failed to obtain DB connection from
> data source 'NoTxRHQDS': java.sql.SQLException: Could not retrieve
> datasource via JNDI url 'java:/NoTxRHQDS'
> org.jboss.util.NestedSQLException: Could not create connection; - nested
> throwable: (org.postgresql.util.PSQLException: Connection refused. Check
> that the hostname and port are correct and that the postmaster is
> accepting TCP/IP connections.); - nested throwable:
> (org.jboss.resource.JBossResourceException: Could not create connection;
> - nested throwable: (org.postgresql.util.PSQLException: Connection
> refused. Check that the hostname and port are correct and that the
> postmaster is accepting TCP/IP connections.)) [See nested exception:
> java.sql.SQLException: Could not retrieve datasource via JNDI url
> 'java:/NoTxRHQDS' org.jboss.util.NestedSQLException: Could not create
> connection; - nested throwable: (org.postgresql.util.PSQLException:
> Connection refused. Check that the hostname and port are correct and
> that the postmaster is accepting TCP/IP connections.); - nested
> throwable: (org.jboss.resource.JBossResourceException: Could not create
> connection; - nested throwable: (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.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:167)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3167)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3811)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3847)
> Caused by: java.sql.SQLException: Could not retrieve datasource via JNDI
> url 'java:/NoTxRHQDS' org.jboss.util.NestedSQLException: Could not
> create connection; - nested throwable:
> (org.postgresql.util.PSQLException: Connection refused. Check that the
> hostname and port are correct and that the postmaster is accepting
> TCP/IP connections.); - nested throwable:
> (org.jboss.resource.JBossResourceException: Could not create connection;
> - nested throwable: (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.quartz.utils.JNDIConnectionProvider.getConnection(JNDIConnectionProvider.java:166)
>       at
> org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:112)
>       at
> org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:164)
>       ... 3 more
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>


More information about the rhq-devel mailing list