https://kotlinlang.org logo
Title
b

bitkid

03/31/2020, 12:20 PM
Has anyone seen this exception? I basically get it on every request (ktor 1.3.2 running in docker in an openshift environment) but everything seems to work fine (i see the output as DEBUG)
2020-03-31 12:14:53.832 [nioEventLoopGroup-4-2] DEBUG Application - 200 OK: GET - /api/repositories/1/matrices/1/data
2020-03-31 12:15:07.621 [nioEventLoopGroup-3-2] DEBUG Application - I/O operation failed
<http://java.io|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(Unknown Source)
	at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
	at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
	at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
	at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:251)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Unknown Source)
m

marstran

03/31/2020, 12:30 PM
Doesn't that mean that the client timed out or closed the connection before the server could send the response?
f

FranSoto

03/31/2020, 12:35 PM
yep
b

bitkid

03/31/2020, 1:55 PM
how can that happen? i mean on the client side i get a full response
you can also see .. kotlin call logging says DEBUG Application - 200 OK: GET - /api/repositories/1/matrices/1/data
so is that a problem or can i safely ignore it?
f

FranSoto

04/01/2020, 11:46 AM
it depends, this means that the comunication was reset by the client, could be because the client crashes and reset the conection, because your data is corrupted, or ..... Investigate if this is a problem or not is up to you.
b

bitkid

04/01/2020, 12:21 PM
it seems like it really only happens when i run in the openshift cluster in docker behind a loadbalancer/proxy .. when i build a local docker image and run it locally it doesn't happen. maybe the proxy closes the connection .. or has problems handling keep alive. because the request itself finished successfully.