Help Center> MapReduce Service> Troubleshooting> Using HDFS> HDFS Files Fail to Be Uploaded When the Client Is Installed on a Node Outside the Cluster
Updated on 2023-11-30 GMT+08:00

HDFS Files Fail to Be Uploaded When the Client Is Installed on a Node Outside the Cluster

Issue

A client installed on a node outside the cluster fails to upload files using hdfs.

Symptom

After a client is installed on a cluster node and a file is uploaded using the hdfs command, the following error is reported.

Figure 1 Error reported during file upload

Cause Analysis

The error message "no route to host" is displayed, and the IP address 192.168 is contained in the error message. That is, the internal network route from the client node to the DataNode in the cluster is unreachable. As a result, the file fails to be uploaded.

Procedure

In the client directory of the client node, find the hdfs-site.xml file in the HDFS client configuration directory. Add the dfs.client.use.datanode.hostname configuration item to the configuration file, and set the value to true.