docker-minecraft-server
docker-minecraft-server copied to clipboard
'Mac style invisible files break server'. (" ._*")
Describe the problem
when making images on docker containers on a linux machine. and using a MacBook to copy files to the folders not eh server for setup . or editing. etc. . Mac OS. creates ._DSstore files and ._filename.zip files
this happens also on zips made by Mac ..
the docker container and launchers do not ignore them and they end in ".zip". and you get a zip error. unexpected end of archive in the logs..
took me days to realize this was the problem
can we mod the server launch to. scan for those files ( for Mac versioning and file locking). and remove them from the docker image . as an option. or be smart enough to ignore them
I am sure I'm not the only one who had this happen ..
I originally thought the modrith setup was bugged but it wasn't..
(speaking of modrinth. it constantly repulse and syncs on launch replacing or rolling back updated packs you already installed manually after the fact.. perhaps an env variable to 'auto sync' so that it can be disabled. if undesired. . and 'autoupdate version'. for grabbing the latest version off modrinth and syncing to that or even a way to. allow exceptions. just a thought)
mainly the "._*" files need to be cleaned. to prevent server crashes
Container definition
version: '3.7'
#There is an error in the yaml syntax: YAMLSyntaxError: All collection items must start at the same column
services:
mc:
image: itzg/minecraft-server
ports:
- 25565:25565 # main
#- 25575:25575 # rcon
- 3876:3876 # create trainmap mod
- 8123:8123 # dynmap
environment:
EULA: "TRUE"
OVERRIDE_SERVER_PROPERTIES: "TRUE"
TYPE: FORGE
MAX_TICK_TIME: 120000
MAX_WORLD_SIZE: 29999984
SPAWN_PROTECTION: 0
SYNC_CHUNK_WRITES: "TRUE"
ALLOW_FLIGHT: "TRUE"
VIEW_DISTANCE: 10
MAX_PLAYERS: 10
PVP: "TRUE"
GUI: "FALSE"
USE_AKIR_FLAGS: "TRUE"
TZ: America/Vancouver
TUNE_VIRTUALIZED: "TRUE"
INIT_MEMORY: 4G
MAX_MEMORY: 6G
OPS: the boss
RCON_PASSWORD: notapasswordtogive
RCON_PORT: 25575
UID: 0
GID: 0
LEVEL_NAME: world
SERVER_NAME: ForgeCreateFlavors
MOTD: Keep it respectful and fun
DIFFICULTY: HARD
LANGUAGE: en_US:en
VERSION: 1.20.1
FORGE_VERSION: 47.1.42
JAVA_VERSION: jdk-17.0.7+7
MODRINTH_PROJECT: https://modrinth.com/modpack/hermitcreateflavors/version/1.0.1c
MOD_PLATFORM: MODRINTH
volumes:
- /etc/timezone:/etc/timezone:ro
- /Volume1/public1/DockerStuff/Minecraft/ForgeCreateFlavors2:/data
mcbackups:
image: itzg/mc-backup
environment:
# Alternatively, comment #"*" these out and uncomment network_mode below
RCON_HOST: mc
#SRC_DIR: /data
#BACKUP_NAME: world #same as worldname
INITIAL_DELAY: 2m
BACKUP_INTERVAL: 8h
PAUSE_IF_NO_PLAYERS: "FALSE"
PLAYERS_ONLINE_CHECK_INTERVAL: 10m
PRUNE_BACKUPS_DAYS: 7
RCON_PASSWORD: notapasswordtogive
RCON_RETRIES: 5
RCON_RETRY_INTERVAL: 30s
EXCLUDES: *.jar,cache,logs,*.tmp,._*
BACKUP_METHOD: tar #"*"
TZ: America/Vancouver #"*"
volumes:
mc:/etc/timezone: /etc/timezone:ro #"*"
# mount the same volume used by server, but read-only
- /Volume1/public1/DockerStuff/Minecraft/ForgeCreateFlavors2:/data:ro
- /Volume1/public1/DockerStuff/mc-backups:/backups:rw
# share network namespace with server to simplify rcon access
#network_mode: "service:mc"
volumes:
mc: {}
Container logs
[15:33:18] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 47.1.0, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412]
[15:33:18] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.7 by Eclipse Adoptium; OS Linux arch amd64 version 5.15.59
Exception in thread "main" cpw.mods.niofs.union.UnionFileSystem$UncheckedIOException: java.util.zip.ZipException: zip END header not found
Caused by: java.util.zip.ZipException: zip END header not found
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.findEND(Unknown Source)
I have never seen the ._filename.zip type files created by Mac OS. Is that your particular editor doing that?
I am sure I'm not the only one who had this happen ..
Well, in all these years, you're the only one that has mentioned this problem. So, it is apparently something particular to your workflow. I'd prefer you sanitize your file contents when transferring to the server, but it also sounds a minimal amount of file cleanup would be feasible.
So, is it the mods/plugins folder specifically that would need to be scrubbed?
(speaking of modrinth. it constantly repulse and syncs on launch replacing or rolling back updated packs you already installed manually after the fact.. perhaps an env variable to 'auto sync' so that it can be disabled. if undesired. . and 'autoupdate version'. for grabbing the latest version off modrinth and syncing to that or even a way to. allow exceptions. just a thought)
As soon as you say "installed manually after the fact" I feel like you're defeating the automation, creating a non-deterministic scenario, and I'm not sure how to address the unknowns in that case. Either you let the system automate things as intended or you very carefully work within the bounds of that automation.
Quick google will show you about those files.
DS store files. Time Machine needs be on
And lots of people download mod packs and then alter them after the fact or update packs manually to fix bugs.
Sure one could turn off modrinth mode and go pure forge once downloaded.
Is your first response always to shoot down ideas and suggestions rather than consider them ?
The hidden files on Mac’s are real and not made up. Maybe it’s an edge case but it’s about making the docker bulletproof not leave holes
On Wed, Jul 26, 2023 at 12:13 PM Geoff Bourne @.***> wrote:
I have never seen the ._filename.zip type files created by Mac OS. Is that your particular editor doing that?
I am sure I'm not the only one who had this happen ..
Well, in all these years, you're the only one that has mentioned this problem. So, it is apparently something particular to your workflow. I'd prefer you sanitize your file contents when transferring to the server, but it also sounds a minimal amount of file cleanup would be feasible.
So, is it the mods/plugins folder specifically that would need to be scrubbed?
(speaking of modrinth. it constantly repulse and syncs on launch replacing or rolling back updated packs you already installed manually after the fact.. perhaps an env variable to 'auto sync' so that it can be disabled. if undesired. . and 'autoupdate version'. for grabbing the latest version off modrinth and syncing to that or even a way to. allow exceptions. just a thought)
As soon as you say "installed manually after the fact" I feel like you're defeating the automation, creating a non-deterministic scenario, and I'm not sure how to address the unknowns in that case. Either you let the system automate things as intended or you very carefully work within the bounds of that automation.
— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2304#issuecomment-1652351081, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDJZTK5BRESEVGD7J73XSFT6TANCNFSM6AAAAAA2Y66SLE . You are receiving this because you authored the thread.Message ID: @.***>
-- Thank you , Paul Cole
“Defeat is a state of mind. No one is ever defeated until defeat has been accepted as reality. " - Bruce Lee
Pretty real to me
On Wed, Jul 26, 2023 at 12:13 PM Geoff Bourne @.***> wrote:
I have never seen the ._filename.zip type files created by Mac OS. Is that your particular editor doing that?
I am sure I'm not the only one who had this happen ..
Well, in all these years, you're the only one that has mentioned this problem. So, it is apparently something particular to your workflow. I'd prefer you sanitize your file contents when transferring to the server, but it also sounds a minimal amount of file cleanup would be feasible.
So, is it the mods/plugins folder specifically that would need to be scrubbed?
(speaking of modrinth. it constantly repulse and syncs on launch replacing or rolling back updated packs you already installed manually after the fact.. perhaps an env variable to 'auto sync' so that it can be disabled. if undesired. . and 'autoupdate version'. for grabbing the latest version off modrinth and syncing to that or even a way to. allow exceptions. just a thought)
As soon as you say "installed manually after the fact" I feel like you're defeating the automation, creating a non-deterministic scenario, and I'm not sure how to address the unknowns in that case. Either you let the system automate things as intended or you very carefully work within the bounds of that automation.
— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2304#issuecomment-1652351081, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDJZTK5BRESEVGD7J73XSFT6TANCNFSM6AAAAAA2Y66SLE . You are receiving this because you authored the thread.Message ID: @.***>
-- Thank you , Paul Cole
“Defeat is a state of mind. No one is ever defeated until defeat has been accepted as reality. " - Bruce Lee
Is your first response always to shoot down ideas and suggestions rather than consider them ?
No, it's not, so please focus on the questions I asked, mainly:
So, is it the mods/plugins folder specifically that would need to be scrubbed?
Anywhere the server would. Be finding files to unzip or jar files to load ( the ._* files keep the extensions so if it’s scan in somewhere to load files it could make the mistake of loading those files as well which is what it’s doing now
And it happens when copying folders as it copies even the hidden files you can only see when you have terminal up and show hidden on the list
Thank you. I am a bit touchy lately because my main Pc died (motherboard melted ) it was my income generation and I am on disability income so I can’t afford food right now. Disability only covers rent and utilities due to cost of living in vancouver. And. Food bank isn’t enough. And I can’t afford the parts to replace my main word and cpu with something capable of running cad software (gen 6 intel or newer equivalent).
So I’m slowly starving out right now
Great for the waistline tho
On Wed, Jul 26, 2023 at 1:31 PM Geoff Bourne @.***> wrote:
Is your first response always to shoot down ideas and suggestions rather than consider them ?
No, it's not, so please focus on the questions I asked, mainly:
So, is it the mods/plugins folder specifically that would need to be scrubbed?
— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2304#issuecomment-1652452062, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDPMFXOBV4SOGUWXN5DXSF5DPANCNFSM6AAAAAA2Y66SLE . You are receiving this because you authored the thread.Message ID: @.***>
-- Thank you , Paul Cole
“Defeat is a state of mind. No one is ever defeated until defeat has been accepted as reality. " - Bruce Lee
I would like to propose the feature be opt-in and generic with a variable named something like REMOVE_FILES_SPEC where it would be a comma or space separated list of DIR:GLOB where DIR is a directory relative to /data and GLOB is a filename glob, such as "._*.zip" in this case.
Would that be sufficient?
Yes, it does.
It would be fine to remove them from the whole data directory
But a comment on the site or config files. Indicating that the zip error. This may fix. As google found a lot of people with the issue and yet no solutions. Or the solutions weren’t posted (mostly stacktrace results and Reddit
I appreciate your effort
Minecraft with my sister in across the internet so my only real entertainment and vice right now
And for the record Java issues and errors break my brain they are so cryptic and often indirect.
On Wed, Jul 26, 2023 at 8:29 PM Geoff Bourne @.***> wrote:
I would like to propose the feature be opt-in and generic with a variable named something like REMOVE_FILES_SPEC where it would be a comma or space separated list of DIR:GLOB where DIR is a directory relative to /data and GLOB is a filename glob, such as "._*.zip" in this case.
Would that be sufficient?
— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2304#issuecomment-1652857182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDKPL5NDR64REZKLIQTXSHOBHANCNFSM6AAAAAA2Y66SLE . You are receiving this because you authored the thread.Message ID: @.***>
-- Thank you , Paul Cole
“Defeat is a state of mind. No one is ever defeated until defeat has been accepted as reality. " - Bruce Lee
FYI on Mac OS there is a dot_clean command that does this. But not in Linux. So that would be ideal But another flaw I found is a startup check for the data for ownership. Ie if gif pid set to 1009:6. Should allow a flag to chown the data dir so it can work. (On start of container). And then clean the dot files that caus fails ( discovered it also fails config files and others. ).
And a way to turn logging for warn and errors only.
On Wed, Jul 26, 2023 at 9:46 PM Paul Cole @.***> wrote:
Yes, it does.
It would be fine to remove them from the whole data directory
But a comment on the site or config files. Indicating that the zip error. This may fix. As google found a lot of people with the issue and yet no solutions. Or the solutions weren’t posted (mostly stacktrace results and Reddit
I appreciate your effort
Minecraft with my sister in across the internet so my only real entertainment and vice right now
And for the record Java issues and errors break my brain they are so cryptic and often indirect.
On Wed, Jul 26, 2023 at 8:29 PM Geoff Bourne @.***> wrote:
I would like to propose the feature be opt-in and generic with a variable named something like REMOVE_FILES_SPEC where it would be a comma or space separated list of DIR:GLOB where DIR is a directory relative to /data and GLOB is a filename glob, such as "._*.zip" in this case.
Would that be sufficient?
— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2304#issuecomment-1652857182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDKPL5NDR64REZKLIQTXSHOBHANCNFSM6AAAAAA2Y66SLE . You are receiving this because you authored the thread.Message ID: @.***>
-- Thank you , Paul Cole
“Defeat is a state of mind. No one is ever defeated until defeat has been accepted as reality. " - Bruce Lee
But another flaw I found is a startup check for the data for ownership. Ie if gif pid set to 1009:6. Should allow a flag to chown the data dir so it can work. (On start of container).
It does that already but it's not efficient to check anything other than the top-level /data directory:
https://github.com/itzg/docker-minecraft-server/blob/17e2f90b91a7acaa5a9d898e310aacfdf77d3f36/scripts/start#L48
And a way to turn logging for warn and errors only.
Please open a new enhancement request for that, but honestly that will remain a very low priority change behind the 100s of other things people ask of me.
But another flaw I found is a startup check for the data for ownership. Ie if gif pid set to 1009:6. Should allow a flag to chown the data dir so
Actually, open a new issue for this and provide your startup logs.
Thanks, I'll look into it.
Just so much on my list of higher priority that this step is more logins and stuff than a simple email. :) I’m sure you understand
On Wed, Sep 13, 2023 at 2:13 PM Geoff Bourne @.***> wrote:
But another flaw I found is a startup check for the data for ownership. Ie if gif pid set to 1009:6. Should allow a flag to chown the data dir so
Actually, open a new issue for this and provide your startup logs.
— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2304#issuecomment-1718325393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDPIPF2L5NJP3MGJXZ3X2IOYVANCNFSM6AAAAAA2Y66SLE . You are receiving this because you authored the thread.Message ID: @.***>