andylizi / haproxy-detector

A Minecraft plugin that enables proxied and direct connections both at the same time.
GNU Lesser General Public License v3.0
81 stars 11 forks source link

Minecraft 1.8.9 报错 HAProxyMessage overrides final method release #7

Open xuexu2333 opened 1 year ago

xuexu2333 commented 1 year ago

java版本: 1.8 minecraft版本: 1.8.9 服务端核心: PaperSpigot

[17:16:53 WARN]: Failed to initialize a channel. Closing: [id: 0xd78baa09, /127.0.0.1:50552 => /127.0.0.1:25565]
java.lang.VerifyError: class io.netty.handler.codec.haproxy.HAProxyMessage overrides final method release.()Z
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_333]
        at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_333]
        at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_333]
        at java.net.URLClassLoader.defineClass(Unknown Source) ~[?:1.8.0_333]
        at java.net.URLClassLoader.access$100(Unknown Source) ~[?:1.8.0_333]
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_333]
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_333]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_333]
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_333]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:195) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:97) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_333]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_333]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_333]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.tree.ClassTypeSignature.accept(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.tree.ClassTypeSignature.accept(Unknown Source) ~[?:1.8.0_333]
        at sun.reflect.generics.repository.ClassRepository.getSuperclass(Unknown Source) ~[?:1.8.0_333]
        at java.lang.Class.getGenericSuperclass(Unknown Source) ~[?:1.8.0_333]
        at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:106) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:78) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:67) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:57) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at net.andylizi.haproxydetector.bukkit.HAProxyMessageHandler.<init>(HAProxyMessageHandler.java:23) ~[?:?]
        at net.andylizi.haproxydetector.bukkit.HAProxyInjectorFactory.inject(HAProxyInjectorFactory.java:56) ~[?:?]
        at net.andylizi.haproxydetector.bukkit.HAProxyInjectorFactory.fromChannel(HAProxyInjectorFactory.java:47) ~[?:?]
        at com.comphenix.protocol.injector.netty.ProtocolInjector$1.initChannel(ProtocolInjector.java:161) ~[?:?]
        at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:732) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:442) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:412) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:60) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:48) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:64) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.bootstrap.ServerBootstrap$ServerBootstrapAcceptor.channelRead(ServerBootstrap.java:251) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at com.comphenix.protocol.injector.netty.ProtocolInjector$3.channelRead(ProtocolInjector.java:187) [ProtocolLib.jar:4.8.0]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:92) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_333]
[17:16:53 WARN]: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NullPointerException
        at net.minecraft.server.v1_8_R3.NetworkManager.close(NetworkManager.java:245) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at net.minecraft.server.v1_8_R3.NetworkManager.channelInactive(NetworkManager.java:105) ~[kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:228) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:228) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.handler.timeout.ReadTimeoutHandler.channelInactive(ReadTimeoutHandler.java:144) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:233) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:219) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:769) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.AbstractChannel$AbstractUnsafe$5.run(AbstractChannel.java:567) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [kamox.jar:git-PaperSpigot-f6fba00-9935adc]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_333]

去除haproxy-detector就没有问题了

所有插件版本都试过了,一样的结果

andylizi commented 1 year ago

能不能将你所使用的服务端核心 jar 发给我看看?以及,如果服务器目录下有 libraries 文件夹的话,请把 libraries/io/netty 这个文件夹的内容一并发过来。

GitHub 不能直接上传 jar 文件,因此请打包成 zip。

xuexu2333 commented 1 year ago

好的现在才看到,只有一个服务端jar核心。 PaperSpigot-1.8.9.zip

andylizi commented 1 year ago

很遗憾,这个问题没有什么好的解决办法。调查发现在 1.12 之前,MC 服务端使用的 netty 网络库是 2014 年的古董版本 4.0,而 netty 的 HAProxy 功能是 4.1 才加入的。

曲线救国的话,你可以试一试在 PaperSpigot 外面套一层 BungeeCord,然后给 BC 安装这个插件。我没记错的话,最新版 BC 也是支持 MC 1.8 的?

理论上我可以试试把 HAProxy 实现移植到 4.0,但我暂时不想这么做……

感谢你的反馈,过几天我会更新帖子的注意事项。