You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Edmondo Porcu <ed...@gmail.com> on 2014/08/26 11:27:48 UTC

Camel Netty component bind failure

Hello,

I am trying to use a tcp endpoint with camel netty. I need to establish a
two way route from a vert.x event bus to a remote server and viceversa.

Unluckily my vert.x uses Netty as well so when my netty producer is started
I get a low level Java exception: impossible to bind address:bind.

I suspect it is because my vertx local instance is using the same port as
netty. How can I change the local port a netty producer binds to?

Thanks

Edmondo

Re: Camel Netty component bind failure

Posted by Willem Jiang <wi...@gmail.com>.
It’s not make sense to start a TCP connection and send to web server without a validate HTTP request. You may consider to use netty-http[1] component to send that kind of request. 

[1]http://camel.apache.org/netty-http

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On August 28, 2014 at 4:31:53 AM, edmondo1984 (edmondo.porcu@gmail.com) wrote:
> Thanks, how stupid. Now that I am trying a tcp connection on port 80, I get
> the following:
>  
> 2014-08-27 21:26:41,968 [el Thread #1 - NettyClientTCPWorker] ERROR
> DefaultErrorHandler - Failed delivery for (MessageId:
> ID-mbp-di-edmondo-54810-1409171153699-0-1 on ExchangeId:
> ID-mbp-di-edmondo-54810-1409171153699-0-2). Exhausted after delivery
> attempt: 1 caught: org.apache.camel.CamelExchangeException: No response
> received from remote server: www.google.com:80. Exchange[Message: GET
> index.htm]
>  
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------  
> RouteId ProcessorId Processor
> Elapsed (ms)
> [route1 ] [route1 ] [direct://testEndPoint
> ] [ 44118]
> [route1 ] [to1 ] [netty:tcp://
> www.google.com:80?requestTimeout=1000 ] [
> 44113]
>  
> Exchange
> ---------------------------------------------------------------------------------------------------------------------------------------  
> Exchange[
> Id ID-mbp-di-edmondo-54810-1409171153699-0-2
> ExchangePattern InOnly
> Headers
> {breadcrumbId=ID-mbp-di-edmondo-54810-1409171153699-0-1,
> CamelRedelivered=false, CamelRedeliveryCounter=0}
> BodyType String
> Body GET index.htm
> ]
>  
> Stacktrace
> ---------------------------------------------------------------------------------------------------------------------------------------  
> org.apache.camel.CamelExchangeException: No response received from remote
> server: www.google.com:80. Exchange[Message: GET index.htm]
> at
> org.apache.camel.component.netty.handlers.ClientChannelHandler.channelClosed(ClientChannelHandler.java:118)  
> at
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:88)  
> at
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> at org.jboss
>  
> Can you please advice? I tried to connect through telnet on port 80 and
> perform a GET index.htm on my mac and worked
>  
> thank you
>  
>  
>  
>  
>  
> 2014-08-27 9:23 GMT+01:00 Willem.Jiang [via Camel] <
> ml-node+s465427n5755760h63@n5.nabble.com>:
>  
> > You used different direct endpoint name.
> > The first one is “direct:testEndpoint” and the second one is
> > “direct:testEndPoint”.
> > You should use the same direct endpoint name here.
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com (English)
> > http://jnn.iteye.com (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
> > On August 27, 2014 at 2:56:58 PM, edmondo1984 ([hidden email]
> > ) wrote:
> >
> > > I am extending the BaseNettyTest. I forked the git repo and checked out
> > the
> > > 2.13.2 tag
> > >
> > > public class NettyCustomLocalPortProducerTest extends BaseNettyTest {
> > >
> > > @Test
> > > public void routeFails() throws Exception{
> > > template.sendBody("direct:testEndpoint", "Hello world");
> > > }
> > >
> > > protected RouteBuilder createRouteBuilder() {
> > > return new RouteBuilder() {
> > > public void configure() {
> > >
> > > from("direct:testEndPoint").to("netty:tcp://
> > > www.google.com:80");
> > >
> > > }
> > > };
> > > }
> > > }
> > >
> > > Hopefully once I will be able to run this I can contribute myself with
> > the
> > > fix to use a different port :))
> > >
> > > Best
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755751.html  
> >
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755760.html  
> > To unsubscribe from Camel Netty component bind failure, click here
> >  
> > .
> > NAML
> >  
> >
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755791.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Netty component bind failure

