I'm using hadoop 3.1.2 and jdk-12.0.1 operating on Pseudo-Distributed mode. So far from the command line every thing seems to be working normal I can upload files retrieve from hdfs and local. For some reason when I open the namenode which is actually accede via http://ip:9870 and navigate to utilities/Browse Directory, the browser opens and this is what is highlighted "Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error" I know this question have been asked before Error "Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error" when using hadoop but the answer did not satisfy that's why I have reopen the case.
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>file:///home/debian/hadoopdata/hdfs/namenode</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:///home/debian/hadoopdata/hdfs/datanode</value>
</property>
</configuration>
my output of netstat -ntlp
incase if something is missing
tcp 0 0 0.0.0.0:9864 0.0.0.0:* LISTEN 6033/java
tcp 0 0 192.168.0.250:9000 0.0.0.0:* LISTEN 5935/java
tcp 0 0 0.0.0.0:9866 0.0.0.0:* LISTEN 6033/java
tcp 0 0 0.0.0.0:9867 0.0.0.0:* LISTEN 6033/java
tcp 0 0 0.0.0.0:9868 0.0.0.0:* LISTEN 6196/java
tcp 0 0 0.0.0.0:9870 0.0.0.0:* LISTEN 5935/java
tcp 0 0 127.0.0.1:46613 0.0.0.0:* LISTEN 6033/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
As you have found out Hadoop doesn't support Java 12 (as of 07/02/2019).
The wiki Hadoop Java Versions describes the currently supported Java versions.
To see when Java 11 LTS is supported you can track this JIRA.