]
Gustavo Fernandes updated ISPN-10459:
-------------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request:
HTTP/2: Cleartext upgrades broken
---------------------------------
Key: ISPN-10459
URL:
https://issues.jboss.org/browse/ISPN-10459
Project: Infinispan
Issue Type: Bug
Components: REST
Affects Versions: 10.0.0.Beta5
Reporter: Gustavo Lira e Silva
Assignee: Gustavo Fernandes
Priority: Major
Labels: http2
Rest requests with HTTP/2 is not working. The following exception is being throw when
using ISPN master branch running with Wildfly:
{noformat}
18:44:56,152 ERROR [org.infinispan.rest.Http20RequestHandler] (REST-ServerIO-6-1)
ISPN012006: Uncaught exception in the pipeline: java.lang.IllegalArgumentException: No
enum constant org.infinispan.rest.framework.Method.PRI
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at
org.infinispan.server.rest:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.rest.framework.Method.valueOf(Method.java:6)
at
org.infinispan.server.rest:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.rest.NettyRestRequest.method(NettyRestRequest.java:69)
at
org.infinispan.server.rest:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.rest.framework.impl.RestDispatcherImpl.dispatch(RestDispatcherImpl.java:36)
at
org.infinispan.server.rest:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.rest.Http20RequestHandler.channelRead0(Http20RequestHandler.java:58)
at
org.infinispan.server.rest:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.rest.Http11RequestHandler.channelRead0(Http11RequestHandler.java:35)
at
org.infinispan.server.rest:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.rest.Http11RequestHandler.channelRead0(Http11RequestHandler.java:18)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.http.cors.CorsHandler.channelRead(CorsHandler.java:95)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:426)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at
org.infinispan.server:ispn-10.0@10.0.0-SNAPSHOT//org.infinispan.server.core.transport.StatsChannelHandler.channelRead(StatsChannelHandler.java:26)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
{noformat}
PRI method will appear to be used when an HTTP/1.1 server or intermediary attempts to
parse an HTTP/2 connection preface
Rest authentication was disabled on standalone.xml and the request was made using
{code:bash}
curl -k -v
http://localhost:8080/rest/default/1 --http2-prior-knowledge
{code}
If I add this value “PRI” into org.infinispan.rest.framework.Method the following
exception is throw
{noformat}
18:57:07,836 ERROR [org.infinispan.rest.Http20RequestHandler] (REST-ServerIO-6-1)
ISPN012006: Uncaught exception in the pipeline: java.io.IOException: Connection reset by
peer
at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1125)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
at
io.netty:ispn-10.0@4.1.34.Final//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
{noformat}