Invalid Port in Connection URL for Oracle Loader For Hadoop fails with 'IO Error: The Network Adapter could not establish the connection' (Doc ID 1454308.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Loader for Hadoop - Version 1.1.0 and later
Linux x86-64
***Checked for relevance on 21-Mar-2015***

Symptoms

Running a job with Oracle Loader for Hadoop and receiving the following exception:

Exception in thread "main" oracle.hadoop.loader.OraLoaderException: Oracle database connection error: IO Error: The Network Adapter could not establish the connection
        at oracle.hadoop.loader.metadata.OraLoaderMetadata$1errhdlr.handleEx(OraLoaderMetadata.java:523)
        at oracle.hadoop.loader.metadata.OraLoaderMetadata.<init>(OraLoaderMetadata.java:554)
        at oracle.hadoop.loader.OraLoader.run(OraLoader.java:372)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at oracle.hadoop.loader.OraLoader.main(OraLoader.java:734)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
        at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:157)
        at oracle.hadoop.loader.Utils.getConnection(Utils.java:263)
        at oracle.hadoop.loader.metadata.OraLoaderMetadata.<init>(OraLoaderMetadata.java:547)
        ... 8 more
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
        at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
        at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
        at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
        ... 17 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:150)
        at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
        at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:370)
        ... 22 more

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms