camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Camel Netty component bind failure
Date Thu, 28 Aug 2014 02:33:19 GMT
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.


Mime
View raw message