camel exception - netty

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

camel exception - netty

kiranreddykasa
Hi

While using camel-netty we have noticed that when remote sever is down netty component is throwing
org.apache.camel.CamelException.

It should be throwing java.net.ConnectException  right??

So that it will be easy for error handling.
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel exception - netty

Claus Ibsen-2
What version of Camel do you use?

And can you show the stacktrace.


On Tue, Nov 5, 2013 at 12:41 PM, kiranreddykasa <[hidden email]> wrote:

> Hi
>
> While using camel-netty we have noticed that when remote sever is down netty
> component is throwing
> org.apache.camel.CamelException.
>
> It should be throwing java.net.ConnectException  right??
>
> So that it will be easy for error handling.
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-exception-netty-tp5742647.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
Reply | Threaded
Open this post in threaded view
|

Re: camel exception - netty

kiranreddykasa
camel version : 2.12.1

Stacktrace :
INFO 08 Nov 2013 15:20:08,767 org.apache.camel.main.MainSupport - Apache Camel 2.12.1 starting
INFO 08 Nov 2013 15:20:09,001 org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.12.1 (CamelContext: camel-1) is starting
INFO 08 Nov 2013 15:20:09,001 org.apache.camel.management.ManagedManagementStrategy - JMX is enabled
INFO 08 Nov 2013 15:20:09,157 org.apache.camel.impl.converter.DefaultTypeConverter - Loaded 186 type converters
WARN 08 Nov 2013 15:20:09,251 org.apache.camel.component.netty.NettyConfiguration - The decoder org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder@84cc09 is not @Shareable or an ChannelHandlerFactory instance. The decoder cannot safely be used.
WARN 08 Nov 2013 15:20:09,282 org.apache.camel.component.netty.NettyConfiguration - The decoder org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder@84cc09 is not @Shareable or an ChannelHandlerFactory instance. The decoder cannot safely be used.
INFO 08 Nov 2013 15:20:09,282 org.apache.camel.impl.DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
INFO 08 Nov 2013 15:20:09,423 org.apache.camel.component.netty.SingleTCPNettyServerBootstrapFactory - ServerBootstrap binding to 0.0.0.0:7002
INFO 08 Nov 2013 15:20:09,438 org.apache.camel.component.netty.NettyConsumer - Netty consumer bound to: 0.0.0.0:7002
INFO 08 Nov 2013 15:20:09,438 org.apache.camel.impl.DefaultCamelContext - Route: route1 started and consuming from: Endpoint[tcp://0.0.0.0:7002]
INFO 08 Nov 2013 15:20:09,454 org.apache.camel.component.netty.SingleTCPNettyServerBootstrapFactory - ServerBootstrap binding to 0.0.0.0:7000
INFO 08 Nov 2013 15:20:09,454 org.apache.camel.component.netty.NettyConsumer - Netty consumer bound to: 0.0.0.0:7000
INFO 08 Nov 2013 15:20:09,454 org.apache.camel.impl.DefaultCamelContext - Route: route2 started and consuming from: Endpoint[tcp://0.0.0.0:7000]
INFO 08 Nov 2013 15:20:09,454 org.apache.camel.impl.DefaultCamelContext - Total 2 routes, of which 2 is started.
INFO 08 Nov 2013 15:20:09,454 org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.12.1 (CamelContext: camel-1) started in 0.453 seconds
INFO 08 Nov 2013 15:20:24,856 com.fss.bobmhi.transformers.RequestTransformer - Received clientRequest :0200CH00001024153900100001244029850900002020=18081260012
INFO 08 Nov 2013 15:20:25,434 com.fss.bobmhi.transformers.RequestTransformer - Generated clientRequest :ISO0160000500200F2388001A8E180180000000010000008164029850900002020CH0000000000000000102415390010000115202511081108115680250420306568025244029850900002020=1808126000017100001BOBCMSHOTLISTING000000000000000BANK OF BARODA        MUMBAI       MH IN044A                       40000035600000000000356012CMS TES1+000013CMS TES11100P11568025042030012
INFO 08 Nov 2013 15:20:35,462 com.fss.bobmhi.core.HostDownResponseProcessor - Received message at  HostDownResponseProcessor: 0200CH00001024153900100001244029850900002020=18081260012 and exception is
org.apache.camel.CamelException: Cannot connect to 172.16.7.11:8030
        at org.apache.camel.component.netty.NettyProducer.openChannel(NettyProducer.java:436)
        at org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:504)
        at org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:499)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
        at org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:215)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:136)
        at org.apache.camel.component.netty.handlers.ServerChannelHandler.messageReceived(ServerChannelHandler.java:108)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
 
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel exception - netty

Claus Ibsen-2
Hi

Yeah we can change that exception to connect exception.
https://issues.apache.org/jira/browse/CAMEL-6946

