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.