Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> sqoop import : communication links failure


Copy link to this message
-
Re: sqoop import : communication links failure
Hi sir,
Sqoop will need access to your database from *all* machines in your cluster. Having db access only from some limited number of machines (such as gateways, NameNode or other "special" nodes) is not sufficient. I would recommend trying that mysql command from all your nodes or checking your user configuration on MySQL server side.

Jarcec

On Sat, Nov 02, 2013 at 01:24:22AM +0800, wan razali wrote:
> Hi all,
>
> I tried to import remote database using sqoop
>
> I did try the solutions mentioned here:
> http://solaimurugan.blogspot.com/2013/07/resolved-issue-error-in-sqoop-14.html
> https://cwiki.apache.org/confluence/download/attachments/27361435/sqoop_meetup_kate_ting_110711.pdf?version=1&modificationDate=1323721159000
>
> & did test the connection using mysql command below & successfully
> connected to the remote mysql server (@ 192.168.0.151):-
>
>
>
> >mysql -h 192.168.0.151 -u sqoopuser -pscooppassword
>
> mysql> show databases;
> +--------------------+
> | Database           |
> +--------------------+
> | information_schema |
> | mysql              |
> | performance_schema |
> | propertytrend      |
> | test               |
> | webscrapper        |
> +--------------------+
> 6 rows in set (0.39 sec)
>
> -------------------------------------
> mysql> status;
> --------------
> mysql  Ver 14.14 Distrib 5.5.32, for debian-linux-gnu (x86_64) using
> readline 6.2
>
> Connection id:        73
> Current database:
> Current user: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> SSL:            Not in use
> Current pager:        stdout
> Using outfile:        ''
> Using delimiter:    ;
> Server version:        5.5.32-0ubuntu7 (Ubuntu)
> Protocol version:    10
> Connection:        192.168.0.151 via TCP/IP
> Server characterset:    latin1
> Db     characterset:    latin1
> Client characterset:    utf8
> Conn.  characterset:    utf8
> TCP port:        3306
> Uptime:            32 min 47 sec
>
>
>
>
>
> I want to import the remote db into HFDS with setting options as follows:
> -----------------------
> import
> --connect
> jdbc:mysql://198.168.0.151/propertytrend
> --verbose
> --username
> sqoopuser
> --password
> scooppasword
> --as-textfile
> --split-by
> id
> --table
> hd_columns_varchar
> --columns
> id,rowId,value
> --where
> columnId = 5 AND reportId = 200
> --target-dir
> /user/hduser/sqoop/import/output
>
> ------------------------
>
>
> But when I ran the sqoop import I got these errors:
>
> ---------------------------------------
> bin/sqoop --options-file options/setting-import3.txt
> Warning: /usr/lib/hbase does not exist! HBase imports will fail.
> Please set $HBASE_HOME to the root of your HBase installation.
> Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
> Please set $HCAT_HOME to the root of your HCatalog installation.
> Warning: $HADOOP_HOME is deprecated.
>
> 13/11/01 23:42:15 DEBUG tool.BaseSqoopTool: Enabled debug logging.
> 13/11/01 23:42:15 WARN tool.BaseSqoopTool: Setting your password on
> the command-line is insecure. Consider using -P instead.
> 13/11/01 23:42:16 DEBUG sqoop.ConnFactory: Loaded manager factory:
> com.cloudera.sqoop.manager.DefaultManagerFactory
> 13/11/01 23:42:16 DEBUG sqoop.ConnFactory: Trying ManagerFactory:
> com.cloudera.sqoop.manager.DefaultManagerFactory
> 13/11/01 23:42:16 DEBUG manager.DefaultManagerFactory: Trying with
> scheme: jdbc:mysql:
> 13/11/01 23:42:16 INFO manager.MySQLManager: Preparing to use a
> MySQL streaming resultset.
> 13/11/01 23:42:16 DEBUG sqoop.ConnFactory: Instantiated ConnManager
> org.apache.sqoop.manager.MySQLManager@7618d289
> 13/11/01 23:42:16 INFO tool.CodeGenTool: Beginning code generation
> 13/11/01 23:42:16 DEBUG manager.SqlManager: Execute
> getColumnTypesRawQuery : SELECT t.* FROM `hd_columns_varchar` AS t
> LIMIT 1
> 13/11/01 23:42:16 DEBUG manager.SqlManager: No connection
> paramenters specified. Using regular API for making connection.
> 13/11/01 23:43:20 ERROR manager.SqlManager: Error executing