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

"Failed to create default core-configuration-file" because of plugins/BlueMap symlink #349

Closed
ion1 opened this issue Oct 13, 2022 · 0 comments

Comments

@ion1
Copy link

ion1 commented Oct 13, 2022

What I did / Steps to reproduce

I have all the static Minecraft files, including plugin jars, under one directory in a Docker image, and all the state/configuration data under another directory mounted from the host filesystem.

Unfortunately, PaperMC places both plugin jars and plugin state/configuration side by side under the plugins directory. To work around this, I have a file structure as follows:

/minecraft-static/plugins/foo.jar (file)
/minecraft-static/plugins/foo → ../../minecraft-dynamic/plugins/foo (symlink)
/minecraft-dynamic/plugins/foo (directory)

This has worked with every plugin I have installed so far, but BlueMap fails to start, saying:
[Craft Scheduler Thread - 3 - BlueMap/WARN]: Failed to create default core-configuration-file: java.nio.file.FileAlreadyExistsException: ../../minecraft-static/plugins/BlueMap

BlueMap uses createDirectories in BlueMapConfigs.java. According to the documentation it throws FileAlreadyExistsException "if dir exists but is not a directory". The fact that it does not handle the case where dir exists but is a symlink to an existing directory has been reported and deemed to be intentional behavior.

PaperMC itself has worked around this problem previously.

Expected result

I expect BlueMap to see that plugins/BlueMap is a writeable directory, just one behind a symlink.

Actual result

BlueMap fails to start, saying "Failed to create default core-configuration-file".

Context

BlueMap Version: BlueMap-3.4-spigot
Platform: PaperMC 1.19.2-207 in a Docker container on Linux

Log
[2022-10-13 05:28:03] [Craft Scheduler Thread - 3 - BlueMap/INFO]: Loading...
[2022-10-13 05:28:03] [Craft Scheduler Thread - 3 - BlueMap/WARN]: Failed to create default core-configuration-file: java.nio.file.FileAlreadyExistsException: ../../minecraft-static/plugins/BlueMap
[2022-10-13 05:28:03] [Craft Scheduler Thread - 3 - BlueMap/WARN]: 
################################
 There is a problem with your BlueMap setup!
 BlueMap tried to find this file, but it does not exist:
 ../../minecraft-static/plugins/BlueMap/core.conf
################################
[2022-10-13 05:28:03] [Craft Scheduler Thread - 3 - BlueMap/ERROR]: Failed to load!
java.io.IOException: de.bluecolored.bluemap.common.config.ConfigurationException
        at de.bluecolored.bluemap.common.plugin.Plugin.load(Plugin.java:326) ~[?:?]
        at de.bluecolored.bluemap.bukkit.BukkitPlugin.lambda$onEnable$0(BukkitPlugin.java:147) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) [paper-1.19.2.jar:git-Paper-207]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [paper-1.19.2.jar:git-Paper-207]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [paper-1.19.2.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: de.bluecolored.bluemap.common.config.ConfigurationException
        at de.bluecolored.bluemap.common.config.ConfigManager.loadConfigFile(ConfigManager.java:87) ~[?:?]
        at de.bluecolored.bluemap.common.config.ConfigManager.loadConfig(ConfigManager.java:61) ~[?:?]
        at de.bluecolored.bluemap.common.config.BlueMapConfigs.loadCoreConfig(BlueMapConfigs.java:122) ~[?:?]
        at de.bluecolored.bluemap.common.config.BlueMapConfigs.<init>(BlueMapConfigs.java:44) ~[?:?]
        at de.bluecolored.bluemap.common.config.BlueMapConfigs.<init>(BlueMapConfigs.java:37) ~[?:?]
        at de.bluecolored.bluemap.common.plugin.Plugin.load(Plugin.java:113) ~[?:?]
        ... 7 more
@TBlueF TBlueF moved this to TODO in TODO / Idea board Oct 13, 2022
@TBlueF TBlueF moved this from TODO to In progress in TODO / Idea board Oct 13, 2022
@TBlueF TBlueF closed this as completed in 81f309b Oct 14, 2022
@TBlueF TBlueF moved this from In progress to Ready for next release in TODO / Idea board Oct 14, 2022
@TBlueF TBlueF moved this from Ready for next release to Done in TODO / Idea board Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant