When trying to start hadoop, this error message is quite common :
Exception in thread “main” java.lang.NoClassDefFoundError: start-all/sh
Caused by: java.lang.ClassNotFoundException: start-all.sh
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: start-all.sh. Program will exit.
Here’s a quick check list to resolve this issue:
- Ensure you are calling the ‘start-all.sh‘ from within ‘bin‘. If you are inside ‘bin’ then the call should be ‘./start-all.sh‘ and if you are a level above bin, then try running: ‘bin/start-all.sh‘.
- One other common mistake I’ve seen is, people try running : ‘bin/hadoop start-all.sh‘. Please do not prefix ‘hadoop‘ to the start call.
Tatiana says
Hi! My name is Tatiana and I’m a journalist and work in the SEO company. I wrote to you to participate in a OLX campaign. I’d like you write the article for us. Your blog has the ‘face’ for this work. The payment will be made to your Paypal account. If you liked the proposal, write to me and I will explain details of that work.
Cheers,