Posted by edmondo1984 <ed...@gmail.com>.
Thanks, how stupid. Now that I am trying a tcp connection on port 80, I get
the following:

2014-08-27 21:26:41,968 [el Thread #1 - NettyClientTCPWorker] ERROR
DefaultErrorHandler            - Failed delivery for (MessageId:
ID-mbp-di-edmondo-54810-1409171153699-0-1 on ExchangeId:
ID-mbp-di-edmondo-54810-1409171153699-0-2). Exhausted after delivery
attempt: 1 caught: org.apache.camel.CamelExchangeException: No response
received from remote server: www.google.com:80. Exchange[Message: GET
index.htm]

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor
                                               Elapsed (ms)
[route1            ] [route1            ] [direct://testEndPoint
                                              ] [     44118]
[route1            ] [to1               ] [netty:tcp://
www.google.com:80?requestTimeout=1000                             ] [
44113]

Exchange
---------------------------------------------------------------------------------------------------------------------------------------
Exchange[
Id                  ID-mbp-di-edmondo-54810-1409171153699-0-2
ExchangePattern     InOnly
Headers
{breadcrumbId=ID-mbp-di-edmondo-54810-1409171153699-0-1,
CamelRedelivered=false, CamelRedeliveryCounter=0}
BodyType            String
Body                GET index.htm
]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.CamelExchangeException: No response received from remote
server: www.google.com:80. Exchange[Message: GET index.htm]
at
org.apache.camel.component.netty.handlers.ClientChannelHandler.channelClosed(ClientChannelHandler.java:118)
at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:88)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss

Can you please advice? I tried to connect through telnet on port 80 and
perform a GET index.htm on my mac and worked

thank you





2014-08-27 9:23 GMT+01:00 Willem.Jiang [via Camel] <
ml-node+s465427n5755760h63@n5.nabble.com>:

> You used different direct endpoint name.
> The first one is “direct:testEndpoint” and the second one is
> “direct:testEndPoint”.
> You should use the same direct endpoint name here.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On August 27, 2014 at 2:56:58 PM, edmondo1984 ([hidden email]
> <http://user/SendEmail.jtp?type=node&node=5755760&i=0>) wrote:
>
> > I am extending the BaseNettyTest. I forked the git repo and checked out
> the
> > 2.13.2 tag
> >
> > public class NettyCustomLocalPortProducerTest extends BaseNettyTest {
> >
> > @Test
> > public void routeFails() throws Exception{
> > template.sendBody("direct:testEndpoint", "Hello world");
> > }
> >
> > protected RouteBuilder createRouteBuilder() {
> > return new RouteBuilder() {
> > public void configure() {
> >
> > from("direct:testEndPoint").to("netty:tcp://
> > www.google.com:80");
> >
> > }
> > };
> > }
> > }
> >
> > Hopefully once I will be able to run this I can contribute myself with
> the
> > fix to use a different port :))
> >
> > Best
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755751.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755760.html
>  To unsubscribe from Camel Netty component bind failure, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5755683&code=ZWRtb25kby5wb3JjdUBnbWFpbC5jb218NTc1NTY4M3w1ODk2MDQ2MzY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755791.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Netty component bind failure

Posted by Willem Jiang <wi...@gmail.com>.
You used different direct endpoint name.
The first one is “direct:testEndpoint” and the second one is “direct:testEndPoint”.
You should use the same direct endpoint name here. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On August 27, 2014 at 2:56:58 PM, edmondo1984 (edmondo.porcu@gmail.com) wrote:
> I am extending the BaseNettyTest. I forked the git repo and checked out the
> 2.13.2 tag
>  
> public class NettyCustomLocalPortProducerTest extends BaseNettyTest {
>  
> @Test
> public void routeFails() throws Exception{
> template.sendBody("direct:testEndpoint", "Hello world");
> }
>  
> protected RouteBuilder createRouteBuilder() {
> return new RouteBuilder() {
> public void configure() {
>  
> from("direct:testEndPoint").to("netty:tcp://
> www.google.com:80");
>  
> }
> };
> }
> }
>  
> Hopefully once I will be able to run this I can contribute myself with the
> fix to use a different port :))
>  
> Best
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755751.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Netty component bind failure

Posted by edmondo1984 <ed...@gmail.com>.
I am extending the BaseNettyTest. I forked the git repo and checked out the
2.13.2 tag

