<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Could not find or load main class dfsadmin in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148397#M56663</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3057/sreeviswaathikala.html" nodeid="3057"&gt;@Viswa&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example::&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# hdfs dsfadmin -safemode enter
Error: Could not find or load main class dsfadmin&lt;/PRE&gt;&lt;P&gt;- 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. &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So you should try check that you are not copying and pasting the command in the terminal... instead try to manually type the command.&lt;/P&gt;&lt;P&gt;Also check the output of the following to see if you are getting the correct command output:&lt;/P&gt;&lt;PRE&gt;#  hdfs --help | grep dfsadmin
  dfsadmin             run a DFS admin client&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Mar 2017 19:14:23 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-03-09T19:14:23Z</dc:date>
    <item>
      <title>Could not find or load main class dfsadmin</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148396#M56662</link>
      <description>&lt;P&gt;Was trying to run 'hdfs dfsadmin -safemode enter'. It was throwing message saying 'could not find or load main class dfsadmin'.&lt;/P&gt;&lt;P&gt;Can someone help me understanding under which circumstances would we get this error and what is the work around to make it work.&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 19:05:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148396#M56662</guid>
      <dc:creator>sreeviswa_athic</dc:creator>
      <dc:date>2017-03-09T19:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Could not find or load main class dfsadmin</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148397#M56663</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3057/sreeviswaathikala.html" nodeid="3057"&gt;@Viswa&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example::&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# hdfs dsfadmin -safemode enter
Error: Could not find or load main class dsfadmin&lt;/PRE&gt;&lt;P&gt;- 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. &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So you should try check that you are not copying and pasting the command in the terminal... instead try to manually type the command.&lt;/P&gt;&lt;P&gt;Also check the output of the following to see if you are getting the correct command output:&lt;/P&gt;&lt;PRE&gt;#  hdfs --help | grep dfsadmin
  dfsadmin             run a DFS admin client&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Mar 2017 19:14:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148397#M56663</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-09T19:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Could not find or load main class dfsadmin</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148398#M56664</link>
      <description>&lt;P&gt;tried the same command again later, it worked. haven't changed anything.&lt;/P&gt;&lt;P&gt;Thank you &lt;A href="https://community.cloudera.com/users/3418/jsensharma.html"&gt;Jay SenSharma&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 19:43:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Could-not-find-or-load-main-class-dfsadmin/m-p/148398#M56664</guid>
      <dc:creator>sreeviswa_athic</dc:creator>
      <dc:date>2017-03-09T19:43:12Z</dc:date>
    </item>
  </channel>
</rss>

