You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jcmiles <mi...@condenast.com> on 2014/04/08 21:17:06 UTC

multiple jetty http endpoints generating error in logs

Hi,
this is an low priority issue, since my http endpoint is functional, but I'm
getting a LOT of exception messages.

Using a stock version of SMX 5.0, I am porting services over from Talend
ESB.  Running on OSX for development.

The first service just listens to a bunch of http endpoints and redirects to
other URLs.

The problem is that when I add more than one jetty:http endpoint, I get an
error in the log saying that SMX is trying to start up a Jetty server
listening to port 80, and that permission is denied. (cause I'm not running
as root understandably)

The problem is that all of my jetty:http endpoints have a port specified,
and none of them are using 80.

If I build the bundle with just one jetty:http endpoint, I do not get any
error messages.
As soon as I add more, the error messages begin.

The bundle is using Blueprint for configuration, and Camel in Java DSL to
create the routes.

Any ideas what is going on?

Route 1 alone gets no errors in logs.  Adding Route 2 generates the errors. 
And once the bundle is launched, only the http address for Route 1 works.
None of the others work.

Here's the error msg:
mix-5.0.0/deploy | AbstractLifeCycle                | ?                                  
? | 53 - org.eclipse.jetty.util - 7.6.9.v20130131 | FAILED
SelectChannelConnector@0.0.0.0:80: java.net.SocketException: Permission
denied


Here's a sample of the routes:

 /*********  ROUTE 1:  SPAPI1   ********/
from("jetty:http://0.0.0.0:8381/spapi1")
            .choice()
                .when(simple("${header.sessionID} != null"))
                    .setHeader(Exchange.HTTP_URI,
simple(SP_API1+";jsessionid=${header.sessionID}"))
                    .to("http://use.header.url")
                .otherwise()
                    .to(SP_API1+"?bridgeEndpoint=true");
        
        /*********  ROUTE 2:  SPAPI2   ********/
        from("jetty:http//0.0.0.0:8382/spapi2")
            .choice()
                .when(simple("${header.sessionID} != null"))
                    .setHeader(Exchange.HTTP_URI,
simple(SP_API2+";jsessionid=${header.sessionID}"))
                    .to("http://use.header.url")
                .otherwise()
                    .to(SP_API2+"?bridgeEndpoint=true");





--
View this message in context: http://servicemix.396122.n5.nabble.com/multiple-jetty-http-endpoints-generating-error-in-logs-tp5719922.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: multiple jetty http endpoints generating error in logs

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Hi

Could you please provide a small complete sample which reproduces this 
problem? I have just created some sample routes with many jetty:http 
endpoints and pasted them into the deploy directory. I can't find any 
errors. Could you please check the attached routes (install camel-jetty 
feature and paste the file into the deploy directory)

Best regards
Krzysztof

On 08.04.2014 21:17, jcmiles wrote:
> Hi,
> this is an low priority issue, since my http endpoint is functional, but I'm
> getting a LOT of exception messages.
>
> Using a stock version of SMX 5.0, I am porting services over from Talend
> ESB.  Running on OSX for development.
>
> The first service just listens to a bunch of http endpoints and redirects to
> other URLs.
>
> The problem is that when I add more than one jetty:http endpoint, I get an
> error in the log saying that SMX is trying to start up a Jetty server
> listening to port 80, and that permission is denied. (cause I'm not running
> as root understandably)
>
> The problem is that all of my jetty:http endpoints have a port specified,
> and none of them are using 80.
>
> If I build the bundle with just one jetty:http endpoint, I do not get any
> error messages.
> As soon as I add more, the error messages begin.
>
> The bundle is using Blueprint for configuration, and Camel in Java DSL to
> create the routes.
>
> Any ideas what is going on?
>
> Route 1 alone gets no errors in logs.  Adding Route 2 generates the errors.
> And once the bundle is launched, only the http address for Route 1 works.
> None of the others work.
>
> Here's the error msg:
> mix-5.0.0/deploy | AbstractLifeCycle                | ?
> ? | 53 - org.eclipse.jetty.util - 7.6.9.v20130131 | FAILED
> SelectChannelConnector@0.0.0.0:80: java.net.SocketException: Permission
> denied
>
>
> Here's a sample of the routes:
>
>   /*********  ROUTE 1:  SPAPI1   ********/
> from("jetty:http://0.0.0.0:8381/spapi1")
>              .choice()
>                  .when(simple("${header.sessionID} != null"))
>                      .setHeader(Exchange.HTTP_URI,
> simple(SP_API1+";jsessionid=${header.sessionID}"))
>                      .to("http://use.header.url")
>                  .otherwise()
>                      .to(SP_API1+"?bridgeEndpoint=true");
>          
>          /*********  ROUTE 2:  SPAPI2   ********/
>          from("jetty:http//0.0.0.0:8382/spapi2")
>              .choice()
>                  .when(simple("${header.sessionID} != null"))
>                      .setHeader(Exchange.HTTP_URI,
> simple(SP_API2+";jsessionid=${header.sessionID}"))
>                      .to("http://use.header.url")
>                  .otherwise()
>                      .to(SP_API2+"?bridgeEndpoint=true");
>
>
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/multiple-jetty-http-endpoints-generating-error-in-logs-tp5719922.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
Krzysztof Sobkowiak

JEE & OSS Architect | Technical Architect @ Capgemini
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center 
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> | 
Twitter: @KSobkowiak