Closed alula closed 7 years ago
It can be added to the library manager for now?
Usually plugin interact with log4j in order to filter the console output, adding the library would fix the CNFE but is not going to emulate the expected behaviour.
What about that? https://logging.apache.org/log4j/2.0/log4j-to-slf4j/index.html
Glowstone uses jul.
Also this expected behavior is implementation specific, so I don't think we should worry about it. It restricts what we want for our logging system. Though, it is up to @momothereal to decide what logging system we should use.
Adding the library is sufficient I think, since it will allow the plugin to load.
Uh, i thought slf4j was a standard nowadays xD
Yeah but doesn't vanilla use slf4j-jdk14? So we would have to lose performance if we wanted to support it, and lose even more if we wanted to use logback and then still support vanilla's logging system.
I think this is tricky as there are definitely solid use-cases for manipulating the loggers in a cross-server way.
For example, there are Discord plugins that use log4j to send server console output to Discord. That's not going to work on Glowstone.
Also authme or other auth plugins need to hide user passwords from console.
@sgdc3 Why? If a server owner wanted to access people's passwords then they easily could even if they weren't visible in console. 🤔
Could they? Are you sure about that? :P
I suppose you could if you were intercepting commands manually, but aside from that, I'd hope they were hashed..
@gdude2002 he's talking about the login command. When a player joins, they have to issue a command to authorize themselves- that command contains their password. /login mysuperlongpassword
@gdude2002 Any simple command logger plugin should do. ☺️
That would count as intercepting commands. :P
@Foorack a bad server owner ;)
So I’m new to glowstone, searched for “authme” on the issue tracker then I saw this. Does that mean the most popular authentication plugin for spigot doesn’t work on glowstone simply because of a log driver issue?
I'm pretty sure you can still do that stuff with jul
, you'd just have to support it explicitly.
Also if the issue was really actually simple then it would probably be fixed by now :P
I was not clear enough ¯\(ツ)/¯ I was asking as an user “if I drop this to the plugin folder will it work even without author changing stuff?” as in “damn, I need to ask every plugin author to fix something so small on their end”. Sorry if it felt like I was calling the issue on the Glowstone end simple.
I have no idea - I don't see it on the plugin compatibility table. Why not try it and report back?
The ClassNotFoundException should definitely be fixed, and it will be a simple fix on Glowstone's part.
Tried running AuthMe with the latest commit from master (bf69637286e428c15955887c8683d661696f3050), got the same error as the OP:
01:42:09 [INFO] [AuthMe] Enabling AuthMe v5.3.2-b1726
01:42:09 [WARNING] [AuthMe] Aborting initialization of AuthMe: [NoClassDefFoundError]: org/apache/logging/log4j/core/Filter
01:42:09 [WARNING] [AuthMe] THE SERVER IS GOING TO SHUT DOWN AS DEFINED IN THE CONFIGURATION!
01:42:09 [INFO] [AuthMe] Waiting for 0 tasks to finish
01:42:09 [INFO] [AuthMe] AuthMe 5.3.2-b1726 disabled!
01:42:09 [INFO] The server is shutting down...
01:42:09 [INFO] Saving world: world
01:42:11 [INFO] Saving world: world_nether
01:42:13 [INFO] Saving world: world_the_end
01:42:13 [SEVERE] Error during server startup.
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@30b1c5d5 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@3e2d65e1[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)
at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:573)
at java.util.concurrent.Executors$DelegatedScheduledExecutorService.scheduleAtFixedRate(Executors.java:735)
at net.glowstone.scheduler.GlowScheduler.start(GlowScheduler.java:81)
at net.glowstone.GlowServer.start(GlowServer.java:632)
at net.glowstone.GlowServer.run(GlowServer.java:452)
at net.glowstone.GlowServer.main(GlowServer.java:322)
>%
@mastercoms The log says Aborting initialization of AuthMe: [NoClassDefFoundError]: org/apache/logging/log4j/core/Filter
which is the reason the server shuts down in the first place.
E: comment was deleted
Perhaps we are including the wrong library?
log4j-core-2.8.1.jar
contains org/apache/logging/log4j/core/Filter
.
I could not reproduce this error on Glowstone version 2017.8.1-SNAPSHOT.3b7499a-MC1.12.1.
14:36:02 [INFO] [AuthMe] Enabling AuthMe v5.3.2-b1726
14:36:02 [WARNING] ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
14:36:02 [INFO] [AuthMe] SQLite driver loaded
14:36:02 [INFO] [AuthMe] SQLite Setup finished
14:36:02 [INFO] [AuthMe] Hooked into Vault!
14:36:02 [INFO] [AuthMe] [LICENSE] This product uses data from the GeoLite API created by MaxMind, available at http://www.maxmind.com
14:36:02 [WARNING] [AuthMe] WARNING! The protectInventory feature requires ProtocolLib! Disabling it...
14:36:03 [INFO] [AuthMe] Development builds are available on our jenkins, thanks to f14stelt.
14:36:03 [INFO] [AuthMe] Do you want a good game server? Look at our sponsor GameHosting.it leader in Italy as Game Server Provider!
14:36:03 [INFO] [AuthMe] AuthMe 5.3.2 build n.1726 correctly enabled!
@yangm97 could you give the full log for server startup? and list files in the lib folder.
log4j-api-2.8.1.jar log4j-core-2.8.1.jar mysql-connector-java-5.1.42.jar sqlite-jdbc-3.16.1.jar
What are the file sizes for log4j-api-2.8.1.jar and log4j-core-2.8.1.jar?
32KB and 25KB
Huh, deleting the lib folder and letting it download the libraries again led to bigger, working files. Sorry for reopening this issue.
But I might suggest adding some checksum to these files, to make sure the server re-downloads them in case they get corrupt.
I have quite a few library manager improvements in the works, but I'm awaiting the Java 9 release for that.
These improvements will make the library manager much more robust, improve modularity and allow for better mod/plugin support enhanced by Shine.
Closing this issue as the initial problem has been resolved -- other suggestions about the library manager, including checksums can be done in a new issue :)
Glowstone build: every? (tested on #550 and #551)
Glowstone doesn't contain Log4j so it breaks many plugins, even mine, so i had to write an server engine detector.
Plugin src if you want: https://github.com/gabixdev/NekoooGuilds