Reply
New Contributor
Posts: 5
Registered: ‎10-29-2014
Accepted Solution

Connection refused - when loading data from MySQL to HDFS using sqoop2

Getting this error.

 

Error: java.net.ConnectException: Call From server1.cvrunner.com/158.85.75.36 to localhost:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

 

 

Created connection on linux in sqoop2 shell. THe connection passed. MySQL is up and running.

 

When i created a job on Hue and tried to run the job. I am getting this error. 

 

Not sure it is connectivity to MySQL or something else

 

Can anybody suggest me?

Cloudera Employee abe
Cloudera Employee
Posts: 109
Registered: ‎08-08-2013

Re: Connection refused - when loading data from MySQL to HDFS using sqoop2

It sounds like your core-site.xml on the node running the Sqoop server isn't configured properly. Does the node running Sqoop2 server have /etc/hadoop/conf/core-site.xml? If not, could you try copying your clients /etc/hadoop/conf to the node running Sqoop2 server?

So, your problem should be rectifiable more easily in Sqoop 1.99.4 (CDH 5.3.0). See https://issues.apache.org/jira/browse/SQOOP-1620 for more details.
New Contributor
Posts: 5
Registered: ‎10-29-2014

Re: Connection refused - when loading data from MySQL to HDFS using sqoop2

Both the components are on the same server. 

 

I am using CDH 4.7 and sqoop2. 

Cloudera Employee abe
Cloudera Employee
Posts: 109
Registered: ‎08-08-2013

Re: Connection refused - when loading data from MySQL to HDFS using sqoop2

Is server1.cvrunner.com your machine? If so, core-site.xml might not be configured properly. Could you try adding a property:

 

  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://server1.cvrunner.com:8020</value>
  </property>

 

New Contributor
Posts: 5
Registered: ‎10-29-2014

Re: Connection refused - when loading data from MySQL to HDFS using sqoop2

Yes...

New Contributor
Posts: 5
Registered: ‎10-29-2014

Re: Connection refused - when loading data from MySQL to HDFS using sqoop2

Thanks Abe. It worked.

 

There are 2 changes I did.

1. changing from localhost to actual server name

2. Giving permission to Hue user to create the files on hdfs using "hadoop fs -R -chown" command.

Announcements