Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: Plugin incompatibility with Raknetify #421

Open
Git-North opened this issue Dec 13, 2024 · 7 comments
Open

Bug Report: Plugin incompatibility with Raknetify #421

Git-North opened this issue Dec 13, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@Git-North
Copy link

General information

Plugin is incompatible with Raknetify, can join the server normally

Steps to reproduce

  1. Install Raknetify and Sonar in the same velocity server
  2. Install Raknetify on client
  3. join using the racknet;{adress}
  4. "Disconnected" error on client and log spam on console

Sonar dump

[23:19:48 INFO] [sonar]: Generated dump: {"memory":{"total":"592 MiB","max":"14.9 GiB","free":"390.5 MiB","used":"201.5 MiB"},"runtime":{"virtualCores":24,"jvmArguments":[],"vmName":"OpenJDK 64-Bit Server VM","vmVendor":"Azul Systems, Inc.","vmVersion":"21.0.4+7-LTS"},"os":{"name":"Windows 11","arch":"amd64","version":"10.0"},"sonar":{"version":"2.1.19 (7f3d2440)","platform":"VELOCITY","gitBranch":"main","gitCommit":"7f3d2440"}}

Additional information

[23:18:24 ERROR]: [connected player] N__RTH (/127.0.0.1:51348): unable to connect to server lunch
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: getsockopt: /127.0.0.1:30066
Caused by: java.net.ConnectException: Connection refused: getsockopt
        at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) ~[?:?]
        at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:975) ~[?:?]
        at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:336) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:339) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[23:18:24 INFO]: [server connection] N__RTH -> limbo has connected
[23:18:24 INFO]: N__RTH has joined the game!
[23:18:28 INFO]: [connected player] N__RTH (/127.0.0.1:51348) has disconnected
[23:18:28 INFO]: [server connection] N__RTH -> limbo has disconnected
[23:18:28 INFO]: N__RTH has left the game!
[23:19:25 WARN] [io.netty.channel.AbstractChannelHandlerContext]: Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@4e333b75(success)
java.lang.IllegalStateException: close() must be invoked after the channel is closed.
        at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:714) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:742) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:734) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:619) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1299) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:755) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:733) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:560) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at xyz.jonesdev.sonar.common.fallback.FallbackInboundHandler.exceptionCaught(FallbackInboundHandler.java:87) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:265) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:231) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1345) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:258) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.access$200(AbstractChannelHandlerContext.java:61) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext$3.run(AbstractChannelHandlerContext.java:243) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[23:19:29 WARN] [io.netty.channel.AbstractChannelHandlerContext]: Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@5482616f(success)
java.lang.IllegalStateException: close() must be invoked after the channel is closed.
        at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:714) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:742) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:734) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:619) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1299) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:755) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:733) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:560) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at xyz.jonesdev.sonar.common.fallback.FallbackInboundHandler.exceptionCaught(FallbackInboundHandler.java:87) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:265) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:231) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1345) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:258) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.access$200(AbstractChannelHandlerContext.java:61) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext$3.run(AbstractChannelHandlerContext.java:243) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[23:19:41 WARN] [io.netty.channel.AbstractChannelHandlerContext]: Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@1bbd8fe(success)
java.lang.IllegalStateException: close() must be invoked after the channel is closed.
        at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:714) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:742) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:734) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:619) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1299) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:755) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:733) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:560) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at xyz.jonesdev.sonar.common.fallback.FallbackInboundHandler.exceptionCaught(FallbackInboundHandler.java:87) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:265) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:231) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1345) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:258) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext.access$200(AbstractChannelHandlerContext.java:61) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.AbstractChannelHandlerContext$3.run(AbstractChannelHandlerContext.java:243) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velotity.jar:3.4.0-SNAPSHOT (git-965db127-b454)]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
sonar dump
[23:19:48 INFO] [sonar]: Generated dump: {"memory":{"total":"592 MiB","max":"14.9 GiB","free":"390.5 MiB","used":"201.5 MiB"},"runtime":{"virtualCores":24,"jvmArguments":[],"vmName":"OpenJDK 64-Bit Server VM","vmVendor":"Azul Systems, Inc.","vmVersion":"21.0.4+7-LTS"},"os":{"name":"Windows 11","arch":"amd64","version":"10.0"},"sonar":{"version":"2.1.19 (7f3d2440)","platform":"VELOCITY","gitBranch":"main","gitCommit":"7f3d2440"}}

here are is the error spam

@Git-North Git-North added the bug Something isn't working label Dec 13, 2024
@Git-North Git-North changed the title Bug Report Bug Report: Plugin incompatibility with Raknetify Dec 13, 2024
@jonesdevelopment
Copy link
Owner

This does not seem to be an issue in Sonar. Sonar is not injected anymore.

@jonesdevelopment
Copy link
Owner

This is probably related to some sort of bug in Raknetify. Sonar does not do anything anymore when this error happens.

@jonesdevelopment jonesdevelopment closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2024
@jonesdevelopment
Copy link
Owner

java.lang.IllegalStateException: close() must be invoked after the channel is closed.

This indicates that they forgot to check if the channel is still open before performing a certain action somewhere.

@Git-North
Copy link
Author

@Git-North
Copy link
Author

Git-North commented Dec 17, 2024

It seems that sonar is the one trying to close the connection at the very first of the pipeline, bypassing all raknetify handling.
Plus it swallows the real error when doing that.

@jonesdevelopment

@jonesdevelopment
Copy link
Owner

It seems that sonar is the one trying to close the connection at the very first of the pipeline, bypassing all raknetify handling.
Plus it swallows the real error when doing that.

@jonesdevelopment

I will take a look at it when I'm back home. Even if Sonar is closing the channel, though, raknetify is missing a check somewhere. This error shouldn't be thrown.

@jonesdevelopment jonesdevelopment self-assigned this Dec 17, 2024
@jonesdevelopment
Copy link
Owner

@Git-North Is it possible for you to join the Discord server to open a ticket so we can continue our conversation there?

Link: https://jonesdev.xyz/discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants