Open UlrichLohrmann opened 1 year ago
Additional information.
If I try to access Dashboard of Mockserver with HTTPS, browser hangs indefinitely. The exception mentioned is shown after I cancel the hanging request in the browser, so exception has nothing to do with the original problem.
The main problem is that after I enter the HTTPS url of dashboard, the browser hangs indefinitly.
I tried with running Mockserver from commandline instead of running in a container with podman using mockserver-netty-5.15.0-shaded.jar, same result.
Tried several options:
Also tried several different JREs
I also started mockserver with TLS communication trace enabled. It seems that handshake works and the content of the dashboard ist sent to client browser, but content never is shown there. Browse hangs indeffinately. To me it looks as if the TCP/IP communication between Mockserver and browser is incomplete.
Hope that helps
I attach log of ssl handshake. putty.log
Browser hangs indefinitly after last line of log.
One more information.
Out Mockserver instance is running in a separate network segment which is encapsulated by a firewall. The firewall has port range 40400 to 40449 open and Mockserver instance is running on 40401
Describe the issue Accessing the Mockserver Dashboard using HTTPS results in io.netty.handler.codec.http2.Http2Exception$StreamException: HTTP/2 to HTTP layer caught stream reset
What you are trying to do Try to open Mockserver Dashboard using HTTPS URL, for example
https://lvpaycntt01.dsv-gruppe.de:40400/mockserver/dashboard
Accessing Dashboard uning HTTP URL works.
MockServer version 5.15.0
To Reproduce Enter URL mentioned above in Firefox or Edge.
podman create \ --name=MOCKSERVER \ --stop-timeout=60 \ --cap-add IPC_OWNER \ --cap-add IPC_LOCK \ --user=0:0 \ -e MOCKSERVER_PROPERTY_FILE="/config/mockserver.properties" \ -e MOCKSERVER_INITIALIZATION_JSON_PATH="/config/InitialExpectations.json" \ -e MOCKSERVER_PERSIST_EXPECTATIONS="true" \ -e MOCKSERVER_PERSIST_EXPECTATIONS_PATH="/config/PersistedExpectations.json" \ -e MOCKSERVER_INITIALIZATION_JSON_PATH="/config/**/Mockserver-Init.json" \ -e MOCKSERVER_CERTIFICATE_AUTHORITY_X509_CERTIFICATE="/config/certs.d/lvpaycntt01.dsv-gruppe.de.cer.pem" \ -e MOCKSERVER_CERTIFICATE_AUTHORITY_PRIVATE_KEY="/config/certs.d/lvpaycntt01.dsv-gruppe.de.key.pk8" \ -e MOCKSERVER_PROACTIVELY_INITIALISE_TLS="true" \ -e MOCKSERVER_TLS_MUTUAL_AUTHENTICATION_REQUIRED="false" \ --volume ${SHARE_DIR_HOST}:/config:Z" \ -p xxx.xxx.xxx.xxx:40400:1080 \ ${CONTAINER_IMAGE}:5.15.0
SHARE_DIR_HOST is a directory on the container host for the configuration files.
Code you used to create expectations No special code used, exception is logged in Dashboard.
What error you saw Exception in Dashboard after try to access Dashboard using HTTPS:
io.netty.handler.codec.http2.Http2Exception$StreamException: HTTP/2 to HTTP layer caught stream reset
at io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:153) at io.netty.handler.codec.http2.InboundHttp2ToHttpAdapter.onRstStreamRead(InboundHttp2ToHttpAdapter.java:288)
at io.netty.handler.codec.http2.Http2FrameListenerDecorator.onRstStreamRead(Http2FrameListenerDecorator.java:59)
at io.netty.handler.codec.http2.Http2FrameListenerDecorator.onRstStreamRead(Http2FrameListenerDecorator.java:59)
at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onRstStreamRead(DefaultHttp2ConnectionDecoder.java:442) at io.netty.handler.codec.http2.DefaultHttp2FrameReader.readRstStreamFrame(DefaultHttp2FrameReader.java:509)
at io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(DefaultHttp2FrameReader.java:259)
at io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(DefaultHttp2FrameReader.java:159) at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(DefaultHttp2ConnectionDecoder.java:173)
at io.netty.handler.codec.http2.DecoratingHttp2ConnectionDecoder.decodeFrame(DecoratingHttp2ConnectionDecoder.java:63)
at io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(Http2ConnectionHandler.java:393) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:453)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1373) at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:833)
Expected behaviour Dashboard is displayed using HTTPS URL.
MockServer Log Same as exception mentioned above.