Support Questions

Find answers, ask questions, and share your expertise

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

avatar
Explorer

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?

1 ACCEPTED SOLUTION

avatar
Explorer

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.

View solution in original post

5 REPLIES 5

avatar
Expert Contributor
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.

avatar
Explorer

Both the components are on the same server. 

 

I am using CDH 4.7 and sqoop2. 

avatar
Expert Contributor

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>

 

avatar
Explorer

Yes...

avatar
Explorer

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.