Re: camel-netty: How to set the netty closeChannelTimeMillis option?

2015-10-11 Thread Willem Jiang
>   
>  
> java.nio.channels.ClosedChannelException
> at
> org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:433)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.socket.nio.NioDatagramWorker.writeFromUserCode(NioDatagramWorker.java:212)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.eventSunk(NioDatagramPipelineSink.java:97)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)
>   
> ~[netty-3.9.6.Final.jar:?]
> at org.jboss.netty.channel.Channels.write(Channels.java:725)
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
>   
> ~[netty-3.9.6.Final.jar:?]
> at org.jboss.netty.channel.Channels.write(Channels.java:704)
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:252)  
> ~[netty-3.9.6.Final.jar:?]
> at
> org.jboss.netty.channel.socket.nio.NioDatagramChannel.write(NioDatagramChannel.java:299)
>   
> ~[netty-3.9.6.Final.jar:?]
> at
> org.apache.camel.component.netty.NettyHelper.writeBodyAsync(NettyHelper.java:93)
>   
> [camel-netty-2.15.2.jar:2.15.2]
> at
> org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:263)
>   
> [camel-netty-2.15.2.jar:2.15.2]
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
>   
> [camel-core-2.15.2.jar:2.15.2]
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> [camel-core-2.15.2.jar:2.15.2]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
>   
> [camel-core-2.15.2.jar:2.15.2]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
>   
> [camel-core-2.15.2.jar:2.15.2]
> at
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:119) 
>  
> [camel-core-2.15.2.jar:2.15.2]
> at
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:113) 
>  
> [camel-core-2.15.2.jar:2.15.2]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_75]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   
> [?:1.7.0_75]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   
> [?:1.7.0_75]
> at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]
>  
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-netty-How-to-set-the-netty-closeChannelTimeMillis-option-tp5772342p5772394.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: camel-netty: How to set the netty closeChannelTimeMillis option?

2015-10-07 Thread SteveR
ec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71)
~[netty-3.9.6.Final.jar:?]
at
org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
~[netty-3.9.6.Final.jar:?]
at
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
~[netty-3.9.6.Final.jar:?]
at
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
~[netty-3.9.6.Final.jar:?]
at 
org.jboss.netty.channel.Channels.write(Channels.java:704)
~[netty-3.9.6.Final.jar:?]
at
org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:252)
~[netty-3.9.6.Final.jar:?]
at
org.jboss.netty.channel.socket.nio.NioDatagramChannel.write(NioDatagramChannel.java:299)
~[netty-3.9.6.Final.jar:?]
at
org.apache.camel.component.netty.NettyHelper.writeBodyAsync(NettyHelper.java:93)
[camel-netty-2.15.2.jar:2.15.2]
at
org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:263)
[camel-netty-2.15.2.jar:2.15.2]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
[camel-core-2.15.2.jar:2.15.2]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.15.2.jar:2.15.2]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
[camel-core-2.15.2.jar:2.15.2]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
[camel-core-2.15.2.jar:2.15.2]
at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:119)
[camel-core-2.15.2.jar:2.15.2]
at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:113)
[camel-core-2.15.2.jar:2.15.2]
at 
java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_75]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[?:1.7.0_75]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[?:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]






--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-netty-How-to-set-the-netty-closeChannelTimeMillis-option-tp5772342p5772394.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-netty: How to set the netty closeChannelTimeMillis option?

2015-10-07 Thread Willem Jiang
Hi,

We use an object pool (from apache common pool) to cache the open channel to 
save the connection time. As we don’t have the ChannelPool like the linked 
norbert, so we don’t have the closeChannelTimeMillis option.
For you case it looks the cached the channel was closed when it is still send 
message.
As the camel-netty always checks the channel object before borrowing it from 
the object pool, it could cause some trouble if you are using the 
UdpConnectionlessSending[1].

Can you check if you are using the UdpConnectionlessSending in your case.

[1]https://github.com/apache/camel/blob/master/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java#L571
--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On October 6, 2015 at 11:44:34 PM, SteveR (srichard...@vonage.com) wrote:
> On further investigation, I see that the *closeChannelTimeMillis* option is
> not a *netty *option, but rather an option for
> com.linkedin.norbert.javacompat.network.NetworkClientConfig
>  
> .
>  
> The Norbert ChannelPool closing channels prematurely
> JIRA issue is still in the
> unresolved state.
>  
> We are are facing a similar issue in production (with very similar stack
> traces for Norbert scenarios 2 and 3, as shown in the JIRA issue) and were
> hoping for a resolution to this similar issue.
>  
> Any thoughts on this are appreciated.
>  
> Thanks, SteveR
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-netty-How-to-set-the-netty-closeChannelTimeMillis-option-tp5772342p5772347.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: camel-netty: How to set the netty closeChannelTimeMillis option?

2015-10-06 Thread SteveR
On further investigation, I see that the *closeChannelTimeMillis* option is
not a *netty *option, but rather an option for 
com.linkedin.norbert.javacompat.network.NetworkClientConfig
<http://grepcode.com/file/repo1.maven.org/maven2/com.linkedin/norbert_2.8.1/0.6.33/com/linkedin/norbert/javacompat/network/NetworkClientConfig.java>
 
.

The  Norbert ChannelPool closing channels prematurely
<https://linkedin.jira.com/browse/NOR-19>   JIRA issue is still in the
unresolved state.

We are are facing a similar issue in production (with very similar stack
traces for Norbert scenarios 2 and 3, as shown in the JIRA issue) and were
hoping for a resolution to this similar issue.

Any thoughts on this are appreciated.

  Thanks, SteveR



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-netty-How-to-set-the-netty-closeChannelTimeMillis-option-tp5772342p5772347.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel-netty: How to set the netty closeChannelTimeMillis option?

2015-10-06 Thread SteveR
I have a stand-alone Java 1.7 application using *Camel 2.15.2* and the
*camel-netty* component which is running on Linux RHEL6.

In production, with a camel route that consumes via *netty:udp*, we appear
to be facing an issue similar to this old one:  ChannelPool closing channels
prematurely <https://linkedin.jira.com/plugins/servlet/mobile#issue/NOR-19>  

*QUESTION:* When using *camel:netty*, is there a way to set netty's
*closeChannelTimeMillis* option?, I don't see it listed on the  camel-netty
<http://camel.apache.org/netty.html>  page. I'm hoping that there might be
an undocumented or back-door way to set it.

Thanks, SteveR







--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-netty-How-to-set-the-netty-closeChannelTimeMillis-option-tp5772342.html
Sent from the Camel - Users mailing list archive at Nabble.com.