<?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 Unable to POST .rpm file using InvokeHTTP processor - NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/316539#M226832</link>
    <description>&lt;P&gt;Hello, I have been tasked with POSTing a .rpm file (RedHat package manager) to a server location, this is to automate a manual process that we perform on a weekly basis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to download the file into NiFi using InvokeHTTP GET. At this stage the 'Content-Type' attribute shows as 'audio/x-pn-realaudio-plugin' , I have read online that this is a common mistake when dealing with .rpm files. I have then used a IdentifyMimeType processor which updates mime type to: application/x-rpm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the API documentation is says I require POST /rest/v1/updates as location 'file' as a parameter, see below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_0-1621255023416.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31192i04D8E38937F5DAF3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_0-1621255023416.png" alt="Griggsy_0-1621255023416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have been given the following python script that achieves what I am trying to do in Python, so far I have not been able to replicate in Nifi.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_1-1621255749430.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31193i652A9F2194582475/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_1-1621255749430.png" alt="Griggsy_1-1621255749430.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have tried numerous different configs of the processor, manually changed attributes: file, filename, mime.extension, mime.type, Content-Type, Accept-Encoding. I have tried manually adding attributes from the Python script and referencing from the invoke. I have tried to compress to gzip as I was informed it should be in compressed format so I though NiFi had maybe changed it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far I have never had anything other than 'no retry' responses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I currently have set up my invokeHTTP as below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_2-1621256685997.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31194i4AF02EAD7FD5F097/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_2-1621256685997.png" alt="Griggsy_2-1621256685997.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I have 'Send Message Body' true - I get the following response:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_3-1621256841121.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31195i96CF2372A776CAB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_3-1621256841121.png" alt="Griggsy_3-1621256841121.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I set 'Send Message Body' false - I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_4-1621257079362.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31196i64B1B1A9F7D570BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_4-1621257079362.png" alt="Griggsy_4-1621257079362.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any assistance with this at all would be v.much appreciated. I have been trying for a number of days with every different option/config I can think of but cannot get it to POST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the script if mentions getting a 'csrftoken' response, am I able to do this using another invokeHTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Griggsy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 16:38:43 GMT</pubDate>
    <dc:creator>Griggsy</dc:creator>
    <dc:date>2021-05-17T16:38:43Z</dc:date>
    <item>
      <title>Unable to POST .rpm file using InvokeHTTP processor - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/316539#M226832</link>
      <description>&lt;P&gt;Hello, I have been tasked with POSTing a .rpm file (RedHat package manager) to a server location, this is to automate a manual process that we perform on a weekly basis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to download the file into NiFi using InvokeHTTP GET. At this stage the 'Content-Type' attribute shows as 'audio/x-pn-realaudio-plugin' , I have read online that this is a common mistake when dealing with .rpm files. I have then used a IdentifyMimeType processor which updates mime type to: application/x-rpm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the API documentation is says I require POST /rest/v1/updates as location 'file' as a parameter, see below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_0-1621255023416.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31192i04D8E38937F5DAF3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_0-1621255023416.png" alt="Griggsy_0-1621255023416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have been given the following python script that achieves what I am trying to do in Python, so far I have not been able to replicate in Nifi.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_1-1621255749430.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31193i652A9F2194582475/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_1-1621255749430.png" alt="Griggsy_1-1621255749430.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have tried numerous different configs of the processor, manually changed attributes: file, filename, mime.extension, mime.type, Content-Type, Accept-Encoding. I have tried manually adding attributes from the Python script and referencing from the invoke. I have tried to compress to gzip as I was informed it should be in compressed format so I though NiFi had maybe changed it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far I have never had anything other than 'no retry' responses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I currently have set up my invokeHTTP as below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_2-1621256685997.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31194i4AF02EAD7FD5F097/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_2-1621256685997.png" alt="Griggsy_2-1621256685997.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I have 'Send Message Body' true - I get the following response:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_3-1621256841121.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31195i96CF2372A776CAB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_3-1621256841121.png" alt="Griggsy_3-1621256841121.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I set 'Send Message Body' false - I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_4-1621257079362.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31196i64B1B1A9F7D570BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_4-1621257079362.png" alt="Griggsy_4-1621257079362.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any assistance with this at all would be v.much appreciated. I have been trying for a number of days with every different option/config I can think of but cannot get it to POST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the script if mentions getting a 'csrftoken' response, am I able to do this using another invokeHTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Griggsy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 16:38:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/316539#M226832</guid>
      <dc:creator>Griggsy</dc:creator>
      <dc:date>2021-05-17T16:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to POST .rpm file using InvokeHTTP processor - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/318819#M227551</link>
      <description>&lt;P&gt;How are you ingesting the rpm, you need to get it in a flowfile as binary and then send it as body&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 16:50:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/318819#M227551</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2021-06-16T16:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to POST .rpm file using InvokeHTTP processor - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/319181#M227709</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/77674"&gt;@Griggsy&lt;/a&gt;&amp;nbsp;&amp;nbsp;have you resolved your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cjervis_0-1624451801419.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31640iD8F36DC7E37F6ED7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cjervis_0-1624451801419.png" alt="cjervis_0-1624451801419.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 12:36:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/319181#M227709</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2021-06-23T12:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to POST .rpm file using InvokeHTTP processor - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/319880#M228009</link>
      <description>&lt;P&gt;Thanks for the reply, I am pulling the .rpm file into NiFi using API. How do i convert it to binary?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not been able to get it to work using invokeHTTP so a colleague of mine has written a Python script for me to use in a excecuteScript processor. This is working in his test environment using a test .rpm file he pulled into using NiFi using GetFile as apposed to API. However in my environment using the API file the flowfile does not move through the processor? again could be as it's not binary?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_0-1625495758732.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31784iD3EF5FB123BC9E17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Griggsy_0-1625495758732.png" alt="Griggsy_0-1625495758732.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 14:36:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/319880#M228009</guid>
      <dc:creator>Griggsy</dc:creator>
      <dc:date>2021-07-05T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to POST .rpm file using InvokeHTTP processor - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/321438#M228399</link>
      <description>&lt;P&gt;if you read a binary file it should be passed into NiFi with no issue.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 12:42:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-POST-rpm-file-using-InvokeHTTP-processor-NiFi/m-p/321438#M228399</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2021-07-23T12:42:39Z</dc:date>
    </item>
  </channel>
</rss>

