DEV Community

Lawren
Lawren

Posted on

2 1

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!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

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

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay