[jira] [Commented] (CAMEL-12016) Invalid Pool Exhausted error on camel-netty4
[ https://issues.apache.org/jira/browse/CAMEL-12016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16259165#comment-16259165 ] ASF GitHub Bot commented on CAMEL-12016: oscerd commented on issue #2101: CAMEL-12016 : ChannelFuture is not clearly erased from the pool on connection error URL: https://github.com/apache/camel/pull/2101#issuecomment-345677314 Thanks for the PR. It has been merged on master and backported to 2.20.x, 2.19.x and 2.18.x This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Invalid Pool Exhausted error on camel-netty4 > > > Key: CAMEL-12016 > URL: https://issues.apache.org/jira/browse/CAMEL-12016 > Project: Camel > Issue Type: Bug > Components: camel-netty4 >Affects Versions: 2.17.4, 2.18.0, 2.19.0, 2.20.0, 2.20.1 > Environment: Same behaviour on : Linux, Windows 7, AIX > Using Intelli-J >Reporter: dvor4x >Assignee: Andrea Cosentino > Fix For: 2.19.5, 2.20.2, 2.21.0, 2.18.6 > > > Hey guys, > Since camel 2.17.4, our application who made some "ping request" brings a > "Pool exhausted" error after 100 trying. > After analysis, since 2.17.4, when camel-netty4 try to connect to a down > host, the connection (ChannelFuture) stay in the pool. > Here is the code to show you : > {code:java} > import org.apache.camel.CamelContext; > import org.apache.camel.Exchange; > import org.apache.camel.builder.RouteBuilder; > import org.apache.camel.impl.DefaultCamelContext; > > import java.util.NoSuchElementException; > > public class main { > public static void main(String args[]) throws Exception { > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new RouteBuilder() { > public void configure() { > onException(NoSuchElementException.class).process(exchange -> > { > > System.out.println(exchange.getProperty(Exchange.EXCEPTION_CAUGHT, > Exception.class)); > }); > > from("timer://myTimer?period=2000"). > setBody() > .simple("Trying to connect to localhost:12345") > .to("stream:out") > > .to("netty4:tcp://localhost:12345?producerPoolMaxActive=4"); > } > }); > context.start(); > Thread.sleep(800); > } > } > {code} > The producerPoolMaxActive is set to 4 to bring the error faster. > *The output in 2.17.3 just bellow (all work perfectly)* > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > _ > *But in version > 2.17.3, we've got this : * > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > _ > I've made a pull request to fix it. > Thanks for your help ! -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CAMEL-12016) Invalid Pool Exhausted error on camel-netty4
[ https://issues.apache.org/jira/browse/CAMEL-12016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16259151#comment-16259151 ] ASF GitHub Bot commented on CAMEL-12016: Github user oscerd closed the pull request at: https://github.com/apache/camel/pull/2101 > Invalid Pool Exhausted error on camel-netty4 > > > Key: CAMEL-12016 > URL: https://issues.apache.org/jira/browse/CAMEL-12016 > Project: Camel > Issue Type: Bug > Components: camel-netty4 >Affects Versions: 2.17.4, 2.18.0, 2.19.0, 2.20.0, 2.20.1 > Environment: Same behaviour on : Linux, Windows 7, AIX > Using Intelli-J >Reporter: dvor4x > > Hey guys, > Since camel 2.17.4, our application who made some "ping request" brings a > "Pool exhausted" error after 100 trying. > After analysis, since 2.17.4, when camel-netty4 try to connect to a down > host, the connection (ChannelFuture) stay in the pool. > Here is the code to show you : > {code:java} > import org.apache.camel.CamelContext; > import org.apache.camel.Exchange; > import org.apache.camel.builder.RouteBuilder; > import org.apache.camel.impl.DefaultCamelContext; > > import java.util.NoSuchElementException; > > public class main { > public static void main(String args[]) throws Exception { > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new RouteBuilder() { > public void configure() { > onException(NoSuchElementException.class).process(exchange -> > { > > System.out.println(exchange.getProperty(Exchange.EXCEPTION_CAUGHT, > Exception.class)); > }); > > from("timer://myTimer?period=2000"). > setBody() > .simple("Trying to connect to localhost:12345") > .to("stream:out") > > .to("netty4:tcp://localhost:12345?producerPoolMaxActive=4"); > } > }); > context.start(); > Thread.sleep(800); > } > } > {code} > The producerPoolMaxActive is set to 4 to bring the error faster. > *The output in 2.17.3 just bellow (all work perfectly)* > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > _ > *But in version > 2.17.3, we've got this : * > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > _ > I've made a pull request to fix it. > Thanks for your help ! -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CAMEL-12016) Invalid Pool Exhausted error on camel-netty4
[ https://issues.apache.org/jira/browse/CAMEL-12016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16259150#comment-16259150 ] ASF GitHub Bot commented on CAMEL-12016: oscerd closed pull request #2101: CAMEL-12016 : ChannelFuture is not clearly erased from the pool on connection error URL: https://github.com/apache/camel/pull/2101 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java index a3756818233..cd3d12afcb2 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java @@ -642,6 +642,7 @@ public void operationComplete(ChannelFuture future) { } exchange.setException(cause); callback.done(false); +releaseChannel(future); return; } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Invalid Pool Exhausted error on camel-netty4 > > > Key: CAMEL-12016 > URL: https://issues.apache.org/jira/browse/CAMEL-12016 > Project: Camel > Issue Type: Bug > Components: camel-netty4 >Affects Versions: 2.17.4, 2.18.0, 2.19.0, 2.20.0, 2.20.1 > Environment: Same behaviour on : Linux, Windows 7, AIX > Using Intelli-J >Reporter: dvor4x > > Hey guys, > Since camel 2.17.4, our application who made some "ping request" brings a > "Pool exhausted" error after 100 trying. > After analysis, since 2.17.4, when camel-netty4 try to connect to a down > host, the connection (ChannelFuture) stay in the pool. > Here is the code to show you : > {code:java} > import org.apache.camel.CamelContext; > import org.apache.camel.Exchange; > import org.apache.camel.builder.RouteBuilder; > import org.apache.camel.impl.DefaultCamelContext; > > import java.util.NoSuchElementException; > > public class main { > public static void main(String args[]) throws Exception { > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new RouteBuilder() { > public void configure() { > onException(NoSuchElementException.class).process(exchange -> > { > > System.out.println(exchange.getProperty(Exchange.EXCEPTION_CAUGHT, > Exception.class)); > }); > > from("timer://myTimer?period=2000"). > setBody() > .simple("Trying to connect to localhost:12345") > .to("stream:out") > > .to("netty4:tcp://localhost:12345?producerPoolMaxActive=4"); > } > }); > context.start(); > Thread.sleep(800); > } > } > {code} > The producerPoolMaxActive is set to 4 to bring the error faster. > *The output in 2.17.3 just bellow (all work perfectly)* > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > _ > *But in version > 2.17.3, we've got this : * > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > _ > I've made a pull request to fix it. > Thanks for your help ! -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CAMEL-12016) Invalid Pool Exhausted error on camel-netty4
[ https://issues.apache.org/jira/browse/CAMEL-12016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16259053#comment-16259053 ] ASF GitHub Bot commented on CAMEL-12016: GitHub user dvor4x opened a pull request: https://github.com/apache/camel/pull/2101 CAMEL-12016 : ChannelFuture is not clearly erased from the pool on connection error * Since 2.17.4, ChannelFuture was never release when a connection error occurs. https://issues.apache.org/jira/browse/CAMEL-12016 You can merge this pull request into a Git repository by running: $ git pull https://github.com/dvor4x/camel bugfix/camelNetty4ReleaseChannelFutureOnConnectionError Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/2101.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2101 commit 436cd46724b94406b0c83a2678b06577eced1b50 Author: dvor4xDate: 2017-11-18T13:54:54Z * Since 2.16.3, ChannelFuture was never release when a connection error occurs. The fact is, pool.borrowObject(); (L224) didn't throw connection exception anymore. > Invalid Pool Exhausted error on camel-netty4 > > > Key: CAMEL-12016 > URL: https://issues.apache.org/jira/browse/CAMEL-12016 > Project: Camel > Issue Type: Bug > Components: camel-netty4 >Affects Versions: 2.17.4, 2.18.0, 2.19.0, 2.20.0, 2.20.1 > Environment: Same behaviour on : Linux, Windows 7, AIX > Using Intelli-J >Reporter: dvor4x > > Hey guys, > Since camel 2.17.4, our application who made some "ping request" brings a > "Pool exhausted" error after 100 trying. > After analysis, since 2.17.4, when camel-netty4 try to connect to a down > host, the connection (ChannelFuture) stay in the pool. > Here is the code to show you : > {code:java} > import org.apache.camel.CamelContext; > import org.apache.camel.Exchange; > import org.apache.camel.builder.RouteBuilder; > import org.apache.camel.impl.DefaultCamelContext; > > import java.util.NoSuchElementException; > > public class main { > public static void main(String args[]) throws Exception { > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new RouteBuilder() { > public void configure() { > onException(NoSuchElementException.class).process(exchange -> > { > > System.out.println(exchange.getProperty(Exchange.EXCEPTION_CAUGHT, > Exception.class)); > }); > > from("timer://myTimer?period=2000"). > setBody() > .simple("Trying to connect to localhost:12345") > .to("stream:out") > > .to("netty4:tcp://localhost:12345?producerPoolMaxActive=4"); > } > }); > context.start(); > Thread.sleep(800); > } > } > {code} > The producerPoolMaxActive is set to 4 to bring the error faster. > *The output in 2.17.3 just bellow (all work perfectly)* > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > _ > *But in version > 2.17.3, we've got this : * > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > _ > I've made a pull request to fix it. > Thanks for your help ! -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CAMEL-12016) Invalid Pool Exhausted error on camel-netty4
[ https://issues.apache.org/jira/browse/CAMEL-12016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16259052#comment-16259052 ] ASF GitHub Bot commented on CAMEL-12016: dvor4x opened a new pull request #2101: CAMEL-12016 : ChannelFuture is not clearly erased from the pool on connection error URL: https://github.com/apache/camel/pull/2101 * Since 2.17.4, ChannelFuture was never release when a connection error occurs. https://issues.apache.org/jira/browse/CAMEL-12016 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Invalid Pool Exhausted error on camel-netty4 > > > Key: CAMEL-12016 > URL: https://issues.apache.org/jira/browse/CAMEL-12016 > Project: Camel > Issue Type: Bug > Components: camel-netty4 >Affects Versions: 2.17.4, 2.18.0, 2.19.0, 2.20.0, 2.20.1 > Environment: Same behaviour on : Linux, Windows 7, AIX > Using Intelli-J >Reporter: dvor4x > > Hey guys, > Since camel 2.17.4, our application who made some "ping request" brings a > "Pool exhausted" error after 100 trying. > After analysis, since 2.17.4, when camel-netty4 try to connect to a down > host, the connection (ChannelFuture) stay in the pool. > Here is the code to show you : > {code:java} > import org.apache.camel.CamelContext; > import org.apache.camel.Exchange; > import org.apache.camel.builder.RouteBuilder; > import org.apache.camel.impl.DefaultCamelContext; > > import java.util.NoSuchElementException; > > public class main { > public static void main(String args[]) throws Exception { > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new RouteBuilder() { > public void configure() { > onException(NoSuchElementException.class).process(exchange -> > { > > System.out.println(exchange.getProperty(Exchange.EXCEPTION_CAUGHT, > Exception.class)); > }); > > from("timer://myTimer?period=2000"). > setBody() > .simple("Trying to connect to localhost:12345") > .to("stream:out") > > .to("netty4:tcp://localhost:12345?producerPoolMaxActive=4"); > } > }); > context.start(); > Thread.sleep(800); > } > } > {code} > The producerPoolMaxActive is set to 4 to bring the error faster. > *The output in 2.17.3 just bellow (all work perfectly)* > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > _ > *But in version > 2.17.3, we've got this : * > _Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > Trying to connect to localhost:12345 > java.util.NoSuchElementException: Pool exhausted > _ > I've made a pull request to fix it. > Thanks for your help ! -- This message was sent by Atlassian JIRA (v6.4.14#64029)