Help Center/ MapReduce Service/ User Guide (Paris Region)/ Troubleshooting/ Using HDFS/ Failed to Use Python to Remotely Connect to the Port of HDFS
Updated on 2024-10-11 GMT+08:00

Failed to Use Python to Remotely Connect to the Port of HDFS

Issue

Failed to use Python to remotely connect to the port of HDFS.

Symptom

Failed to use Python to remotely connect to port 50070 of HDFS.

Cause Analysis

The default port of open source HDFS is 50070 for versions earlier than 3.0.0 and is 9870 for version 3.0.0 or later. The port used by the user does not match the HDFS version.

  1. Log in to the active Master node in the cluster.
  2. Run the su - omm command to switch to user omm.
  3. Run the /opt/Bigdata/om-0.0.1/sbin/queryVersion.sh command to check the HDFS version in the cluster.

    Determine the port number of the open-source component based on the version number.

  4. Run the netstat -anp|grep ${port} command to check whether the default port number of the component exists.

    If it does not exist, the default port number is changed. Change the port to the default port and reconnect to HDFS.

    If it exists, contact technical support.
    • ${port}: indicates the default port number corresponding to the component version.
    • If you have changed the default port number, use the new port number to connect to HDFS. You are advised not to change the default port number.