Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

sqoop import error

Solved Go to solution

Re: sqoop import error

Explorer

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Highlighted

Re: sqoop import error

Explorer

everything is ok, may be i have to add the port to jdbc:mysql://hadoop:3306 right ?

Highlighted

Re: sqoop import error

Super Mentor

@Aymen Rahal

Yes 3306 is the default port for MySQL.

So better to add it in the URL.

# sqoop import --connect jdbc:mysql://hadoop:3306/Testdb --table widgets -m 4 --username root --password CHANGEME --driver com.mysql.jdbc.Driver<br>

.

Also please check if you are able to login to MySQL using command line or not?

# mysql -u root -p

.

Highlighted

Re: sqoop import error

Explorer

I get this error:

18/03/09 01:01:51 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:1659) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:488) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Highlighted

Re: sqoop import error

Super Mentor

@Aymen Rahal

The current error is completely different from the one which was mentioned in the original thread so it might confuse the users who hit the same issue described in the Original thread.

Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter at org.apache.sqoop.orm.ClassWriter.generat

.

Hence i will request you to please mark this HCC thread as "answered" by clicking on the "Accept" button and then open a new thread with the current error. Thats helps many community users to quickly find one specific error with one specific answer.

Don't have an account?
Coming from Hortonworks? Activate your account here