Reply
New Contributor
Posts: 6
Registered: ‎09-06-2016

cloudera-quickstart-vm-5.8.0-0-vmware - Sqoop to MySQL connection - Communications link failure

Tagging on to my earliest post

http://community.cloudera.com/t5/Hadoop-101-Training-Quickstart/Quickstart-VM-Cloudera-Live-Tutorial...

 

1) I am using CDH 5.8, Cloudera Quickstart VM (cloudera-quickstart-vm-5.8.0-0-vmware)
Manager Node 192.168.2.128
Worker Node 1 192.168.2.128

 

2) The MySQL service shows up and running
mysqld (pid 2045) is running...

 

3) The hosts file on my VM is configured as follows
127.0.0.1 localhost localhost.domain
192.168.2.128 quickstart.cloudera quickstart

 

4) From the command line, I am able to connect to MySQL

[cloudera@quickstart ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 109
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 


5) However, when I try connecting to MySQL from Sqoop, I am unable to

 

[cloudera@quickstart ~]$ sqoop list-databases --connect jdbc:mysql://quickstart:3306/
16/09/08 05:59:37 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

16/09/08 06:00:41 ERROR manager.CatalogQueryManager: Failed to list databases
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
..
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1036)
..
16/09/08 06:00:41 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
..

 

Please advise.. as I am unable to proceed with Tutorial Exercise 1. Thank you.

 

Highlighted
Cloudera Employee
Posts: 435
Registered: ‎07-12-2013

Re: cloudera-quickstart-vm-5.8.0-0-vmware - Sqoop to MySQL connection - Communications link failure

I seem to recall getting a similar error when the root cause was SQL
permissions. I would try specifying the MySQL username and password that
you see in the Sqoop command in tutorial 1. Since you can connect as root,
you should be able to tweak permissions for the 'cloudera' user if needed,
but they should all work out of the box (and they did for me).
New Contributor
Posts: 6
Registered: ‎09-06-2016

Re: cloudera-quickstart-vm-5.8.0-0-vmware - Sqoop to MySQL connection - Communications link failure

Sean: Thanks for the response.. tried passing the username and pwd along with the sqoop command.. same outcome and error message.. Communications link failure..

 

You do mention that you have had no issues with the VM. Can you please confirm which version and image of CDH and version of host OS?

 

I am on Windows 10 Home edition..and am using the VMWare image of CDH 5.8.