DEV Community

Lawren
Lawren

Posted on

Unable to start namenode with Hadoop 3.3.0 on WSL 2

I'm running Hadoop on WSL 2, I couldn't open the namenode interface on port 9870I'm using hadoop 3.3.0

After checking service with jps, there is only secondary namenode and data node running, while the name node service is gone.

Here is my core-site.xml:

<configuration>
<property> 
<name>fs.defaultFS</name> 
<value>hdfs://localhost:9000</value> 
</property> <property> 
<name>hadoop.tmp.dir</name> 
<value>file:/hadoop/hadoop-3.3.0/tmp</value> 
<description></description>
 </property> 
</configuration>
Enter fullscreen mode Exit fullscreen mode

While running format for namenode, this query showed up:
Re-format filesystem in Storage Directory root= /hadoop/hadoop-3.3.0/tmp/dfs/name; location= null ? (Y or N)
Then I check the log of namenode, it seems unable to read from filepath:
org.apache.hadoop.util.ExitUtil: Exiting with status 1: java.io.IOException: Could not parse line: Filesystem 1024-blocks Used Available Capacity Mounted on

How could I configure the namenode to make it run?
Thank you for all the help!

Top comments (1)

Collapse
 
musaibdata profile image
Musaib Shaikh

in the value field of coresite.xml path will be in /usr/local/hadoop
do cd in /usr/local/hadoop/HDFS check and paste the path in field