2 yolanda0001 yolanda0001 于 2016.03.02 16:52 提问

sqoop连接DB2import 时报错,Connection timed out 求大神解答

sqoop连接DB2导入数据至HDFS时,报错,显示连接超时.

用list-table命令连接没有问题​,结果正确;

测试过DB2远程连接,没有问题,telnet 测试端口也没有问题;

DB2版本v9.7,用的安装包里面的JDBC插件.

以下是错误信息。

[biadmin@Hadoop01 sqoop]$ ./bin/sqoop import --connect jdbc:db2://9.112.30.177:50000/content --username db2admin --P --table DB2ADMIN.PERSON --as-textfile -m 1 --target-dir /user/test
Warning: /opt/ibm/biginsights/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
/opt/ibm/biginsights/sqoop/bin/configure-sqoop: line 181: /opt/ibm/biginsights/hive/hcatalog/bin/hcat: Permission denied
16/03/02 08:27:38 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
Enter password:
16/03/02 08:27:46 INFO manager.SqlManager: Using default fetchSize of 1000
16/03/02 08:27:46 INFO tool.CodeGenTool: Beginning code generation
16/03/02 08:28:49 ERROR manager.SqlManager: Error executing statement: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2043][11550][4.14.113] Exception java.net.ConnectException: Error opening socket to server /9.112.30.177 on port 50,000 with message: Connection timed out. ERRORCODE=-4499, SQLSTATE=08001
com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2043][11550][4.14.113] Exception java.net.ConnectException: Error opening socket to server /9.112.30.177 on port 50,000 with message: Connection timed out. ERRORCODE=-4499, SQLSTATE=08001
at com.ibm.db2.jcc.am.ed.a(ed.java:320)
at com.ibm.db2.jcc.am.ed.a(ed.java:338)
at com.ibm.db2.jcc.t4.vb.a(vb.java:434)
at com.ibm.db2.jcc.t4.vb.(vb.java:93)
at com.ibm.db2.jcc.t4.a.b(a.java:354)
at com.ibm.db2.jcc.t4.b.newAgent_(b.java:2030)
at com.ibm.db2.jcc.am.Connection.initConnection(Connection.java:731)
at com.ibm.db2.jcc.am.Connection.(Connection.java:680)
at com.ibm.db2.jcc.t4.b.(b.java:334)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:232)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:198)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:475)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:116)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:226)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:885)
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.getColumnTypes(SqlManager.java:227)
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295)
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1833)
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:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:369)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.net.Socket.connect(Socket.java:642)
at com.ibm.db2.jcc.t4.v.run(v.java:49)
at java.security.AccessController.doPrivileged(AccessController.java:330)
at com.ibm.db2.jcc.t4.vb.a(vb.java:420)
... 31 more
16/03/02 08:28:49 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.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:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

1个回答

caozhy
caozhy   Ds   Rxr 2016.03.07 05:34
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
hive sqoop 问题 Io exception: Connection timed out
当从数据库 读数据的时候 有可能会 Connection timed out, 这是由于sqoop会缓存 connection的原因, 当要load 数据到hive的时候 会再次访问oracle数据库,但是这个时候缓存的 数据库连接对象已经超时了或者被数据库干掉了,解决方法有三个: 方法一: 修改oracle数据库配置: Sqlnet.ora: SQLNET.INBOUND_CONNECT_
Hadoop错误3_Ubuntu SSH Connection timed out类问题原因及解决方法
在Hadoop分布式环境配置的实验过程中,将公匙从Master节点传输到 Slave1 节点时,或者ssh Slave1节点时,可能会遇到以下的问题: ssh: connect to host slave1 port 22: Connection timed out lost connection ssh: connect to host slave1 port 22: No
java.net.ConnectException: Connection timed out: connect 错误
[java] view plaincopyprint? java.net.ConnectException: Connection timed out: connect       at java.net.PlainSocketImpl.socketConnect(Native Method)       at java.net.PlainSocketImpl.d
mysql数据库无法连接(JDBC)java.net.ConnectException: Connection timed out
数据库无法连接(JDBC) 用户名密码正确,但是一直报错:Connection timed out 后来知道了原因:我用的是BAE提供的云mysql数据库,对访问的IP有限制 ,所以在本机上无法连接。 ~~~~(>_ Communications link failure due to underlying exception:    ** BEGIN NE
ftp连接 java.net.ConnectException: Connection refused
http://zhidao.baidu.com/question/245219177.html JAVA编写FTP连接报错java.net.ConnectException: Connection refused: connect FTP 2011-3-29 16:43 提问者:liulyxb | 浏览次数:512次 代码如下: import java.io.Buffer
Putty常见错误汇总
在使用腾讯云服务器的时候曾遇到Disconnected:No supported authentication methods available的问题,通过更改vi /etc/ssh/sshd_config成功解决! 在使用putty工具进行远程登录时也许会遇到一些问题,下面列出了一些问题有利于帮助大家解决: Q:提示”Network error:Connec
Jedis远程链接报错(connect timed out)
通过redis的java客户端Jedis远程连接redis服务器报错,错误信息如下:redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out at redis.clients.jedis.Connection.connect(Connect
Connection timed out: connect 解决办法
问题阐述: 由于需要在Linux上进行项目的测试,将项目放在Linux服务上,通过地址和端口号进行连接,但会出现java.net.ConnectException: Connection timed out: connect 的错误。 如图: 尝试解决办法: Linux和Windows互ping一下。尝试能不能通,检查一下URL的地址是否正确检查Linux项目是否启动,端口
Java连接Redis碰到的坑connect timed out
1,先看Java代码 package com.demo; import redis.clients.jedis.Jedis; public class Demo1 { public static void main(String[] args) { Jedis edis = new Jedis("192.168.1.60",6379); System.out.println
到主机 的 TCP/IP 连接失败 java.net.ConnectException: Connection timed out
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (到主机  的 TCP/IP 连接失败。 java.net.ConnectException: Connection timedout: connect) 1、网络配置tcp/IP 没有打开 2、防火墙 3、连接地址写