我是 sqoop 新手。我尝试使用 sqoop 从 mysql(安装在 Windows 中)导入数据,但出现以下错误。
7/08/11 22:55:49 错误 manager.SqlManager:执行语句时出错:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败
最后一个成功发送到服务器的数据包是在 0 毫秒前。驱动程序尚未收到来自服务器的任何数据包。com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障。
上次成功向服务器发送数据包是在 0 毫秒之前。驱动程序尚未收到来自服务器的任何数据包。在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 在 java.lang.reflect.Constructor.newInstance(Constructor.java:526) 在 com.mysql.jdbc.Util.handleNewInstance(Util.java:408) 在 com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1137) 在 com.mysql.jdbc.MysqlIO.(MysqlIO.java:356) 在 com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2504) 在com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2323) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at com.mysql.jdbc.Util.handleNewInstance(Util.java:408) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:215) 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:65) 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) 导致:java.net.NoRouteToHostException:没有到主机的路由 at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.(Socket.java:425) at java.net.Socket.(Socket.java:241) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:306) ... 33 更多 17/08/11 22:55:49 错误 tool.ImportTool:运行导入作业时遇到 IOException:java.io.IOException:没有要为 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) 在 org.apache.sqoop.Sqoop.run(Sqoop.java:143) 在 org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) 在 org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179) 在 org.apache.sqoop.Sqoop.runTool(Sqoop.java:218) 在 org.apache.sqoop.Sqoop.runTool(Sqoop.java:227) 在 org.apache.sqoop.Sqoop.main(Sqoop.java:236)ToolRunner.run(ToolRunner.java:65) 在 org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179) 在 org.apache.sqoop.Sqoop.runTool(Sqoop.java:218) 在 org.apache.sqoop.Sqoop.runTool(Sqoop.java:227) 在 org.apache.sqoop.Sqoop.main(Sqoop.java:236)ToolRunner.run(ToolRunner.java:65) 在 org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179) 在 org.apache.sqoop.Sqoop.runTool(Sqoop.java:218) 在 org.apache.sqoop.Sqoop.runTool(Sqoop.java:227) 在 org.apache.sqoop.Sqoop.main(Sqoop.java:236)
友善的建议。