QnaList > Groups > Sqoop-User > Nov 2015
faq

Sqoop V1.4.6 - Sqoop Export Fails With ConnectException

Hello Fellow Sqoopers!
I’m having some trouble with Sqoop export and wanted to document my findings as the usual Google searching and Apache Sqoop docs aren’t helping.
I’m trying to export a Hive table (sequence file) from AWS EMR to AWS RDS(MySQL) and SQOOP is returning the following error. Please note, I am able to successfully sqoop-import from this MySQL Database into Hive!!!
$ sqoop-export \
--connect jdbc:mysql://: \
--username  \
--password  \
--table  \
--export-dir 'hdfs://172.31.47.117/user/hive/warehouse/HiveTable'
ERROR tool.ExportTool: Encountered IOException running export job: java.net.ConnectException:
Call From
   ip-172-31-47-117.us-west-2.compute.internal/172.31.47.117
to
   ip-172-31-47-117.us-west-2.compute.internal:8020
failed on connection exception: java.net.ConnectException: Connection refused;
For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
-- Some environmental info from the Master Node (ie. internal IP):
$ hostname -I
172.31.47.117
$ telnet 172.31.47.117 8020
Trying 172.31.47.117...
telnet: connect to address 172.31.47.117: Connection refused.
So of course I can see the cause of the problem. But why on earth is SQOOP-EXPORT trying to connect to itself on port 8020 and what can I do about it?
There is no port-configuration information to gleaned from $SQOOP_HOME/conf/sqoop-site.xml
Kind Regards
Timothy Garza
Database and BI Developer
Collinson Technology Services
Skype: timothy.garza.cts
collinsongroup.com
[Collinson Group]
The Collinson Group Limited; Registered number: 2577557, Registered in England & Wales; Registered Office: Cutlers Exchange, 123 Houndsditch, London, EC3A 7BU.
This e-mail may contain privileged and confidential information and/or copyright material and is intended for the use of the addressee only. If you receive this e-mail by mistake please advise the sender immediately by using the reply facility in your e-mail software and delete this e-mail from your computer system. You may not deliver, copy or disclose its contents to anyone else. Any unauthorised use may be unlawful. Any views expressed in this e-mail are those of the individual sender and may not necessarily reflect the views of The Collinson Group Ltd and/or its subsidiaries or any other associated company (collectively “Collinson Group”).
As communications via the Internet are not secure Collinson Group cannot accept any liability if this e-mail is accessed by third parties during the course of transmission or is modified or amended in any way following despatch. Collinson Group cannot guarantee that any attachment to this email does not contain a virus, therefore it is strongly recommended that you carry out your own virus check before opening any attachment, as we cannot accept liability for any damage sustained as a result of software virus infection. Senders of messages shall be taken to consent to the monitoring and recording of e-mails addressed to members of the Company.

asked Nov 3 2015 at 08:48

Timothy Garza 's gravatar image



1 Replies for : Sqoop V1.4.6 - Sqoop Export Fails With ConnectException
You should know that Hive version of sequence files is not supported in Sqoop 1 - sequence file is just a container that can be used in many different forms and we’re simply not supporting the way Hive uses them.
Now for the problem:
You have specified in the —export-dir that Sqoop should connect to HDFS instance running on 172.31.47.117 and that is why Sqoop is connecting there (8020 is default port for namenode). If your namenode runs somewhere else, then you have to update your Sqoop command.
Alternatively, if the import works just fine, I would drop the entire part with specifying namenode and use only the directory, e.g. “—export-dir /user/hive/wahourese/HiveTable”.
Jarcec

answered Nov 3 2015 at 13:06

Jarek Jarcec Cecho 's gravatar image


Related discussions

Tagged

Group Sqoop-user

asked Nov 3 2015 at 08:48

active Nov 3 2015 at 13:06

posts:2

users:2

©2013 QnaList.com