Help Center/ MapReduce Service/ User Guide (Paris Region)/ Troubleshooting/ Using HDFS/ Client Installed on a Node Outside the Cluster Fails to Upload Files Using hdfs
Updated on 2024-10-11 GMT+08:00

Client Installed on a Node Outside the Cluster Fails to Upload Files Using hdfs

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 An error is 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.