You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "michael.esmann" <ca...@gmail.com> on 2016/05/02 21:40:02 UTC

Camel, Karaf and Hawtio question about portnumbers

Hi,

We are implementing an integration application using:

- Camel 12.14.1
- Hawtio 1.4.56
- Karaf 3.0.5

My question/problem is: We want the Hawtio web application to be accessed by
a specific unique URL/portnumber because the Hawtio application gives access
to some very basic functionalities about Camel/Karaf. But in our application
we must also implement some webservices using camel-cxf. We do not want
these weservices to use the same portnumber as the Hawtio application.

So far I have tried some different configurations using the file
org.ops4j.pax.web.cfg and jetty.xml. Fx. like these entries in
org.ops4j.pax.web.cfg:

   org.osgi.service.http.port=7979
   org.ops4j.pax.web.config.file=${karaf.home}/etc/jetty.xml
 
The findings so far has been, that I must have the "cxf" portnumbers defined
in jetty.xml but then the Hawtio application will also be accessible on
these portnumber. And we don't want this. Any suggestions about how to avoid
this?

/Michael





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Karaf-and-Hawtio-question-about-portnumbers-tp5782087.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel, Karaf and Hawtio question about portnumbers

Posted by Brad Johnson <br...@mediadriver.com>.
I commonly use CXF on ports other than the default but that means you have
to set them in your bundle.   If you don't mind passing the port in in the
cfg file of your bundles you can set it via the bundle and achieve that. I
recently had a situation where a number of different departments with a
number of microservices had different requirements for their endpoints and
so the ports and set ups were different.  I ended up creating a generic
SOAP/REST micro-server so I could just register my bundles via OSGi.  That
way I didn't have to include all the port and interceptor/provider
information in every single bundle.  Just had to register it when the
bundle is loaded.

But you should be able to simply set up the port on the endpoint itself.

If you aren't going to use a proliferation of bundles and microservices
with differing requirements then the following project is probably more
than what you need.  But if you have an environment where you will be
serving up different ports and content it works.  The OSGi service
registration can use filtering to specify which bundles it accepts.

https://github.com/Ranx0r0x/Enjekt-Microservice

On Wed, May 4, 2016 at 9:45 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> You can try asking on the karaf user forum / mailing list, how to
> setup multiple port numbers for HTTP services.
> Installing hawtio on karaf is installing it as a web bundle.
>
> But frankly I am not sure if karaf can do this.
>
>
>
>
>
> On Mon, May 2, 2016 at 9:40 PM, michael.esmann
> <ca...@gmail.com> wrote:
> > Hi,
> >
> > We are implementing an integration application using:
> >
> > - Camel 12.14.1
> > - Hawtio 1.4.56
> > - Karaf 3.0.5
> >
> > My question/problem is: We want the Hawtio web application to be
> accessed by
> > a specific unique URL/portnumber because the Hawtio application gives
> access
> > to some very basic functionalities about Camel/Karaf. But in our
> application
> > we must also implement some webservices using camel-cxf. We do not want
> > these weservices to use the same portnumber as the Hawtio application.
> >
> > So far I have tried some different configurations using the file
> > org.ops4j.pax.web.cfg and jetty.xml. Fx. like these entries in
> > org.ops4j.pax.web.cfg:
> >
> >    org.osgi.service.http.port=7979
> >    org.ops4j.pax.web.config.file=${karaf.home}/etc/jetty.xml
> >
> > The findings so far has been, that I must have the "cxf" portnumbers
> defined
> > in jetty.xml but then the Hawtio application will also be accessible on
> > these portnumber. And we don't want this. Any suggestions about how to
> avoid
> > this?
> >
> > /Michael
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Karaf-and-Hawtio-question-about-portnumbers-tp5782087.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: Camel, Karaf and Hawtio question about portnumbers

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can try asking on the karaf user forum / mailing list, how to
setup multiple port numbers for HTTP services.
Installing hawtio on karaf is installing it as a web bundle.

But frankly I am not sure if karaf can do this.





On Mon, May 2, 2016 at 9:40 PM, michael.esmann
<ca...@gmail.com> wrote:
> Hi,
>
> We are implementing an integration application using:
>
> - Camel 12.14.1
> - Hawtio 1.4.56
> - Karaf 3.0.5
>
> My question/problem is: We want the Hawtio web application to be accessed by
> a specific unique URL/portnumber because the Hawtio application gives access
> to some very basic functionalities about Camel/Karaf. But in our application
> we must also implement some webservices using camel-cxf. We do not want
> these weservices to use the same portnumber as the Hawtio application.
>
> So far I have tried some different configurations using the file
> org.ops4j.pax.web.cfg and jetty.xml. Fx. like these entries in
> org.ops4j.pax.web.cfg:
>
>    org.osgi.service.http.port=7979
>    org.ops4j.pax.web.config.file=${karaf.home}/etc/jetty.xml
>
> The findings so far has been, that I must have the "cxf" portnumbers defined
> in jetty.xml but then the Hawtio application will also be accessible on
> these portnumber. And we don't want this. Any suggestions about how to avoid
> this?
>
> /Michael
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Karaf-and-Hawtio-question-about-portnumbers-tp5782087.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2