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

1.21.4: Error after disabling proxy server in Velocity #3005

Closed
BAD7777 opened this issue Jan 12, 2025 · 6 comments
Closed

1.21.4: Error after disabling proxy server in Velocity #3005

BAD7777 opened this issue Jan 12, 2025 · 6 comments

Comments

@BAD7777
Copy link

BAD7777 commented Jan 12, 2025

Are you using MySQL?

Yes

Are you using a proxy?

Yes - Velocity

"/version ChatControlRed" - plugin version

ChatControl v11.1.0 and VelocityControl v2.1.0

Optional: Error log

No response

ZIP of "/chc debug"

No response

Steps to reproduce

When disabling the proxy server in Velocity, the following log errors occur:

2025-01-12T02:04:53.132699619Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN Ignoring log event after log4j was shut down
2025-01-12T02:04:53.132709447Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN [AsyncContext@639fee48] Ignoring log event after log4j was shut down: ERROR [com.velocitypowered.proxy.console.VelocityConsole]        at org.apache.logging.log4j.core.async.RingBufferLogEventHandler4.onEvent(RingBufferLogEventHandler4.java:31)
2025-01-12T02:04:53.132718643Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN Ignoring log event after log4j was shut down
2025-01-12T02:04:53.132728602Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN [AsyncContext@639fee48] Ignoring log event after log4j was shut down: ERROR [com.velocitypowered.proxy.console.VelocityConsole]        at com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:167)
2025-01-12T02:04:53.132737728Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN Ignoring log event after log4j was shut down
2025-01-12T02:04:53.132747957Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN [AsyncContext@639fee48] Ignoring log event after log4j was shut down: ERROR [com.velocitypowered.proxy.console.VelocityConsole]        at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:122)
2025-01-12T02:04:53.132757054Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN Ignoring log event after log4j was shut down
2025-01-12T02:04:53.132767463Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN [AsyncContext@639fee48] Ignoring log event after log4j was shut down: ERROR [com.velocitypowered.proxy.console.VelocityConsole]        at java.base/java.lang.Thread.run(Thread.java:1583)
2025-01-12T02:04:53.132776850Z Log4j2-TF-1-AsyncLogger[AsyncContext@639fee48]-1 WARN Ignoring log event after log4j was shut down
Server restarting...
Press CTRL + C to stop.
[05:04:54 INFO]: Booting up Velocity 3.4.0-SNAPSHOT (git-00b68859-b459)...
[05:04:54 INFO]: Loading localizations...
[05:04:54 INFO]: Connections will use epoll channels, libdeflate (Linux x86_64)

Note: This issue causes significant flooding in the console, with a large number of repeated errors.

2025-01-12 050329

Steps to Reproduce:

  1. Disable the proxy server in Velocity.
  2. Observe the log output.

Expected Behavior:
No error logs should appear when the proxy server is disabled.

Actual Behavior:
Error messages related to the log events being ignored after Log4j is shut down appear.

Environment:

  • Velocity version: 3.4.0-SNAPSHOT (git-00b68859-b459)
  • Java version: openjdk version "21.0.5" 2024-10-15 LTS
    OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)
    OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)
  • Operating System: Debian 11

Additional Information:
The issue seems to be related to the shutdown of Log4j after the proxy server is disabled, which leads to the above warnings in the log. This could potentially cause issues with server restart functionality.

@BAD7777
Copy link
Author

BAD7777 commented Jan 12, 2025

There are two more errors, but they are located on the backend.

[05:59:38 ERROR]: Error executing task on Server java.util.NoSuchElementException: No value present at java.base/java.util.Optional.orElseThrow(Optional.java:377) ~[?:?] at io.papermc.paper.command.brigadier.MessageComponentSerializer.message(MessageComponentSerializer.java:23) ~[purpur-api-1.21.4-R0.1-SNAPSHOT.jar:1.21.4-2376-4bf1b98] at io.papermc.paper.brigadier.PaperBrigadier.componentFromMessage(PaperBrigadier.java:45) ~[purpur-api-1.21.4-R0.1-SNAPSHOT.jar:1.21.4-2376-4bf1b98] at net.minecraft.commands.Commands.finishParsing(Commands.java:404) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.commands.Commands.performCommand(Commands.java:359) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.commands.Commands.performCommand(Commands.java:345) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2382) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$15(ServerGamePacketListenerImpl.java:2356) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:154) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1624) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:207) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:128) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1601) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1594) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:117) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1744) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1370) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:344) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@pjindras
Copy link

yes and after removing Velocity control and disalbling proxy in chc, it completely destroyed my server, no other plugin could connect player somewhere, so all players were \stucked on lobby

@kangarko fix it asap, this is a serious issue

@BAD7777
Copy link
Author

BAD7777 commented Jan 12, 2025

It causes a memory leak, so I rolled back to ChatControl Red 10.28.6 and VelocityControl 1.1.1. After updating to the new version, it's been constant issues. I'm out of patience.

@pjindras
Copy link

It causes a memory leak, so I rolled back to ChatControl Red 10.28.6 and VelocityControl 1.1.1. After updating to the new version, it's been constant issues. I'm out of patience.

Yes, I did the same. I almost lost the weekend for a 100+ players server.

@Kaludii
Copy link

Kaludii commented Jan 12, 2025

We get these errors as well but when the velocity proxy is being closed, it takes 1+ minute to close rather than a few seconds it takes normally

@kangarko
Copy link
Owner

kangarko commented Jan 13, 2025

I apologizes for the trouble. I don't want to again blame Paper, but we had the exact same class for console filtering in our plugins since 2017 without any issues.

Velocity

There is a bug affecting Velocity that I worked with the OpenJDK team to diagnose. Velocity team refused the intermediate fix so we're stuck waiting log4j major update. More info here I am unsure if this is related.

In the meanwhile I have completely removed console filtering from Velocity (and Bungee) and confirmed the messages above are removed, albeit it reduces the plugin's functionality.

Paper

Regarding the other bug again the proposed solution was rejected, while I understand their reasoning and it's perfectly valid I have no way of tracing this bug since the stack trace leaves no clue as to where exactly it's located. Thankfully on the latest Paper build I could not reproduce it anymore.

Please update velocity/paper and our software to latest and let me know how it goes.

So while I am doing what's required to mitigate these issues as they come, next time please dont come with the attitute of "fix it asap" because I for the most part rely on their APIs which are increasingly more difficult to manage across versions and cannot foresee which bugs will occur in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants