Camel Netty4在重新连接时检测到死锁

时间:2017-02-27 18:12:08

标签: java apache-camel netty

我遇到了与camel-netty / netty4工作重新连接的问题。当连接丢失时,将成功触发重新连接。但尝试重新连接失败,netty检测到潜在的死锁(参见下面的stacktrace)。在该异常之后,不再进行重新连接尝试。

这是一个网络/骆驼虫还是我错过了什么?

2017-02-27 18:23:18,076  WARN | Camel Thread #33 - NettyServerTCPWorker | o.a.c.c.netty4.ClientModeTCPNettyServerBootstrapFactory | Error during re-connect to x.x.x.x:yyyy. Will attempt again in 2000 millis. This exception is ignored. 
io.netty.util.concurrent.BlockingOperationException: DefaultChannelPromise@3fde00eb(incomplete)
       at io.netty.util.concurrent.DefaultPromise.checkDeadLock(DefaultPromise.java:390)
       at io.netty.channel.DefaultChannelPromise.checkDeadLock(DefaultChannelPromise.java:157)
       at io.netty.util.concurrent.DefaultPromise.awaitUninterruptibly(DefaultPromise.java:283)
       at io.netty.channel.DefaultChannelPromise.awaitUninterruptibly(DefaultChannelPromise.java:135)
       at io.netty.channel.DefaultChannelPromise.awaitUninterruptibly(DefaultChannelPromise.java:28)
       at org.apache.camel.component.netty4.ClientModeTCPNettyServerBootstrapFactory.openChannel(ClientModeTCPNettyServerBootstrapFactory.java:175)
       at org.apache.camel.component.netty4.ClientModeTCPNettyServerBootstrapFactory.doReconnectIfNeeded(ClientModeTCPNettyServerBootstrapFactory.java:164)
       at org.apache.camel.component.netty4.ClientModeTCPNettyServerBootstrapFactory$2.run(ClientModeTCPNettyServerBootstrapFactory.java:216)
       at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
       at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120)
       at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
       at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
       at java.lang.Thread.run(Thread.java:745)

我使用netty 4.0.33.Final和4.0.41.Final分别测试了camel 2.16.2和2.18.1。

修改

我刚刚确认只有设置了workerCount=1才会发生这种情况。这是为了吗?

0 个答案:

没有答案