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

Docker compose - Invalid or corrupt jarfile #210

Open
jonathanortega2023 opened this issue Oct 20, 2024 · 3 comments
Open

Docker compose - Invalid or corrupt jarfile #210

jonathanortega2023 opened this issue Oct 20, 2024 · 3 comments

Comments

@jonathanortega2023
Copy link

When running the default Docker compose script or specifying TYPE: VELOCITY, proxy container fails due to "Invalid or corrupt jarfile".

user@homelab:~/Containers/velocity-mc-server$ docker compose up
✔ Container velocity-mc-server-mc-1 Created 0.0s
✔ Container velocity-mc-server-proxy-1 Created 0.0s
Attaching to mc-1, proxy-1
proxy-1 | [init] Resolving type given BUNGEECORD
proxy-1 | [init] Copying configs over...
proxy-1 | [init] Replacing env variables in configs that match the prefix CFG_...
proxy-1 | [init] Setting initial memory to 512m and max to 512m
proxy-1 | Error: Invalid or corrupt jarfile /server/BungeeCord-1.jar
proxy-1 exited with code 1

user@homelab:~/Containers/velocity-mc-server$ docker compose up
✔ Container velocity-mc-server-mc-1 Created 0.0s
✔ Container velocity-mc-server-proxy-1 Recreated 0.2s
Attaching to mc-1, proxy-1
proxy-1 | [init] Resolving type given VELOCITY
proxy-1 | [init] Copying configs over...
proxy-1 | [init] Replacing env variables in configs that match the prefix CFG_...
proxy-1 | [init] Setting initial memory to 512m and max to 512m
proxy-1 | Error: Invalid or corrupt jarfile /server/velocity-3.4.0-SNAPSHOT-439.jar
proxy-1 exited with code 1

@itzg
Copy link
Owner

itzg commented Oct 20, 2024

@jonathanortega2023
Copy link
Author

jonathanortega2023 commented Oct 21, 2024

This is what I get using the velocity compose file you just linked. I'm unsure if this is the issue and whether or not it's from my Docker configuration, but when the proxy container is created the local dirs are owned by root. Any chance it's due to being in a symlinked dir?

user@homelab:/mnt/md0/containers/velocity-mc-server$ cat docker-compose.yml
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "TRUE"
ONLINE_MODE: "FALSE"
TYPE: PAPER
SYNC_SKIP_NEWER_IN_DESTINATION: false
volumes:
- ./paper-global.yml:/config/paper-global.yml
proxy:
image: itzg/mc-proxy
environment:
TYPE: VELOCITY
DEBUG: "false"
ENABLE_RCON: "true"
ports:
- "25565:25577"
volumes:
- ./velocity.toml:/config/velocity.toml:ro
- ./forwarding.secret:/config/forwarding.secret:ro
- proxy:/server
volumes:
proxy: {}

user@homelab:~/Containers/velocity-mc-server$ docker compose up

[+] Running 3/3
✔ Network velocity-mc-server_default Created 0.1s
✔ Container velocity-mc-server-mc-1 Created 0.2s
✔ Container velocity-mc-server-proxy-1 Created 0.2s
Attaching to mc-1, proxy-1
proxy-1 | [init] Resolving type given VELOCITY
proxy-1 | [mc-image-helper] 00:28:26.737 INFO : Downloaded /server/velocity-3.4.0-SNAPSHOT-442.jar
proxy-1 | [init] Downloading Velocity rcon plugin
proxy-1 | [mc-image-helper] 00:28:28.634 INFO : Downloaded /server/plugins/utf-8''Tribufu-VelocityRcon-1.2.0.jar
proxy-1 | [init] Copy Velocity rcon configuration
proxy-1 | [init] Copying configs over...
proxy-1 | [init] Setting initial memory to 512m and max to 512m
proxy-1 | WARN StatusConsoleListener Advanced terminal features are not available in this environment
proxy-1 | [00:28:30 INFO]: Booting up Velocity 3.4.0-SNAPSHOT (git-2c8ce219-b442)...
proxy-1 | [00:28:30 INFO]: Loading localizations...
proxy-1 | [00:28:30 INFO]: Connections will use epoll channels, libdeflate (Linux x86_64) compression, OpenSSL 3.x.x (Linux x86_64) ciphers
proxy-1 | [00:28:30 ERROR]: Unable to read/load/save your velocity.toml. The server will shut down.

user@homelab:/mnt/md0/containers/velocity-mc-server$ ls -l

total 16
-rw-rw-r-- 1 user user 554 Oct 21 00:27 docker-compose.yml
drwxr-xr-x 2 root root 4096 Oct 21 00:27 forwarding.secret
drwxr-xr-x 2 root root 4096 Oct 21 00:27 paper-global.yml
drwxr-xr-x 2 root root 4096 Oct 21 00:27 velocity.toml

@itzg
Copy link
Owner

itzg commented Oct 21, 2024

The files in the host directory are your responsibility to set with the correct ownership and permissions. Yes, perhaps whatever symlink'ing you're doing is the problem.

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

No branches or pull requests

2 participants