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
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.
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.
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.