On Fri, Nov 8, 2013 at 10:52 AM, kiranreddykasa <[hidden email]> wrote:

> camel version : 2.12.1
>
> Stacktrace :
> INFO 08 Nov 2013 15:20:08,767 org.apache.camel.main.MainSupport - Apache
> Camel 2.12.1 starting
> INFO 08 Nov 2013 15:20:09,001 org.apache.camel.impl.DefaultCamelContext -
> Apache Camel 2.12.1 (CamelContext: camel-1) is starting
> INFO 08 Nov 2013 15:20:09,001
> org.apache.camel.management.ManagedManagementStrategy - JMX is enabled
> INFO 08 Nov 2013 15:20:09,157
> org.apache.camel.impl.converter.DefaultTypeConverter - Loaded 186 type
> converters
> WARN 08 Nov 2013 15:20:09,251
> org.apache.camel.component.netty.NettyConfiguration - The decoder
> org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder@84cc09 is
> not @Shareable or an ChannelHandlerFactory instance. The decoder cannot
> safely be used.
> WARN 08 Nov 2013 15:20:09,282
> org.apache.camel.component.netty.NettyConfiguration - The decoder
> org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder@84cc09 is
> not @Shareable or an ChannelHandlerFactory instance. The decoder cannot
> safely be used.
> INFO 08 Nov 2013 15:20:09,282 org.apache.camel.impl.DefaultCamelContext -
> StreamCaching is not in use. If using streams then its recommended to enable
> stream caching. See more details at
> http://camel.apache.org/stream-caching.html
> INFO 08 Nov 2013 15:20:09,423
> org.apache.camel.component.netty.SingleTCPNettyServerBootstrapFactory -
> ServerBootstrap binding to 0.0.0.0:7002
> INFO 08 Nov 2013 15:20:09,438 org.apache.camel.component.netty.NettyConsumer
> - Netty consumer bound to: 0.0.0.0:7002
> INFO 08 Nov 2013 15:20:09,438 org.apache.camel.impl.DefaultCamelContext -
> Route: route1 started and consuming from: Endpoint[tcp://0.0.0.0:7002]
> INFO 08 Nov 2013 15:20:09,454
> org.apache.camel.component.netty.SingleTCPNettyServerBootstrapFactory -
> ServerBootstrap binding to 0.0.0.0:7000
> INFO 08 Nov 2013 15:20:09,454 org.apache.camel.component.netty.NettyConsumer
> - Netty consumer bound to: 0.0.0.0:7000
> INFO 08 Nov 2013 15:20:09,454 org.apache.camel.impl.DefaultCamelContext -
> Route: route2 started and consuming from: Endpoint[tcp://0.0.0.0:7000]
> INFO 08 Nov 2013 15:20:09,454 org.apache.camel.impl.DefaultCamelContext -
> Total 2 routes, of which 2 is started.
> INFO 08 Nov 2013 15:20:09,454 org.apache.camel.impl.DefaultCamelContext -
> Apache Camel 2.12.1 (CamelContext: camel-1) started in 0.453 seconds
> INFO 08 Nov 2013 15:20:24,856 com.fss.bobmhi.transformers.RequestTransformer
> - Received clientRequest
> :0200CH00001024153900100001244029850900002020=18081260012
> INFO 08 Nov 2013 15:20:25,434 com.fss.bobmhi.transformers.RequestTransformer
> - Generated clientRequest
> :ISO0160000500200F2388001A8E180180000000010000008164029850900002020CH0000000000000000102415390010000115202511081108115680250420306568025244029850900002020=1808126000017100001BOBCMSHOTLISTING000000000000000BANK
> OF BARODA        MUMBAI       MH IN044A
> 40000035600000000000356012CMS TES1+000013CMS TES11100P11568025042030012
> INFO 08 Nov 2013 15:20:35,462 com.fss.bobmhi.core.HostDownResponseProcessor
> - Received message at  HostDownResponseProcessor:
> 0200CH00001024153900100001244029850900002020=18081260012 and exception is
> org.apache.camel.CamelException: Cannot connect to 172.16.7.11:8030
>         at
> org.apache.camel.component.netty.NettyProducer.openChannel(NettyProducer.java:436)
>         at
> org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:504)
>         at
> org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:499)
>         at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
>         at
> org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:215)
>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
>         at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>         at
> org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:136)
>         at
> org.apache.camel.component.netty.handlers.ServerChannelHandler.messageReceived(ServerChannelHandler.java:108)
>         at
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>         at
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>         at
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>         at
> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
>         at
> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
>         at
> org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
>
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-exception-netty-tp5742647p5742823.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
Reply | Threaded
Open this post in threaded view
|

Re: camel exception - netty

kiranreddykasa
Thanks
Regards

kiran Reddy