public class NettyCustomLocalPortProducerTest extends BaseNettyTest {

    @Test
    public void routeFails() throws Exception{
        template.sendBody("direct:testEndpoint", "Hello world");
    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {

                from("direct:testEndPoint").to("netty:tcp://
www.google.com:80");

            }
        };
    }
}

Hopefully once I will be able to run this I can contribute myself with the
fix to use a different port :))

Best




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755751.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Netty component bind failure

Posted by Willem Jiang <wi...@gmail.com>.
It looks like you send the message to the “direct:testEndpoint” before route builder is loaded.
Did your test class extends the CamelTestSupport?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On August 27, 2014 at 3:54:46 AM, edmondo1984 (edmondo.porcu@gmail.com) wrote:
> There might also be a wrong usage. The following code fails
>  
> @Test
> public void routeFails() throws Exception{
> =
>  
> template.sendBody("direct:testEndpoint", "Hello world");
>  
> }
>  
> protected RouteBuilder createRouteBuilder() {
> return new RouteBuilder() {
> public void configure() {
>  
> from("direct:testEndPoint").to("netty:tcp://
> www.google.com:80");
>  
> //from("netty:tcp://www.google.com:80").transform(body().regexReplaceAll("Hello",  
> "Bye"));
> }
> };
> }
>  
> Where am I wrong in the usage of the camel component?
>  
> at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)  
> Caused by:
> org.apache.camel.component.direct.DirectConsumerNotAvailableException: No  
> consumers available on endpoint: Endpoint[direct://testEndpoint].
> Exchange[Message: Hello world]
> at org.apache.camel.component.direct.DirectProducer.process(DirectProd
>  
>  
>  
> Thank you for your help
>  
> Edmondo
>  
>  
> 2014-08-26 13:28 GMT+01:00 Willem.Jiang [via Camel] <
> ml-node+s465427n5755699h72@n5.nabble.com>:
>  
> > No, you cannot specify the local port when sending the request to server.
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com (English)
> > http://jnn.iteye.com (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
> > On August 26, 2014 at 6:25:38 PM, edmondo1984 ([hidden email]
> > ) wrote:
> >
> > > I probably misexplained myself.
> > >
> > > I am connecting to a remote url:
> > >
> > > to ("netty:tcp://oneserver:129")
> > >
> > > This fails because the local port netty is using for the tcp connection
> > is
> > > already taken.
> > >
> > > I would need to tell netty: create a tcp connection from localhost:24563
> > to
> > > oneserver:129 for example
> > >
> > > Thank you
> > > Il 26/Ago/2014 11:17 "Claus Ibsen-2 [via Camel]" <
> > > [hidden email] >
> > ha scritto:
> > >
> > > > You set the port as part of the uri of the endpoint, etc
> > > >
> > > > netty:tcp://localhost:99999[?options]
> > > >
> > > > On Tue, Aug 26, 2014 at 12:14 PM, edmondo1984 <[hidden email]
> > > > > wrote:
> > > > > Thanks. I have read the documentation before posting and I didn't
> > find
> > > > it :(
> > > > > I suppose I am missing maybe some Netty know how?
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > >
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html  
> >
> > > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> > > > --
> > > > Claus Ibsen
> > > > -----------------
> > > > Red Hat, Inc.
> > > > Email: [hidden email]
> > > >
> > > > Twitter: davsclaus
> > > > Blog: http://davsclaus.com
> > > > Author of Camel in Action: http://www.manning.com/ibsen
> > > > hawtio: http://hawt.io/
> > > > fabric8: http://fabric8.io/
> > > >
> > > >
> > > > ------------------------------
> > > > If you reply to this email, your message will be added to the
> > discussion
> > > > below:
> > > >
> > > >
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755689.html  
> >
> > > > To unsubscribe from Camel Netty component bind failure, click here
> > > >
> > > > .
> > > > NAML
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755691.html  
> >
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755699.html  
> > To unsubscribe from Camel Netty component bind failure, click here
> >  
> > .
> > NAML
> >  
> >
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755728.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Netty component bind failure

Posted by edmondo1984 <ed...@gmail.com>.
There might also be a wrong usage. The following code fails

  @Test
    public void routeFails() throws Exception{
=

        template.sendBody("direct:testEndpoint", "Hello world");

    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {

                from("direct:testEndPoint").to("netty:tcp://
www.google.com:80");

//from("netty:tcp://www.google.com:80").transform(body().regexReplaceAll("Hello",
"Bye"));
            }
        };
    }

Where am I wrong in the usage of the camel component?

at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
Caused by:
org.apache.camel.component.direct.DirectConsumerNotAvailableException: No
consumers available on endpoint: Endpoint[direct://testEndpoint].
Exchange[Message: Hello world]
at org.apache.camel.component.direct.DirectProducer.process(DirectProd



Thank you for your help

Edmondo


2014-08-26 13:28 GMT+01:00 Willem.Jiang [via Camel] <
ml-node+s465427n5755699h72@n5.nabble.com>:

> No, you cannot specify the local port when sending the request to server.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On August 26, 2014 at 6:25:38 PM, edmondo1984 ([hidden email]
> <http://user/SendEmail.jtp?type=node&node=5755699&i=0>) wrote:
>
> > I probably misexplained myself.
> >
> > I am connecting to a remote url:
> >
> > to ("netty:tcp://oneserver:129")
> >
> > This fails because the local port netty is using for the tcp connection
> is
> > already taken.
> >
> > I would need to tell netty: create a tcp connection from localhost:24563
> to
> > oneserver:129 for example
> >
> > Thank you
> > Il 26/Ago/2014 11:17 "Claus Ibsen-2 [via Camel]" <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5755699&i=1>>
> ha scritto:
> >
> > > You set the port as part of the uri of the endpoint, etc
> > >
> > > netty:tcp://localhost:99999[?options]
> > >
> > > On Tue, Aug 26, 2014 at 12:14 PM, edmondo1984 <[hidden email]
> > > > wrote:
> > > > Thanks. I have read the documentation before posting and I didn't
> find
> > > it :(
> > > > I suppose I am missing maybe some Netty know how?
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > >
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html
>
> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > Red Hat, Inc.
> > > Email: [hidden email]
> > >
> > > Twitter: davsclaus
> > > Blog: http://davsclaus.com
> > > Author of Camel in Action: http://www.manning.com/ibsen
> > > hawtio: http://hawt.io/
> > > fabric8: http://fabric8.io/
> > >
> > >
> > > ------------------------------
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755689.html
>
> > > To unsubscribe from Camel Netty component bind failure, click here
> > >
> > > .
> > > NAML
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755691.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755699.html
>  To unsubscribe from Camel Netty component bind failure, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5755683&code=ZWRtb25kby5wb3JjdUBnbWFpbC5jb218NTc1NTY4M3w1ODk2MDQ2MzY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755728.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Netty component bind failure

Posted by edmondo1984 <ed...@gmail.com>.
This means I cannot use camel-netty inside a vertx webapp... as they will
try to bind the same local port :(

What could I do?
Il 26/Ago/2014 13:28 "Willem.Jiang [via Camel]" <
ml-node+s465427n5755699h72@n5.nabble.com> ha scritto:

> No, you cannot specify the local port when sending the request to server.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On August 26, 2014 at 6:25:38 PM, edmondo1984 ([hidden email]
> <http://user/SendEmail.jtp?type=node&node=5755699&i=0>) wrote:
>
> > I probably misexplained myself.
> >
> > I am connecting to a remote url:
> >
> > to ("netty:tcp://oneserver:129")
> >
> > This fails because the local port netty is using for the tcp connection
> is
> > already taken.
> >
> > I would need to tell netty: create a tcp connection from localhost:24563
> to
> > oneserver:129 for example
> >
> > Thank you
> > Il 26/Ago/2014 11:17 "Claus Ibsen-2 [via Camel]" <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5755699&i=1>>
> ha scritto:
> >
> > > You set the port as part of the uri of the endpoint, etc
> > >
> > > netty:tcp://localhost:99999[?options]
> > >
> > > On Tue, Aug 26, 2014 at 12:14 PM, edmondo1984 <[hidden email]
> > > > wrote:
> > > > Thanks. I have read the documentation before posting and I didn't
> find
> > > it :(
> > > > I suppose I am missing maybe some Netty know how?
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > >
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html
>
> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > Red Hat, Inc.
> > > Email: [hidden email]
> > >
> > > Twitter: davsclaus
> > > Blog: http://davsclaus.com
> > > Author of Camel in Action: http://www.manning.com/ibsen
> > > hawtio: http://hawt.io/
> > > fabric8: http://fabric8.io/
> > >
> > >
> > > ------------------------------
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755689.html
>
> > > To unsubscribe from Camel Netty component bind failure, click here
> > >
> > > .
> > > NAML
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755691.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755699.html
>  To unsubscribe from Camel Netty component bind failure, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5755683&code=ZWRtb25kby5wb3JjdUBnbWFpbC5jb218NTc1NTY4M3w1ODk2MDQ2MzY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755702.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Netty component bind failure

Posted by Willem Jiang <wi...@gmail.com>.
No, you cannot specify the local port when sending the request to server.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On August 26, 2014 at 6:25:38 PM, edmondo1984 (edmondo.porcu@gmail.com) wrote:
> I probably misexplained myself.
>  
> I am connecting to a remote url:
>  
> to ("netty:tcp://oneserver:129")
>  
> This fails because the local port netty is using for the tcp connection is
> already taken.
>  
> I would need to tell netty: create a tcp connection from localhost:24563 to
> oneserver:129 for example
>  
> Thank you
> Il 26/Ago/2014 11:17 "Claus Ibsen-2 [via Camel]" <
> ml-node+s465427n5755689h62@n5.nabble.com> ha scritto:
>  
> > You set the port as part of the uri of the endpoint, etc
> >
> > netty:tcp://localhost:99999[?options]
> >
> > On Tue, Aug 26, 2014 at 12:14 PM, edmondo1984 <[hidden email]
> > > wrote:
> > > Thanks. I have read the documentation before posting and I didn't find
> > it :(
> > > I suppose I am missing maybe some Netty know how?
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html  
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > Email: [hidden email]
> >  
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> > hawtio: http://hawt.io/
> > fabric8: http://fabric8.io/
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> > http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755689.html  
> > To unsubscribe from Camel Netty component bind failure, click here
> >  
> > .
> > NAML
> >  
> >
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755691.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Netty component bind failure

Posted by edmondo1984 <ed...@gmail.com>.
I probably misexplained myself.

I am connecting to a remote url:

to ("netty:tcp://oneserver:129")

This fails because the local port netty is using for the tcp connection is
already taken.

I would need to tell netty: create a tcp connection from localhost:24563 to
oneserver:129 for example

Thank you
Il 26/Ago/2014 11:17 "Claus Ibsen-2 [via Camel]" <
ml-node+s465427n5755689h62@n5.nabble.com> ha scritto:

> You set the port as part of the uri of the endpoint, etc
>
> netty:tcp://localhost:99999[?options]
>
> On Tue, Aug 26, 2014 at 12:14 PM, edmondo1984 <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=5755689&i=0>> wrote:
> > Thanks.  I have read the documentation before posting and I didn't find
> it :(
> > I suppose I am missing maybe some Netty know how?
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]
> <http://user/SendEmail.jtp?type=node&node=5755689&i=1>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755689.html
>  To unsubscribe from Camel Netty component bind failure, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5755683&code=ZWRtb25kby5wb3JjdUBnbWFpbC5jb218NTc1NTY4M3w1ODk2MDQ2MzY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755691.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Netty component bind failure

Posted by Claus Ibsen <cl...@gmail.com>.
You set the port as part of the uri of the endpoint, etc

netty:tcp://localhost:99999[?options]

On Tue, Aug 26, 2014 at 12:14 PM, edmondo1984 <ed...@gmail.com> wrote:
> Thanks.  I have read the documentation before posting and I didn't find it :(
> I suppose I am missing maybe some Netty know how?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Camel Netty component bind failure

Posted by edmondo1984 <ed...@gmail.com>.
Thanks.  I have read the documentation before posting and I didn't find it :(
I suppose I am missing maybe some Netty know how? 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-component-bind-failure-tp5755683p5755688.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Netty component bind failure

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

Its in the documentation
http://camel.apache.org/netty

On Tue, Aug 26, 2014 at 11:27 AM, Edmondo Porcu <ed...@gmail.com> wrote:
> Hello,
>
> I am trying to use a tcp endpoint with camel netty. I need to establish a
> two way route from a vert.x event bus to a remote server and viceversa.
>
> Unluckily my vert.x uses Netty as well so when my netty producer is started
> I get a low level Java exception: impossible to bind address:bind.
>
> I suspect it is because my vertx local instance is using the same port as
> netty. How can I change the local port a netty producer binds to?
>
> Thanks
>
> Edmondo



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/