Camel
  1. Camel
  2. CAMEL-6442

camel-netty-http route throws java.lang.IllegalStateException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.10.4, 2.11.0
    • Fix Version/s: 2.10.5, 2.11.1, 2.12.0
    • Component/s: camel-netty
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I just create a simple proxy route by using camel-netty-http component like this

              <route id="front">
                  <from uri="netty-http:http://0.0.0.0:9001/test" />
                  <to uri="netty-http:http://localhost:9090/foo" />
              </route>
      
              <route id="back">
                  <from uri="netty-http:http://0.0.0.0:9090/foo" />
                  <transform>
                    <simple>hello world</simple>
                  </transform>
              </route>
      
      

      When I send the get request to http://localhost:9001/test, I got below exception

      java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
      	at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342)
      	at org.jboss.netty.channel.DefaultChannelFuture.await0(DefaultChannelFuture.java:306)
      	at org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:285)
      	at org.apache.camel.component.netty.NettyProducer.openChannel(NettyProducer.java:402)
      	at org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:473)
      	at org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:468)
      	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
      	at org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:210)
      	at org.apache.camel.component.netty.http.NettyHttpProducer.process(NettyHttpProducer.java:49)
      	at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:123)
      	at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:118)
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:388)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
      	at org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:118)
      	at org.apache.camel.component.netty.handlers.ServerChannelHandler.messageReceived(ServerChannelHandler.java:102)
      	at org.apache.camel.component.netty.http.handlers.HttpServerChannelHandler.messageReceived(HttpServerChannelHandler.java:97)
      	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.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145)
      	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.channel.Channels.fireMessageReceived(Channels.java:296)
      	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
      	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
      	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
      	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.sendUpstream(DefaultChannelPipeline.java:559)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
      	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
      	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
      	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
      	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
      	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
      	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
      	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:680)
      

        Issue Links

          Activity

            People

            • Assignee:
              Willem Jiang
              Reporter:
              Willem Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development