Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

hadoop distcp failing with Invalid arguments: ipoaddres:9870: Connection refused

New Contributor

I am trying to copy files from CDH5.16 to CDH6 using the following command


               hadoop distcp webhdfs:// webhdfs://


and I am getting the following error:


                ERROR tools.DistCp: Invalid arguments: Connection refused (Connection refused)


From Cloudera Manager UI Cluster is healthy. Attached image for your reference.


I have 7 EC2 instances on AWS


Cloudera Manager and a databaes on one server -- CMserver


from the Cloudera Manager I build the cluster using 6 EC2 instances 

NameNode   - 1 instance

Secondary Name  - 1 instance

DataNodes - 4 instances 10.0.2.[27,81,23,200]


CDH roles are as follows
 B  NN  G  HMS  HS2  AP  ES  HM  RM  SM  G  JHS  RM  S
 DN  G  OS  G  NM
 SNN  G  HS2  G  HS  S
 DN  G  G  NM  S
ip-10-0-2-[23, 200].us-west-2.compute.internal2
 DN  G  G  NM



Any help to resolve this issue is helpful.





Master Collaborator

Hello @kotni


The Stack trace says the connection is refused on the NameNode port(9870)dfs.namenode.http-address, hence make sure the required ports are configured/opened in both the source and Destination clusters on performing Distcp.


- Here is the list of ports used by CDH components and DistCP


Post that, Try out the below:

- Examples of DistCP syntaxes to try out


Let us know how it goes.

- Vaishaak