- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Could not find or load main class dfsadmin
- Labels:
-
Apache Ambari
-
Apache Hadoop
Created ‎03-09-2017 11:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Was trying to run 'hdfs dfsadmin -safemode enter'. It was throwing message saying 'could not find or load main class dfsadmin'.
Can someone help me understanding under which circumstances would we get this error and what is the work around to make it work.
Thank you in advance
Created ‎03-09-2017 11:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One of the reason can be special characters (Non printable) in the command Because the error that you are getting can occur if "hdfs" command is not able to locate the class related to the argument.
Example::
# hdfs dsfadmin -safemode enter Error: Could not find or load main class dsfadmin
- In this example i intentionally made a spelling mistake in 'dfsadmin" argument to explain. In your case it might be due to some special hidden chars.
.
So you should try check that you are not copying and pasting the command in the terminal... instead try to manually type the command.
Also check the output of the following to see if you are getting the correct command output:
# hdfs --help | grep dfsadmin dfsadmin run a DFS admin client
Created ‎03-09-2017 11:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One of the reason can be special characters (Non printable) in the command Because the error that you are getting can occur if "hdfs" command is not able to locate the class related to the argument.
Example::
# hdfs dsfadmin -safemode enter Error: Could not find or load main class dsfadmin
- In this example i intentionally made a spelling mistake in 'dfsadmin" argument to explain. In your case it might be due to some special hidden chars.
.
So you should try check that you are not copying and pasting the command in the terminal... instead try to manually type the command.
Also check the output of the following to see if you are getting the correct command output:
# hdfs --help | grep dfsadmin dfsadmin run a DFS admin client
Created ‎03-09-2017 11:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tried the same command again later, it worked. haven't changed anything.
Thank you Jay SenSharma
