Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] "Network is unreachable" message with tOracleConnection

Hi,
I have a completely tested job developed in TOS DI 5.1.2.r90681, which works perfectly on a Windows machine -- either being run from TOS DI or being exported into Java package. However, when I try to run the same Java package on a Debian 2.6.32 machine (Java SE Runtime Environment (build 1.6.0_22-b04)), I get an error message from a tOracleConnection component as follows:
Exception in component tOracleConnection_1
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
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:480)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at sugarcrm_import_contacts_from_ehd.sugar_ehd_import_0_1.Sugar_EHD_Import.tOracleConnection_1Process(Sugar_EHD_Import.java:611)
at sugarcrm_import_contacts_from_ehd.sugar_ehd_import_0_1.Sugar_EHD_Import.runJobInTOS(Sugar_EHD_Import.java:5753)
at sugarcrm_import_contacts_from_ehd.sugar_ehd_import_0_1.Sugar_EHD_Import.main(Sugar_EHD_Import.java:5576)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:328)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:421)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:630)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:206)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
... 9 more
Caused by: java.net.SocketException: Network is unreachable
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:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:127)
at oracle.net.nt.ConnOption.connect(ConnOption.java:126)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:306)
... 14 more

Note that I've checked my Oracle host & port from the client machine with telnet, and it works fine.
I also tried adding a timeout option into tOracleConnection's additional JDBC parameters ("Connection Timeout=60"), but it didn't solve the problem. The connection is configured as Oracle SID, Oracle version is 11.
Any ideas?
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The issue is solved. It was about bindv6only networking parameter set to 1 by default in Linux, which usually breaks all networking in Java. This can be fixed by editing /etc/sysctl.d/bindv6only.conf file and restarting the machine or simply applying new kernel settings by running 'invoke-rc.d procps restart' command.
The thread can be closed now.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

The issue is solved. It was about bindv6only networking parameter set to 1 by default in Linux, which usually breaks all networking in Java. This can be fixed by editing /etc/sysctl.d/bindv6only.conf file and restarting the machine or simply applying new kernel settings by running 'invoke-rc.d procps restart' command.
The thread can be closed now.
Anonymous
Not applicable
Author

Hi, avbtnd
Thanks for sharing your precise experience for us. It is useful when other persons meet the similar issue with yours.
Best regards
Sabrina