SQOOP from Oracle Connection reset error

前端之家收集整理的这篇文章主要介绍了SQOOP from Oracle Connection reset error前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

SQOOP from Oracle Connection reset error

个问题,截止 suresh krish2016年09月20日 14:43 HiveSqooporacle

Hi Team,

Iam getting below error when i try sqooping from Oracle. But when i rerun the same job without any change. its running But why it is not runnig in the first time. Please help

Error:###################

Warning: /usr/hdp/2.3.2.0-2950/accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

16/09/15 01:04:11 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.3.2.0-2950

16/09/15 01:04:11 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.

16/09/15 01:04:11 INFO manager.sqlManager: Using default fetchSize of 1000

16/09/15 01:04:11 INFO tool.CodeGenTool: Beginning code generation

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/hadoop/hdp/2.3.2.0-2950/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/hadoop/hdp/2.3.2.0-2950/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Seehttp://www.slf4j.org/codes.html#multiple_bindingsfor an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

16/09/15 01:05:13 ERROR manager.sqlManager: Error executing statement: java.sql.sqlRecoverableException: IO Error: Connection reset

java.sql.sqlRecoverableException: IO Error: Connection reset

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:752)

at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:662)

at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:560)

at java.sql.DriverManager.getConnection(DriverManager.java:571)

at java.sql.DriverManager.getConnection(DriverManager.java:233)

at org.apache.sqoop.manager.OracleManager.makeConnection(OracleManager.java:325)

at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)

at org.apache.sqoop.manager.sqlManager.execute(sqlManager.java:744)

at org.apache.sqoop.manager.sqlManager.execute(sqlManager.java:767)

at org.apache.sqoop.manager.sqlManager.getColumnInfoForRawQuery(sqlManager.java:270)

at org.apache.sqoop.manager.sqlManager.getColumnTypesForRawQuery(sqlManager.java:241)

at org.apache.sqoop.manager.sqlManager.getColumnTypesForQuery(sqlManager.java:234)

at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:304)

at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1845)

at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1645)

at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)

at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)

at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)

at org.apache.sqoop.Sqoop.run(Sqoop.java:148)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)

at org.apache.sqoop.Sqoop.main(Sqoop.java:244)

Caused by: java.net.SocketException: Connection reset

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)

at java.net.SocketOutputStream.write(SocketOutputStream.java:159)

at oracle.net.ns.DataPacket.send(DataPacket.java:209)

at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:215)

at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:302)

at oracle.net.ns.NetInputStream.read(NetInputStream.java:249)

at oracle.net.ns.NetInputStream.read(NetInputStream.java:171)

at oracle.net.ns.NetInputStream.read(NetInputStream.java:89)

at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:123)

at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:79)

at oracle.jdbc.driver.T4CMAREngineStream.unmarshalUB1(T4CMAREngineStream.java:429)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:397)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)

at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:433)

at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:950)

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:639)

... 24 more

16/09/15 01:05:13 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter

at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1651)

at org.apache.sqoop.Sqoop.main(Sqoop.java:244)

0 Show 1

个解答,截止Hanu V

This problem occurs primarily due to the lack of a fast random number generation device on the host where the map tasks execute.

Pass below argument withsqoop importcommand

      
      
  1. export HADOOP_OPTS=-Djava.securityegd=file:/dev/../dev/urandom
  2. sqoop import -D mapredchildjavaopts="-Djava.security.egd=file:/dev/../dev/urandom"

References:

http://stackoverflow.com/questions/2327220/oracle-jdbc-intermittent-connection-issue/

https://community.oracle.com/thread/943911?tstart=0&messageID=3793101

https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_oracle_connection_reset_errors

References worked for me by replacing /dev/random to /dev/../dev/urandom in java.security file !

原文链接:https://www.f2er.com/oracle/207905.html

猜你在找的Oracle相关文章