hadoop 没打从 本地mysql迁移数据 总是提示 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:

15/04/24 07:00:15 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
15/04/24 07:00:15 INFO tool.CodeGenTool: Beginning code generation
15/04/24 07:01:19 ERROR manager.SqlManager: Error executing statement: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 1,429,884,079,949 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 1,429,884,079,949 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Caused by: java.net.ConnectException: Connection timed out

15/04/24 07:01:19 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:1095)
我试过还连接驱动和改mysql的配置,好像都没有用啊

第1个回答  2015-04-24
1.ping一下mysql的ip和端口看看能不能ping通
2.检查下mysql服务器是否允许该集群访问。
3.判断下mysql服务器和集群的网络是否畅通。追问

请问能具体一点吗,1,3没问题,就不知道2该如何验证

本回答被网友采纳
相似回答