Open kobe2000 opened 5 years ago
Got the same issue, here in mac OS or Docker environment with JDK 1.8. We have tried bridging with log4j2 but Netty completely ignore this. Netty only works with slf4j implementations like Logback, we checked on the Netty Github but cannot find solution.
If you have any idea for how to redirect and control Netty's logging output it would be so helpful.
Thanks :)
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Could you please explain what exact problem do you have with those messages?
Could you please explain what exact problem do you have with those messages?
In my opinion, the web server should ignore data outgoing IO exceptions, or log at TRACE level, like Tomcat etc.
Is same as this?
2024-05-07 12:07:38 DEBUG [eventLoopGroupProxy-5-2] ktor.application I/O operation failed
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:378)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:259)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
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 io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(NettyApplicationEngine.kt:296)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
Ktor Version
1.1.3
Ktor Engine Used(client or server and name)
Netty - Firefox
JVM Version, Operating System and Relevant Context
Windows10 JDK8
Feedback
When I use Firefox to access web site build by ktor, exceptions are often printed in server logs as following: