[player] lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: unable to fit 4246392 into 3
SiriusBYT opened this issue · 6 comments
Hi, I've been trying to connect to my AOF6 server and well, I get this error despite being on a clean server/client (both unmodified, new world and everything).
Here are the logs when I connect from the client's POV:
[14:24:44] [Render thread/INFO]: Connecting to oravem.siriusbyt.ga, 30020
[14:24:44] [Netty Client IO #19/INFO]: Connected to a modded server.
[14:24:44] [Netty Client IO #19/INFO]: Received connectiblechains config from server
[14:24:44] [Netty Client IO #19/INFO]: Applying server overrides
[14:24:44] [Netty Client IO #19/INFO]: Responding with client values
[14:24:45] [Render thread/INFO]: Started 6 worker threads
[14:24:45] [Netty Client IO #19/ERROR]: Exception occurred in netty pipeline
java.net.SocketException: Connection reset
at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401) ~[?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:434) ~[?:?]
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258) ~[netty-buffer-4.1.77.Final.jar:?]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.77.Final.jar:?]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) [netty-transport-4.1.77.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:?]
at java.lang.Thread.run(Thread.java:1589) [?:?]
[14:24:45] [Netty Client IO #19/ERROR]: Exception occurred in netty pipeline
java.net.SocketException: Connection reset
at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401) ~[?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:434) ~[?:?]
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258) ~[netty-buffer-4.1.77.Final.jar:?]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.77.Final.jar:?]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) [netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) [netty-transport-4.1.77.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:?]
at java.lang.Thread.run(Thread.java:1589) [?:?]
[14:24:45] [Render thread/INFO]: Stopping worker threads
And here is the POV of the server's logs:
[13:25:02] [Server thread/INFO]: SiriusBYT[/{IP Adress removed, for obvious reasons}] logged in with entity id 551 at (-124.5, 67.0, -6.5)
[13:25:02] [Server thread/INFO]: Sending server config values to client
[13:25:02] [Server thread/INFO]: Server sent config handshake for deeperdarker to SiriusBYT
[13:25:02] [Server thread/INFO]: Server sent config handshake for paragon to SiriusBYT
[13:25:03] [Server thread/INFO]: SiriusBYT joined the game
[13:25:03] [Server thread/INFO]: PLAYER_JOIN
[13:25:03] [Server thread/INFO]: config sent
[13:25:03] [Server thread/INFO]: add_player wand
[13:25:03] [Netty Epoll Server IO #5/ERROR]: Exception occurred in netty pipeline
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: unable to fit 4246392 into 3
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[netty-codec-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:113) ~[netty-codec-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.77.Final.jar:?]
at net.minecraft.class_2535.method_36942(class_2535.java:209) ~[server-intermediary.jar:?]
at net.minecraft.class_2535.method_10761(class_2535.java:201) ~[server-intermediary.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.77.Final.jar:?] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.77.Final.jar:?]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391) [netty-transport-classes-epoll-4.1.77.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:?]
at java.lang.Thread.run(Thread.java:1589) [?:?]
Caused by: java.lang.IllegalArgumentException: unable to fit 4246392 into 3
at net.minecraft.class_2552.method_10840(class_2552.java:18) ~[server-intermediary.jar:?]
at net.minecraft.class_2552.encode(class_2552.java:8) ~[server-intermediary.jar:?]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.77.Final.jar:?]
... 21 more
[13:25:03] [Netty Epoll Server IO #5/ERROR]: Exception occurred in netty pipeline
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: unable to fit 4246392 into 3
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[netty-codec-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:113) ~[netty-codec-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.77.Final.jar:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.77.Final.jar:?]
at net.minecraft.class_2535.method_36942(class_2535.java:209) ~[server-intermediary.jar:?]
at net.minecraft.class_2535.method_10761(class_2535.java:201) ~[server-intermediary.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.77.Final.jar:?]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391) [netty-transport-classes-epoll-4.1.77.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:?]
at java.lang.Thread.run(Thread.java:1589) [?:?]
Caused by: java.lang.IllegalArgumentException: unable to fit 4246392 into 3
at net.minecraft.class_2552.method_10840(class_2552.java:18) ~[server-intermediary.jar:?]
at net.minecraft.class_2552.encode(class_2552.java:8) ~[server-intermediary.jar:?]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.77.Final.jar:?]
... 21 more
[13:25:03] [Server thread/INFO]: SiriusBYT lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: u
nable to fit 4246392 into 3
[13:25:03] [Server thread/INFO]: SiriusBYT left the game
[13:25:03] [Server thread/INFO]: remove player wand
[13:25:03] [Server thread/WARN]: handleDisconnection() called twice
The Client is a Windows 11 Machine while the Server is an Oracle OCI Ampere Instance (ARM based).
I'd like to add that the server was once running AOF5 and it worked perfectly fine.
EDIT: Client has error "Internal Exception: java.net.SocketException: Connection reset" even though both machines do not have a port forwarding / firewall issue.
From the few times I’ve seen this error before it occurs when a chunk has too much data and Minecraft refuses to save it. That’s probably unlikely since it’s a new world. Does it occur the moment you log in? Can you teleport yourself to another location upon joining and see if it continues?
Google also says the issue occurs when a scoreboard has too much data. Does your server use scoreboards?
Nope, server doesn't use scoreboard and I don't have the time to teleport, HOWEVER I SOMEHOW fixed the error and I don't even know how !
I messed around server.properties deleting it and then letting it regenerate one, then putting back my settings exactly like before and... It works?????????????
This is extremely confusing.
My only problem now is that with AOF6 Client I can't connect to a PaperMC Server (lobby server) to then connect to the AOF6 server but that's fine I guess. (Message about de-serialization which equals to mod conflicts, which is obvious) Though this is weird cause in AOF6 0.1.0 I COULD connect to the lobby server.
But anyways at least I can connect to my AOF6 server now despite some annoyances.