Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-09-2017 11:05 AM
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
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
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
tried the same command again later, it worked. haven't changed anything.
Thank you Jay SenSharma