You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We used spring-web-reactive in our application since a while and it worked fine. Today, we got exception in our test client and the process is blocked somehow due to this error:
2016-12-19 18:49:24,359 [reactor-http-nio-1] ERROR reactor.ipc.netty.channel.ChannelOperations - [HttpClient] Error processing connection. Requesting close the channel
io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: unexpected message type: DefaultHttpRequest
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:106)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:749)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:812)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:825)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:805)
at reactor.ipc.netty.channel.ChannelOperationsHandler.doWrite(ChannelOperationsHandler.java:267)
at reactor.ipc.netty.channel.ChannelOperationsHandler.drain(ChannelOperationsHandler.java:368)
at reactor.ipc.netty.channel.ChannelOperationsHandler.flush(ChannelOperationsHandler.java:150)
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:787)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:813)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:825)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:805)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:842)
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032)
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296)
at reactor.ipc.netty.http.HttpOperations.lambda$sendHeaders$0(HttpOperations.java:98)
at reactor.ipc.netty.FutureMono$DeferredFutureMono.subscribe(FutureMono.java:114)
at reactor.core.publisher.FluxConcatIterable$ConcatIterableSubscriber.onComplete(FluxConcatIterable.java:152)
at reactor.core.publisher.FluxConcatIterable.subscribe(FluxConcatIterable.java:69)
at reactor.core.publisher.MonoNext.subscribe(MonoNext.java:41)
at reactor.ipc.netty.channel.ChannelOperations.applyHandler(ChannelOperations.java:421)
at reactor.ipc.netty.http.client.HttpClientOperations.onChannelActive(HttpClientOperations.java:452)
at reactor.ipc.netty.channel.PooledClientContextHandler.connectOrAcquire(PooledClientContextHandler.java:171)
at reactor.ipc.netty.channel.PooledClientContextHandler.lambda$operationComplete$0(PooledClientContextHandler.java:118)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:454)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: unexpected message type: DefaultHttpRequest
at io.netty.handler.codec.http.HttpObjectEncoder.encode(HttpObjectEncoder.java:69)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:88)
After this error, the process is hanging forever. To reproduce this, one could setup a spring boot project using the version mentioned above and with the follow classes:
Application.java
@SpringBootApplication
public class Application {
public static void main(String[] args) {
new SpringApplication().run(args);
}
}
AnyController.java
@Controller
@RequestMapping("/any")
public class AnyController {
@RequestMapping(value = "/thing", method = RequestMethod.HEAD)
public Mono<ResponseEntity<Void>> testAny() {
return Mono.just(ResponseEntity.notFound().build());
}
}
Version:
spring-boot-starter-web-reactive:0.1.0.BUILD-SNAPSHOT
=>reactor-netty-0.6.0.BUILD-20161219.135933-150
We used spring-web-reactive in our application since a while and it worked fine. Today, we got exception in our test client and the process is blocked somehow due to this error:
After this error, the process is hanging forever. To reproduce this, one could setup a spring boot project using the version mentioned above and with the follow classes:
When one runs the test, the first test case will succeed without any problem, however the second one will be simply blocked and hangs forever....
The text was updated successfully, but these errors were encountered: