You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "Rai, Anil (GE Digital)" <an...@ge.com> on 2017/03/02 19:08:51 UTC
Hosting API's on Nifi
Hello All,
I am exposing an API using HandleHttpRequest on my local nifi instance. The HandleHttpRequest processor requires a Listening port that I need to provide. If I enter 80 in that field, the processor fails when it starts saying “unable to initialize the server”. Which is expected as the webserver uses that port to serve the canvas. So if we provide any other randon number then it works fine.
When I promote the above API on the nifi cluster that is hosted on our AWS farm, then we are unable to invoke this API. As only 80 and 443 are opened on AWS.
How do we overcome this problem?
Regards
Anil
Re: Hosting API's on Nifi
Posted by Joe Witt <jo...@gmail.com>.
definitely ignore my suggestion - i didn't read the question properly.
If you want to use a single port to address multiple applications
you'll need something a little more capable than simply port
forwarding.
On Thu, Mar 2, 2017 at 2:30 PM, Joe Gresock <jg...@gmail.com> wrote:
> I believe the traditional approach would be to specify another port like
> 8443 in the NiFi HandleHttpRequest processor, and use a reverse proxy like
> nginx or httpd running on 80/443 that directs traffic to NiFi. We have
> done this on our own project, and there are several articles floating
> around on quickly setting up nginx or httpd for this purpose. Would you be
> able to install something like httpd or nginx?
>
> On Thu, Mar 2, 2017 at 7:26 PM, Oleg Zhurakousky <
> ozhurakousky@hortonworks.com> wrote:
>
>> Anil
>>
>> Aside from opening another port I don’t se how you can overcome this
>> issue. HandleHttpRequest essentially starts another web server and this
>> server needs a port to listen on.
>> Further more, there are many other network based Processors that come with
>> NiFi that would fall int the same category - “a processors that need to
>> bind to a port” to facilitate communication with external systems, so I’d
>> recommend bringing this up with your AWS admins.
>>
>> I know there is nor much help in my reply, but I hope you understand.
>>
>> Cheers
>> Oleg
>>
>> > On Mar 2, 2017, at 2:08 PM, Rai, Anil (GE Digital) <an...@ge.com>
>> wrote:
>> >
>> >
>> >
>> >
>> > Hello All,
>> >
>> > I am exposing an API using HandleHttpRequest on my local nifi instance.
>> The HandleHttpRequest processor requires a Listening port that I need to
>> provide. If I enter 80 in that field, the processor fails when it starts
>> saying “unable to initialize the server”. Which is expected as the
>> webserver uses that port to serve the canvas. So if we provide any other
>> randon number then it works fine.
>> >
>> > When I promote the above API on the nifi cluster that is hosted on our
>> AWS farm, then we are unable to invoke this API. As only 80 and 443 are
>> opened on AWS.
>> >
>> > How do we overcome this problem?
>> >
>> > Regards
>> > Anil
>> >
>>
>>
>
>
> --
> I know what it is to be in need, and I know what it is to have plenty. I
> have learned the secret of being content in any and every situation,
> whether well fed or hungry, whether living in plenty or in want. I can do
> all this through him who gives me strength. *-Philippians 4:12-13*
Re: Hosting API's on Nifi
Posted by Joe Gresock <jg...@gmail.com>.
I believe the traditional approach would be to specify another port like
8443 in the NiFi HandleHttpRequest processor, and use a reverse proxy like
nginx or httpd running on 80/443 that directs traffic to NiFi. We have
done this on our own project, and there are several articles floating
around on quickly setting up nginx or httpd for this purpose. Would you be
able to install something like httpd or nginx?
On Thu, Mar 2, 2017 at 7:26 PM, Oleg Zhurakousky <
ozhurakousky@hortonworks.com> wrote:
> Anil
>
> Aside from opening another port I don’t se how you can overcome this
> issue. HandleHttpRequest essentially starts another web server and this
> server needs a port to listen on.
> Further more, there are many other network based Processors that come with
> NiFi that would fall int the same category - “a processors that need to
> bind to a port” to facilitate communication with external systems, so I’d
> recommend bringing this up with your AWS admins.
>
> I know there is nor much help in my reply, but I hope you understand.
>
> Cheers
> Oleg
>
> > On Mar 2, 2017, at 2:08 PM, Rai, Anil (GE Digital) <an...@ge.com>
> wrote:
> >
> >
> >
> >
> > Hello All,
> >
> > I am exposing an API using HandleHttpRequest on my local nifi instance.
> The HandleHttpRequest processor requires a Listening port that I need to
> provide. If I enter 80 in that field, the processor fails when it starts
> saying “unable to initialize the server”. Which is expected as the
> webserver uses that port to serve the canvas. So if we provide any other
> randon number then it works fine.
> >
> > When I promote the above API on the nifi cluster that is hosted on our
> AWS farm, then we are unable to invoke this API. As only 80 and 443 are
> opened on AWS.
> >
> > How do we overcome this problem?
> >
> > Regards
> > Anil
> >
>
>
--
I know what it is to be in need, and I know what it is to have plenty. I
have learned the secret of being content in any and every situation,
whether well fed or hungry, whether living in plenty or in want. I can do
all this through him who gives me strength. *-Philippians 4:12-13*
Re: Hosting API's on Nifi
Posted by Joe Witt <jo...@gmail.com>.
You can run the processor on another port and use port forwarding to
go from 80 to whatever port you're really using. This is a good
practice anyway since you don't want to run nifi as root ideally (you
could also allow nifi to bind to lower ports, but..). Lots of ways to
slice it.
Thanks
joe
On Thu, Mar 2, 2017 at 2:26 PM, Oleg Zhurakousky
<oz...@hortonworks.com> wrote:
> Anil
>
> Aside from opening another port I don’t se how you can overcome this issue. HandleHttpRequest essentially starts another web server and this server needs a port to listen on.
> Further more, there are many other network based Processors that come with NiFi that would fall int the same category - “a processors that need to bind to a port” to facilitate communication with external systems, so I’d recommend bringing this up with your AWS admins.
>
> I know there is nor much help in my reply, but I hope you understand.
>
> Cheers
> Oleg
>
>> On Mar 2, 2017, at 2:08 PM, Rai, Anil (GE Digital) <an...@ge.com> wrote:
>>
>>
>>
>>
>> Hello All,
>>
>> I am exposing an API using HandleHttpRequest on my local nifi instance. The HandleHttpRequest processor requires a Listening port that I need to provide. If I enter 80 in that field, the processor fails when it starts saying “unable to initialize the server”. Which is expected as the webserver uses that port to serve the canvas. So if we provide any other randon number then it works fine.
>>
>> When I promote the above API on the nifi cluster that is hosted on our AWS farm, then we are unable to invoke this API. As only 80 and 443 are opened on AWS.
>>
>> How do we overcome this problem?
>>
>> Regards
>> Anil
>>
>
Re: Hosting API's on Nifi
Posted by Oleg Zhurakousky <oz...@hortonworks.com>.
Anil
Aside from opening another port I don’t se how you can overcome this issue. HandleHttpRequest essentially starts another web server and this server needs a port to listen on.
Further more, there are many other network based Processors that come with NiFi that would fall int the same category - “a processors that need to bind to a port” to facilitate communication with external systems, so I’d recommend bringing this up with your AWS admins.
I know there is nor much help in my reply, but I hope you understand.
Cheers
Oleg
> On Mar 2, 2017, at 2:08 PM, Rai, Anil (GE Digital) <an...@ge.com> wrote:
>
>
>
>
> Hello All,
>
> I am exposing an API using HandleHttpRequest on my local nifi instance. The HandleHttpRequest processor requires a Listening port that I need to provide. If I enter 80 in that field, the processor fails when it starts saying “unable to initialize the server”. Which is expected as the webserver uses that port to serve the canvas. So if we provide any other randon number then it works fine.
>
> When I promote the above API on the nifi cluster that is hosted on our AWS farm, then we are unable to invoke this API. As only 80 and 443 are opened on AWS.
>
> How do we overcome this problem?
>
> Regards
> Anil
>