Error “Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error” when using hadoop

前端 未结 3 1306
眼角桃花
眼角桃花 2021-01-14 18:18

I opened up localhost:9870 and try to upload a txt file to the hdfs.

I see the error message below

Failed to retrieve data from /webhdfs/v1/?op=LISTS         


        
相关标签:
3条回答
  • 2021-01-14 18:33

    I had the same issue with JDK 9. The fix for me was to add this line in hadoop-env.sh

    export HADOOP_OPTS="--add-modules java.activation"

    Thats because java.activation package is deprecated in Java 9.

    0 讨论(0)
  • 2021-01-14 18:38

    Just solved such a problem, I have multiple java versions and hadoop3.1.0.

    you need to specify the java home variable in etc/hadoop/hadoop-env.sh, and the java version should be 1.8.

    0 讨论(0)
  • 2021-01-14 18:41

    I got this to work with OpenJDK 13 by downloading hadoop 2.9.2 and copying the activation-1.1.jar file from that download into the $HADOOP_HOME/share/hadoop/yarn folder you're using for Hadoop 3. Then you have to run stop-dfs.sh and stop-yarn.sh and then start them both again. No need to edit any config files with this method since it will automatically be added to the classpath.

    0 讨论(0)
提交回复
热议问题