GlowstoneMC / Glowstone-Legacy

An open-source server for the Bukkit Minecraft modding interface
Other
363 stars 122 forks source link

Strange protocol problem #418

Closed turt2live closed 7 years ago

turt2live commented 9 years ago

I couldn't find a directly related ticket, but I did get this exception on a public-facing test server overnight.

03:01:08 [SEVERE] Error in network input
io.netty.handler.codec.DecoderException: com.flowpowered.networking.exception.IllegalOpcodeException: Opcode 69 is not bound!
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99)
        at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
        at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.flowpowered.networking.exception.IllegalOpcodeException: Opcode 69 is not bound!
        at com.flowpowered.networking.service.CodecLookupService.find(CodecLookupService.java:163)
        at net.glowstone.net.protocol.GlowProtocol.newReadHeader(GlowProtocol.java:101)
        at net.glowstone.net.pipeline.CodecsHandler.decode(CodecsHandler.java:50)
        at net.glowstone.net.pipeline.CodecsHandler.decode(CodecsHandler.java:19)
        at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
        ... 16 more
03:01:23 [INFO] [/IP REDACTED:58931] kicked: Timed out

IP is located in Tianjin, Tianjin, China according to Ultros on espernet.

dequis commented 9 years ago

I can reproduce this one by doing a goddamn HTTP request to http://localhost:25565/

turt2live commented 9 years ago

Confirmed. Wow.

Full HTTP log: log

dequis commented 9 years ago

I get only one when requesting with curl. Probably just some bot portscanning you.

This one should be fixed by kicking misbehaving clients, just like vanilla does.

turt2live commented 9 years ago

I just punched it in to my web browser.

coelho commented 9 years ago

Rather than a bug I think this is just more of an exception that should be suppressed or made finer.

dequis commented 9 years ago

Sure, but keeping the connection open until it timeouts is also incorrect.

coelho commented 9 years ago

Oh yes, if there's a codec exception like this the connection should be immediately closed.

turt2live commented 7 years ago

Closing this to clean up my issues list on Github. If this is still an issue, please port it over to https://github.com/GlowstoneMC/Glowstone