Quantcast

database connection problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

database connection problem

Ori Marco
Hi

 

I have 2 JDBC connections to Oracle DB and use samplers in my JMX to both connections.

In jmeter.log I see "Ping of connection failed" in some samplers

 

I ran only few samplers with timer of ½ second and still got this "timeouts"

I'm consulting my DBA, but maybe you have ideas on improving my Test Plan.

(I tried with different configurations of JDBC connection)

 

Log:

2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing class org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler

2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting dataSource=Oracle

2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting queryType=Select Statement

2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting query=select to_char(sysdate ,'MM/DD/YYYY HH:MI:SS')from dual

 

2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: sampling jdbc

2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: DataSourceComponent: org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource@80be6e

2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Got a $Proxy0 from the pool.

2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Pinging database after 5921ms of inactivity.

2007/10/31 16:52:12 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Ping of connection failed. java.sql.SQLException: ORA-00923: FROM keyword not found where expected

 

                at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)

                at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)

                at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)

                at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)

                at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:212)

                at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:795)

                at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1030)

                at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:835)

                at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)

                at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)

                at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)

                at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.isClosed(AbstractJdbcConnection.java:235)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                at java.lang.reflect.Method.invoke(Unknown Source)

                at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.invoke(AbstractJdbcConnection.java:357)

                at $Proxy0.isClosed(Unknown Source)

                at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.validatePoolable(ResourceLimitingJdbcConnectionPool.java:159)

                at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:141)

                at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:222)

                at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:90)

                at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)

                at java.lang.Thread.run(Unknown Source)

 

Thanks

 

Ori Marko
Quality Assurance Engineer
Praxell Inc.
http://www.praxell.com <http://www.praxell.com>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: database connection problem

Matt-155
Adding this so it's searchable, though i'd gladly stick it on the wiki if
anyone would kindly show me where is appropriate.

I've been trying to kick off Jmeter via distributed all morning, using both
2.2 and 2.3rc3.  The Centos 4 box where the Jmeter server install lies
hasn't changed.  The only thing thats changed is that i've moved from XP
client to Ubuntu 7.10 client.

Anyway, trying to start the test remotely I kept getting errors like this
from the server:

2007/11/01 09:41:07 INFO  - jmeter.samplers.RemoteListenerWrapper: Test
Started on 172.30.3.104
2007/11/01 09:41:07 ERROR - jmeter.samplers.RemoteListenerWrapper:
testStarted(host) java.rmi.ConnectException: Connection refused to host:
127.0.1.1; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java
:185)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java
:171)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
        at
org.apache.jmeter.samplers.RemoteSampleListenerImpl_Stub.testStarted(Unknown
Source)
        at org.apache.jmeter.samplers.RemoteListenerWrapper.testStarted(
RemoteListenerWrapper.java:75)
        at
org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(
StandardJMeterEngine.java:211)
        at org.apache.jmeter.engine.StandardJMeterEngine.run(
StandardJMeterEngine.java:336)



I thought this would be server related, but it turned out to be client
related.  Ubuntu had inserted this line on install in /etc/hosts


127.0.1.1 myhostname

Commenting this out made it work!

Matt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: database connection problem

sebb-2-2
In reply to this post by Ori Marco
Looks like the Validation query is wrong - check the JDBC Config


On 01/11/2007, Ori Marco <[hidden email]> wrote:

