首页 > 代码库 > Sqoop从DB2导出数据出错:ERRORCODE=-4499, SQLSTATE=08001
Sqoop从DB2导出数据出错:ERRORCODE=-4499, SQLSTATE=08001
Sqoop执行命令:
./sqoop import --connect "jdbc:db2://10.105.4.55:50001/SCCRM55" --username db2inst1 --password db2opr2010 --table WF_4G_BILLDETAIL_NEW_20140717 --fetch-size 1000 -m 1 --target-dir /ext/ods/ODS_RPT_DAY_DET/20140717_1 --fields-terminated-by ‘&‘ --lines-terminated-by ‘\n‘
错误信息:
crmd3n:/d2_data0/user/ocdc/bin/sqoop-1.4.2-cdh4.2.1/bin>minated-by ‘&‘ --lines-terminated-by ‘\n‘ <
14/07/19 12:03:42 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
14/07/19 12:03:42 INFO tool.CodeGenTool: Beginning code generation
14/07/19 12:03:42 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM WF_4G_BILLDETAIL_NEW_20140717 AS t WHERE 1=0
14/07/19 12:03:42 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM WF_4G_BILLDETAIL_NEW_20140717 AS t WHERE 1=0
14/07/19 12:03:42 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /d2_data0/user/ocdc/bin/hadoop-2.0.0-mr1-cdh4.2.1
注意:/tmp/sqoop-ocdc/compile/81cb6e05dd500bc0b46638f93c4f2500/WF_4G_BILLDETAIL_NEW_20140717.java 使用或覆盖了已过时的 API。
注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
14/07/19 12:03:43 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-ocdc/compile/81cb6e05dd500bc0b46638f93c4f2500/WF_4G_BILLDETAIL_NEW_20140717.jar
14/07/19 12:03:50 INFO mapreduce.ImportJobBase: Beginning import of WF_4G_BILLDETAIL_NEW_20140717
14/07/19 12:03:50 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/07/19 12:03:50 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM WF_4G_BILLDETAIL_NEW_20140717 AS t WHERE 1=0
14/07/19 12:03:51 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
14/07/19 12:03:53 INFO mapred.JobClient: Running job: job_201407151514_3011
14/07/19 12:03:54 INFO mapred.JobClient: map 0% reduce 0%
14/07/19 12:04:05 INFO mapred.JobClient: Task Id : attempt_201407151514_3011_m_000000_0, Status : FAILED
java.lang.RuntimeException: java.lang.RuntimeException: com.ibm.db2.jcc.a.pm: [jcc][t4][2043][11550][4.0.100] Exception java.net.SocketException: Error opening socket to server /10.105.4.55 on port 50,001 with message: Network is unreachable. ERRORCODE=-4499, SQLSTATE=08001
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:70)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:636)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:331)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.RuntimeException: com.ibm.db2.jcc.a.pm: [jcc
14/07/19 12:04:13 INFO mapred.JobClient: Task Id : attempt_201407151514_3011_m_000000_1, Status : FAILED
java.lang.RuntimeException: java.lang.RuntimeException: com.ibm.db2.jcc.a.pm: [jcc][t4][2043][11550][4.0.100] Exception java.net.SocketException: Error opening socket to server /10.105.4.55 on port 50,001 with message: Network is unreachable. ERRORCODE=-4499, SQLSTATE=08001
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:70)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:636)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:331)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.RuntimeException: com.ibm.db2.jcc.a.pm: [jcc
14/07/19 12:04:22 INFO mapred.JobClient: Task Id : attempt_201407151514_3011_m_000000_2, Status : FAILED
java.lang.RuntimeException: java.lang.RuntimeException: com.ibm.db2.jcc.a.pm: [jcc][t4][2043][11550][4.0.100] Exception java.net.SocketException: Error opening socket to server /10.105.4.55 on port 50,001 with message: Network is unreachable. ERRORCODE=-4499, SQLSTATE=08001
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:70)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:636)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:331)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.RuntimeException: com.ibm.db2.jcc.a.pm: [jcc
14/07/19 12:04:33 INFO mapred.JobClient: Job complete: job_201407151514_3011
14/07/19 12:04:33 INFO mapred.JobClient: Counters: 6
14/07/19 12:04:33 INFO mapred.JobClient: Job Counters
14/07/19 12:04:33 INFO mapred.JobClient: Failed map tasks=1
14/07/19 12:04:33 INFO mapred.JobClient: Launched map tasks=4
14/07/19 12:04:33 INFO mapred.JobClient: Total time spent by all maps in occupied slots (ms)=34774
14/07/19 12:04:33 INFO mapred.JobClient: Total time spent by all reduces in occupied slots (ms)=0
14/07/19 12:04:33 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms)=0
14/07/19 12:04:33 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms)=0
14/07/19 12:04:33 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
14/07/19 12:04:33 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 42.7266 seconds (0 bytes/sec)
14/07/19 12:04:33 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
14/07/19 12:04:33 INFO mapreduce.ImportJobBase: Retrieved 0 records.
14/07/19 12:04:33 ERROR tool.ImportTool: Error during import: Import job failed!
crmd3n:/d2_data0/user/ocdc/bin/sqoop-1.4.2-cdh4.2.1/bin>
有谁遇到过这种错误吗?新手上路,请高手指教!!
继续研究,研究到了问题会立马贴出。
Sqoop从DB2导出数据出错:ERRORCODE=-4499, SQLSTATE=08001