<?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 How can I get fsimage with curl command? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/314859#M226223</link>
    <description>&lt;P&gt;I authenticated with hadoop-admin user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hdfs dfsadmin&amp;nbsp;-fetchImage ./output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;command works well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to do this with curl command,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl https://{namenode_address}:9470/imagetransfer?getimage=1&amp;amp;txid=latest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8"/&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;Error 401 Authentication required&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;HTTP ERROR 401&amp;lt;/h2&amp;gt;&lt;BR /&gt;&amp;lt;p&amp;gt;Problem accessing /imagetransfer. Reason:&lt;BR /&gt;&amp;lt;pre&amp;gt; Authentication required&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which authentication is needed additionally?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 06:50:54 GMT</pubDate>
    <dc:creator>sipocootap2</dc:creator>
    <dc:date>2021-04-19T06:50:54Z</dc:date>
    <item>
      <title>How can I get fsimage with curl command?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/314859#M226223</link>
      <description>&lt;P&gt;I authenticated with hadoop-admin user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hdfs dfsadmin&amp;nbsp;-fetchImage ./output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;command works well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to do this with curl command,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl https://{namenode_address}:9470/imagetransfer?getimage=1&amp;amp;txid=latest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8"/&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;Error 401 Authentication required&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;HTTP ERROR 401&amp;lt;/h2&amp;gt;&lt;BR /&gt;&amp;lt;p&amp;gt;Problem accessing /imagetransfer. Reason:&lt;BR /&gt;&amp;lt;pre&amp;gt; Authentication required&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which authentication is needed additionally?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 06:50:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/314859#M226223</guid>
      <dc:creator>sipocootap2</dc:creator>
      <dc:date>2021-04-19T06:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get fsimage with curl command?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/314999#M226284</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/83034"&gt;@sipocootap2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AFAIK "/getimage" is deprecated in CDH and we suggest this not to be used. Instead you can use the command "&lt;SPAN&gt;hdfs dfsadmin&amp;nbsp;-fetchImage &amp;lt;dir&amp;gt;" to download &amp;amp; save the latest fsimage.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Based on research, in earlier versions of CDH, the getImage method was available after which a need was realized to provide a proper command/utility to download the FSimage and as a result of which "hdfs dfsadmin -fetchImage" was born. Once that was put in place, the getImage was removed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does that answers your questions ? If yes, feel free to mark this post as "accept as solution"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 05:11:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/314999#M226284</guid>
      <dc:creator>kingpin</dc:creator>
      <dc:date>2021-04-21T05:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get fsimage with curl command?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/317612#M227247</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/29186"&gt;@kingpin&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Is there an official document that "/getimage" is deprecated? Cause I couldn't find it.&lt;/P&gt;&lt;P&gt;When I run "hdfs dfsadmin -fetchImage" command, it also calls the same curl command.&lt;/P&gt;&lt;P&gt;I could get fsimage with hdfs command, but I want to figure out the reason why curl fails.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 08:10:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-fsimage-with-curl-command/m-p/317612#M227247</guid>
      <dc:creator>sipocootap2</dc:creator>
      <dc:date>2021-06-03T08:10:54Z</dc:date>
    </item>
  </channel>
</rss>

