0
The Talend Studio allows you to build your Jobs as shell scripts that are executable out of your Talend Studio – in Talend Administration Center or on a command line. When executing a built Job that contains Oracle components out of your Studio, you may run into a Connection Reset error on a random basis. This article provides a workaround that allows you to avoid such errors.
Symptoms/Description
When executing a built Job out of your Studio, and if your Job uses the Oracle 11g driver to connect to an Oracle database, you may get the following error:
Exception in component tOracleConnection_1 java.sql.SQLRecoverableException: Exception d'E/S: Connection reset at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:521) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:418) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203) …… Caused by: java.net.SocketException: Connection reset at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at oracle.net.ns.DataPacket.send(DataPacket.java:150) at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:180) at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:169) at oracle.net.ns.NetInputStream.read(NetInputStream.java:117) at oracle.net.ns.NetInputStream.read(NetInputStream.java:92) at oracle.net.ns.NetInputStream.read(NetInputStream.java:77) at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1034) at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1010) at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:760) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:368) ……
Resolution
Use either of the following options to configure your JVM to use the urandom device.
Option 1
Start the JVM with the following parameter:
-Djava.security.egd=file:///dev/urandom
Option 2
Use the urandom device globally:
- Open the $JAVA_HOME/jre/lib/security/java.security file in a text editor.
- Find the following line:
securerandom.source=file:/dev/random
and modify it to:securerandom.source=file:/dev/urandom
orsecurerandom.source=file:///dev/urandom
Alternately, to avoid Java parsing issues on a Unix or Linux operating system, modify the line as follows:securerandom.source=file:/dev/./urandom
orsecurerandom.source=file:/dev/../dev/urandom
- Save your change, exit the text editor, and run your Job.
Now the problem should be fixed.
0Awesome Comments!