Mark,
Adding that contentListener to the URL worked like a charm, tkx!

Now, I am adding in https and certificates into the mix and testing that flow.
I did the 2 way auth, and made the appropriate changed to the config and 
property files...I can log into the GUI with https  also, with the the cert's 
setup.

I added the SSL content service settings in the xml file., and selected that 
service in PostHTTP and ListenHTTP processor properties in the GUI.(I am trying 
to test the flow before I interact with the other service/customer).



Can I use a PostHTTP using https and send to the same instance of NiFi to the 
ListenHTTP  (running on the same machine, and same flow diagram)....?I have the 
https in the url and port set to 8443,   and have ListenHTTP running on 8443

Again, this works with regular http, but getting issues with https.

Error:   PKIX path validation failed:   CertPathValidatorException: signature 
check failed


PS:  This might sound similar to the Site-to-Site stuff going on in other 
threads.  It sounded like something like this does not work in site-to-site, 
but I'm not using that....  (again just PostHTTP and ListenHTTP).



I don't have much control of the flow, just following the requirements from the 
customer...  ;-)


  Tkx,
Jim

      From: Jim Reilly <[email protected]>
 To: "[email protected]" <[email protected]> 
 Sent: Monday, April 27, 2015 12:02 PM
 Subject: Re: Testing the Receiving of an HTTP Post with "Send As FlowFile"
   
Mark,
Yes, that does help, I'll add the contentListener part in the URL, I did not 
have that...
As for new flow part,  it's in the same diagram, just 2 separate parts (or 
flows ) in that 1 diagram.When the PostHTTP processor tries to send the 
flowfile, I get an error in nifi that says something like:    cannot post 
FlowFiles, post not supported....  dont't have exact msg with me...

My nifi system is running in a lab, and do not have internet access there, so 
I'll try that out.. 

Many thanks!!!!!
  Tkx,
Jim

 

     From: Mark Payne <[email protected]>
 To: [email protected] 
 Sent: Monday, April 27, 2015 11:43 AM
 Subject: Re: Testing the Receiving of an HTTP Post with "Send As FlowFile"
   
Jim,

Can you explain a bit further what you mean by "So, I created a new flow 
with the ListenHTTP processor to receive the post request, but that does 
not accept an http POST."?

PostHTTP and ListenHTTP really were designed to be used together (this 
was the primary mechanism for sharing data between two NiFi instances 
before site-to-site was created) and should integrate nicely.

When you perform the Post, though, be sure that the URL that you post to 
ends with "/contentListener". I.e., if ListenHTTP and PostHTTP both are 
running on the same box, you would post to 
http://localhost:4444/contentListener, for instance.

Does this help at all?

Thanks
-Mark




------ Original Message ------
From: "Jim Reilly" <[email protected]>
To: "[email protected]" <[email protected]>
Sent: 4/27/2015 11:33:20 AM
Subject: Testing the Receiving of an HTTP Post with "Send As FlowFile"

>Hi,
>
>I have a file on disk, and use the GetFile processor to retrieve it, 
>then use the PostHTTP processor to send it out.
>
>I need to test this flow, before I actually send the http POST to a 
>specified URL.
>
>I have a test servlet that received the HTTP Post and reads that data 
>of out the request object.
>
>But, when I change the PostHTTP to "Send As FlowFile" (per my 
>requirement), it does not work since the PostHTTP does some prior 
>validation steps to see what version of flowfile to use.
>Thus, my servlet does not work.
>
>So, I created a new flow with the  ListenHTTP processor to receive the 
>post request, but that does not accept an http POST.
>So, how can I test my flow of sending a file off disk, using an 
>PostHTTP processor (per requirements)...??
>
>  Tkx,
>Jim
>
>

   

  

Reply via email to