I/O Exception: Connection reset after starts a dbviscmd query again
a
anonymous
started a topic
over 12 years ago
[This topic is migrated from our old forums. The original author name has been removed]
Hi,
when I starts this query with dbviscmd:
*dbviscmd.sh -connection Oracle -sql "select count(*) from customers"*
at the first time is runs very well. If I starts the command few seconds later again, this exception appears:
*DbVisualizerCmd - Execute Error: Connecting: An error occurred while establishing the connection:*
*Long Message:*
*I/O Exception: Connection reset*
*Details:*
*Type: java.sql.SQLRecoverableException*
*Error Code: 17002*
*SQL State: 08006*
If I waits 5 or 10 minutes and than runs the query again, it runs like at the first time. This problem appears only on my
Linux system. On the windows system I can starts the query again and again without any problems.
Is it necessary to set any parameter for close the connection to the database? I use Oracle 11 and DbVisualizer 8.0.8 on a Suse Linux Enterprise Server 11.
Thanks in advance for any help.
Pongo
Edited by: Twistleton on 2012-mar-27 16:24
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Twistleton,
The command line interface automatically closes the database connection just before it exits, so you should not need to add any parameters. Please use the -debug flag to see if there are any problems disconnecting.
Best Regards,
Hans
a
anonymous
said
over 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Hans,
thank you for the hint. This is the result when I use the -debug flag:
dbviscmd.sh -connection OracleProductionSystem -debug -sql "select count(*) from customer"
09:12:49 [DEBUG main P.ā] Using existing database connection: OracleProductionSystem
09:12:49 [DEBUG main L.ā] Loading class using dynamic ClassLoader: oracle.jdbc.OracleDriver
09:12:49 [DEBUG main L.ā] Loading class using dynamic ClassLoader: oracle.jdbc.OracleDriver
09:12:49 [DEBUG main G.ĭ] Connecting: OracleProductionSystem
09:12:49 [DEBUG main L.ā] Loading class using dynamic ClassLoader: oracle.jdbc.OracleDriver
09:12:49 [DEBUG main L.ā] Loading class using dynamic ClassLoader: oracle.jdbc.OracleDriver
09:12:49 [DEBUG pool-1-thread-1 D.ā] RootConnection: OracleDriver.acceptsURL("jdbc:oracle:thin:@xx.xx.xx.xx:1521/ORALX11")
09:12:49 [DEBUG pool-1-thread-2 D.ā] RootConnection: OracleDriver.connect("jdbc:oracle:thin:@xx.xx.xx.xx:1521/ORALX11", {user=******, password=*****})
09:14:26 [DEBUG pool-1-thread-2 D.ā] RootConnection: EXCEPTION -> java.sql.SQLRecoverableException: I/O-Fehler: Connection reset
DbVisualizerCmd - Execute Error: Connecting: An error occurred while establishing the connection:
*Long Message:*
*I/O-Fehler: Connection reset*
*Details:*
*Type: java.sql.SQLRecoverableException*
*Error Code: 17002*
*SQL State: 08006*
At the first call the command line inferface closed the Connection works as expected
09:27:37 [DEBUG main AbstractFacade.getColumn] executing "select sys_context( 'userenv', 'current_schema' ) from dual"
09:27:37 [DEBUG pool-1-thread-2 C.ā] RootConnection: T4CConnection.createStatement()
09:27:37 [DEBUG pool-1-thread-2 B.ā] RootConnection: OracleStatementWrapper.executeQuery("select sys_context( 'userenv', 'current_schema' ) from dual")
SUMMARY: ... 1 statement(s) executed, 1 row(s) affected, exec/fetch time: 0.008/0.000 sec
[1 successful, 0 warnings, 0 errors]
09:27:37 [DEBUG main G.ĺ] Disconnecting: OracleProductionSystem
09:27:37 [DEBUG pool-1-thread-2 C.ā] RootConnection: T4CConnection.close()
09:27:37 [DEBUG main G.ĺ] Connection closed: OracleProductionSystem
I changed the JDBC-Driver to a newer one - with no effect.
Any Idea?
Best regards,
Pongo
Hans Bergsten
said
over 12 years ago
[This reply is migrated from our old forums.]
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Pongo,
Since the connection is closed by the command line interface as it should, I can only guess that an external connection pool is used somehow. How is the Oracle connection defined in the DbVisualizer GUI? Are you by any chance using a JNDI connection?
Best Regards,
Hans
a
anonymous
said
over 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Hans,
the Oracle connection is defined as SID connection type (Oracle Thin).
But on this server runs an application server too (Glassfish), so I will try to use JNDI for connect the database.
Cheers,
Pongo
Hans Bergsten
said
over 12 years ago
[This reply is migrated from our old forums.]
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Pongo,
Actually, I meant that if you are using JNDI, it could explain why you get the exception on the second try. Changing to JNDI would only help if the Glassfish JNDI pool has some feature for keeping unused connections alive.
If the connection is configured with a regular JDBC URL (using either the Server Info or Database URL Settings Format), I don't understand how you can get hold of a connection that has timed out on the second try?Is there some other piece of software in between DbVisualizer and the database?
Best Regards,
Hans
a
anonymous
said
over 12 years ago
[This reply is migrated from our old forums. The original author name has been removed] [Attachment has been removed.]
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Hans,
thanks for your answer.
The connection is configured with a regular JDBC URL in the DbVisualizer with no special characteristics. Please have a look at the attach png file for the configuration.
Another piece of software between DbVisualizer and the database? In my opinion there is no another software between DbVisualizer and the database, but I will check it ...
Cheers,
Pongo
Hans Bergsten
said
over 12 years ago
[This reply is migrated from our old forums.]
Re: I/O Exception: Connection reset after starts a dbviscmd query again
Hi Twistleton,
I'm running out of ideas.
Since Connection#close() is called and the JVM then exists, the command line interface code does all it can. If a new Connection created the second time you run the command line interface fails, it seems like the problem more likely is at the OS network level.
Best Regards,
Hans
a
anonymous
said
over 11 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Heureka - I found a solution
Hello Hans,
I found a solution for my very old I/O exception problem.
I set this JAVA option (Shell) and all the problems are gone:
export _JAVA_OPTIONS='-Djava.security.egd=file:/dev/../dev/urandom'
More about the problem:
https://kr.forums.oracle.com/forums/thread.jspa?messageID=3699989
Best Regards,
Pongo
Hans Bergsten
said
over 11 years ago
[This reply is migrated from our old forums.]
Re: Heureka - I found a solution
Hi Pongo,
Thanks so much for reporting back with a solution!
Best Regards,
Hans
anonymous