> Hi
>
>
>
> I have 2 JDBC connections to Oracle DB and use samplers in my JMX to both connections.
>
> In jmeter.log I see "Ping of connection failed" in some samplers
>
>
>
> I ran only few samplers with timer of ½ second and still got this "timeouts"
>
> I'm consulting my DBA, but maybe you have ideas on improving my Test Plan.
>
> (I tried with different configurations of JDBC connection)
>
>
>
> Log:
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing class org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting dataSource=Oracle
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting queryType=Select Statement
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting query=select to_char(sysdate ,'MM/DD/YYYY HH:MI:SS')from dual
>
>
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: sampling jdbc
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: DataSourceComponent: org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource@80be6e
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Got a $Proxy0 from the pool.
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Pinging database after 5921ms of inactivity.
>
> 2007/10/31 16:52:12 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Ping of connection failed. java.sql.SQLException: ORA-00923: FROM keyword not found where expected
>
>
>
>                at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
>
>                at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
>
>                at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
>
>                at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
>
>                at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:212)
>
>                at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:795)
>
>                at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1030)
>
>                at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:835)
>
>                at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)
>
>                at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
>
>                at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)
>
>                at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.isClosed(AbstractJdbcConnection.java:235)
>
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
>                at java.lang.reflect.Method.invoke(Unknown Source)
>
>                at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.invoke(AbstractJdbcConnection.java:357)
>
>                at $Proxy0.isClosed(Unknown Source)
>
>                at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.validatePoolable(ResourceLimitingJdbcConnectionPool.java:159)
>
>                at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:141)
>
>                at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:222)
>
>                at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:90)
>
>                at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
>
>                at java.lang.Thread.run(Unknown Source)
>
>
>
> Thanks
>
>
>
> Ori Marko
> Quality Assurance Engineer
> Praxell Inc.
> http://www.praxell.com <http://www.praxell.com>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: database connection problem

Ori Marco
Thanks a lot, you are right!

Ori Marko
Quality Assurance Engineer
Praxell Inc.
http://www.praxell.com

-----Original Message-----
From: sebb [mailto:[hidden email]]
Sent: Thursday, November 01, 2007 2:16 PM
To: JMeter Users List
Subject: Re: database connection problem

Looks like the Validation query is wrong - check the JDBC Config


On 01/11/2007, Ori Marco <[hidden email]> wrote:

> Hi
>
>
>
> I have 2 JDBC connections to Oracle DB and use samplers in my JMX to both connections.
>
> In jmeter.log I see "Ping of connection failed" in some samplers
>
>
>
> I ran only few samplers with timer of ½ second and still got this "timeouts"
>
> I'm consulting my DBA, but maybe you have ideas on improving my Test Plan.
>
> (I tried with different configurations of JDBC connection)
>
>
>
> Log:
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing class org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting dataSource=Oracle
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting queryType=Select Statement
>
> 2007/10/31 16:52:11 DEBUG - jmeter.testbeans.TestBeanHelper: Setting query=select to_char(sysdate ,'MM/DD/YYYY HH:MI:SS')from dual
>
>
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: sampling jdbc
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: DataSourceComponent: org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource@80be6e
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Got a $Proxy0 from the pool.
>
> 2007/10/31 16:52:11 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Pinging database after 5921ms of inactivity.
>
> 2007/10/31 16:52:12 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Ping of connection failed. java.sql.SQLException: ORA-00923: FROM keyword not found where expected
>
>
>
>                at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
>
>                at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
>
>                at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
>
>                at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
>
>                at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:212)
>
>                at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:795)
>
>                at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1030)
>
>                at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:835)
>
>                at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)
>
>                at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
>
>                at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)
>
>                at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.isClosed(AbstractJdbcConnection.java:235)
>
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
>                at java.lang.reflect.Method.invoke(Unknown Source)
>
>                at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.invoke(AbstractJdbcConnection.java:357)
>
>                at $Proxy0.isClosed(Unknown Source)
>
>                at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.validatePoolable(ResourceLimitingJdbcConnectionPool.java:159)
>
>                at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:141)
>
>                at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:222)
>
>                at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:90)
>
>                at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
>
>                at java.lang.Thread.run(Unknown Source)
>
>
>
> Thanks
>
>
>
> Ori Marko
> Quality Assurance Engineer
> Praxell Inc.
> http://www.praxell.com <http://www.praxell.com>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: database connection problem

Ginware
This post has NOT been accepted by the mailing list yet.
In reply to this post by Ori Marco
validation query :select 1 from dual;
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: database connection problem

mgartou
This post has NOT been accepted by the mailing list yet.
Thank you that was very usefull
Loading...