Sqoop error, can't read MySQL

Source: Internet
Author: User
Tags sqoop

[Email protected] lib]#/sqoop import--connect jdbc:mysql://192.168.1.10:3306/itcast--username root--password 123-- Table Trade_detail--target-dir '/sqoop/td '--fields-terminated-by ' \ t '

-bash:./sqoop:no such file or directory

[Email protected] lib]# CD. /

[[Email protected] sqoop-1.4.4]# CD bin

[Email protected] bin]# Clear

[Email protected] bin]#/sqoop import--connect jdbc:mysql://192.168.1.10:3306/itcast--username root--password 123-- Table Trade_detail--target-dir '/sqoop/td '--fields-terminated-by ' \ t '

Warning:/usr/lib/hbase does not exist! HBase imports would fail.

Please set $HBASE _home to the root of your HBASE installation.

Warning:/usr/lib/hcatalog does not exist! Hcatalog jobs would fail.

Please set $HCAT _home to the root of your hcatalog installation.

15/09/16 09:03:56 WARN tool. Basesqooptool:setting your password on the command-line is insecure. Consider Using-p instead.

15/09/16 09:03:56 INFO Manager. Mysqlmanager:preparing to use a MySQL streaming resultset.

15/09/16 09:03:56 INFO tool. Codegentool:beginning code Generation

15/09/16 09:05:00 ERROR Manager. Sqlmanager:error Executing statement:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link Failure


The last packet sent successfully to the server was 0 milliseconds ago. The driver has no received any packets from the server.

Com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link Failure


The last packet sent successfully to the server was 0 milliseconds ago. The driver has no received any packets from the server.

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:411)

At Com.mysql.jdbc.SQLError.createCommunicationsException (sqlerror.java:1121)

At Com.mysql.jdbc.mysqlio.<init> (mysqlio.java:357)

At Com.mysql.jdbc.ConnectionImpl.coreConnect (connectionimpl.java:2482)

At Com.mysql.jdbc.ConnectionImpl.connectOneTryOnly (connectionimpl.java:2519)

At Com.mysql.jdbc.ConnectionImpl.createNewIO (connectionimpl.java:2304)

At Com.mysql.jdbc.connectionimpl.<init> (connectionimpl.java:834)

At Com.mysql.jdbc.jdbc4connection.<init> (jdbc4connection.java:47)

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:411)

At Com.mysql.jdbc.ConnectionImpl.getInstance (connectionimpl.java:416)

At Com.mysql.jdbc.NonRegisteringDriver.connect (nonregisteringdriver.java:346)

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:801)

At Org.apache.sqoop.manager.GenericJdbcManager.getConnection (genericjdbcmanager.java:52)

At Org.apache.sqoop.manager.SqlManager.execute (sqlmanager.java:660)

At Org.apache.sqoop.manager.SqlManager.execute (sqlmanager.java:683)

At Org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery (sqlmanager.java:240)

At Org.apache.sqoop.manager.SqlManager.getColumnTypes (sqlmanager.java:223)

At Org.apache.sqoop.manager.ConnManager.getColumnTypes (connmanager.java:347)

At Org.apache.sqoop.orm.ClassWriter.getColumnTypes (classwriter.java:1277)

At Org.apache.sqoop.orm.ClassWriter.generate (classwriter.java:1089)

At Org.apache.sqoop.tool.CodeGenTool.generateORM (codegentool.java:96)

At Org.apache.sqoop.tool.ImportTool.importTable (importtool.java:396)

At Org.apache.sqoop.tool.ImportTool.run (importtool.java:502)

At Org.apache.sqoop.Sqoop.run (sqoop.java:145)

At Org.apache.hadoop.util.ToolRunner.run (toolrunner.java:70)

At Org.apache.sqoop.Sqoop.runSqoop (sqoop.java:181)

At Org.apache.sqoop.Sqoop.runTool (sqoop.java:220)

At Org.apache.sqoop.Sqoop.runTool (sqoop.java:229)

At Org.apache.sqoop.Sqoop.main (sqoop.java:238)

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

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.<init> (socket.java:425)

At Java.net.socket.<init> (socket.java:241)

At Com.mysql.jdbc.StandardSocketFactory.connect (standardsocketfactory.java:259)

At Com.mysql.jdbc.mysqlio.<init> (mysqlio.java:307)

... More

15/09/16 09:05:00 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)

At Org.apache.sqoop.tool.CodeGenTool.generateORM (codegentool.java:96)

At Org.apache.sqoop.tool.ImportTool.importTable (importtool.java:396)

At Org.apache.sqoop.tool.ImportTool.run (importtool.java:502)

At Org.apache.sqoop.Sqoop.run (sqoop.java:145)

At Org.apache.hadoop.util.ToolRunner.run (toolrunner.java:70)

At Org.apache.sqoop.Sqoop.runSqoop (sqoop.java:181)

At Org.apache.sqoop.Sqoop.runTool (sqoop.java:220)

At Org.apache.sqoop.Sqoop.runTool (sqoop.java:229)

At Org.apache.sqoop.Sqoop.main (sqoop.java:238)


Sqoop error, can't read MySQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.