docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

Manually downloaded mods issue

Open Stewartcole13 opened this issue 1 year ago • 15 comments

Describe the problem

Hi there! I am having an issue with the common error "ERROR failed to auto install CurseForge modpack".

I have tried to follow the installation steps as closely as I could but cant seem to get my compose file quite right. No matter the configuration I try it seems like the manually downloaded mods just keep giving me problems.

For clarification I am trying to run an All of Fabric 5 server remote on Ubuntu server through SSH, I downloaded the mods that needed manual download and transferred them through FileZilla.

There's likely something in my compose file that I don't have quite right since I'm new to using docker.

Hope you might be able to help, thanks!

Container definition

version: "3.8"

services: minecraft: image: itzg/minecraft-server tty: true stdin_open: true ports: - "25565:25565" environment: # The type of server to use chosen from: https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/ TYPE: "AUTO_CURSEFORGE" # The Curse Forge Developer Console API key to use type AUTO_CURSEFORGE. Escape $ symbols with an additional $ CF_API_KEY: "$$2a$$10$$a6IFa6f8iWNV7wDmd8JQTuysWtnWhy8nm1S6pn2DMynQxhy0/181a" # The Curse Forge URL of the modpack to use. Add the verion URL of the specific version at the end to pin the modpack version CF_PAGE_URL: "https://www.curseforge.com/minecraft/modpacks/all-of-fabric-5/files/4065541" # The project ID of mods to exclude. CF_EXCLUDE_MODS: # Java memory heap size CF_DOWNLOADS_REPO: /home/mc-docker/downloads MEMORY: "8G" # Set this to allow Minecraft to access more RAM for world generation # if you keep getting stuck at "Preparing spawn area" MAX_MEMORY: "12G" # The Version Minecraft Server to run VERSION: "1.18.2" # Accept the End User License Agreement EULA: "TRUE" DEBUG: "TRUE" volumes: # attach the relative directory 'data' to the container's /data path - /home/mc-docker:/data - /home/mc-docker:/downloads restart: on-failure:3

Container logs

[mc-image-helper] 20:46:13.439 DEBUG : Resolved minecraft version 1.18.2 from 1.18.2 [mc-image-helper] 20:46:13.441 DEBUG : Resolved loader version 0.14.10 from 0.14.10 [mc-image-helper] 20:46:13.445 DEBUG : JSON FETCH: uri=https://meta.fabricmc.net/v2/versions/installer headers=[user-agent: itzg/mc-image-helper/1.38.7 (cmd=fabric), x-fetch-session: 5d5b04c7-965c-407d-9c0d-35e9e4c9893a, accept: application/json, host: meta.fabricmc.net] [mc-image-helper] 20:46:13.470 DEBUG : Resolved installer version 1.0.0 from null [mc-image-helper] 20:46:13.488 DEBUG : Writing SERVER="./fabric-server-mc.1.18.2-loader.0.14.10-launcher.1.0.0.jar" to results file [mc-image-helper] 20:46:13.489 DEBUG : Writing FAMILY="FABRIC" to results file [mc-image-helper] 20:46:13.489 DEBUG : Writing TYPE="FABRIC" to results file [mc-image-helper] 20:46:13.489 DEBUG : Writing VERSION="1.18.2" to results file [mc-image-helper] 20:46:13.490 INFO : Fabric launcher for minecraft 1.18.2 loader 0.14.10 is already available

Some mod authors disallow automated downloads. The following need to be manually downloaded into the repo or excluded: (Also written to ./MODS_NEED_DOWNLOAD.txt)

Mod Version Name Filename Download page ======================= =============================== =================================== ================================================================================ Toast Manager ToastManager-1.18.2-1.0.1 ToastManager-1.18.2-1.0.1.jar https://www.curseforge.com/minecraft/mc-mods/toast-manager/download/3949505 Display Case DisplayCase-fabric-1.18.2-1.0.3 DisplayCase-fabric-1.18.2-1.0.3.jar https://www.curseforge.com/minecraft/mc-mods/displaycase/download/4026726 Speedometer [1.18.2] Speedometer 1.1.0 speedometer-1.1.0.jar https://www.curseforge.com/minecraft/mc-mods/speedometer/download/3739777 Better Bad Omen BetterBadOmen-1.3.0 BetterBadOmen-1.3.0.jar https://www.curseforge.com/minecraft/mc-mods/better-bad-omen/download/3828154 Fix Experience Bug (... fabric-experiencebugfix-1.18-18 fabric-experiencebugfix-1.18-18.jar https://www.curseforge.com/minecraft/mc-mods/fix-experience-bug/download/3555653 Structory Structory 1.18.2 v1.0.2 Structory-1.18.2-1.0.2.jar https://www.curseforge.com/minecraft/mc-mods/structory/download/3850446

  • log 'ERROR failed to auto-install CurseForge modpack'
  • local oldState ++ shopt -po xtrace
  • oldState='set -o xtrace'
  • shopt -u -o xtrace [init] 2024-03-24 20:46:13+00:00 ERROR failed to auto-install CurseForge modpack
  • exit 1

Stewartcole13 avatar Mar 24 '24 20:03 Stewartcole13

I have also tried several different paths for both the repo and the volume, most commonly /home/mc-docker/downloads:/downloads

Stewartcole13 avatar Mar 24 '24 21:03 Stewartcole13

Yes, it'll be better to have a separate host directory for your download mount like you tried in the latest comment:

  - /home/mc-docker/downloads:/downloads

Can you list out the files in /home/mc-docker/downloads and make sure they match up with the filename/3rd column?

itzg avatar Mar 25 '24 01:03 itzg

You're also changing the expected downloads path in the container with CF_DOWNLOADS_REPO. You should remove that and map the host downloads path to the container's default downloads path like itzg mentioned.

rhullah avatar Mar 25 '24 02:03 rhullah

Thanks @rhullah , I totally missed that (due to lack of formatting). Yes, that entry needs to be removed since referring to a host path is not correct.

itzg avatar Mar 25 '24 03:03 itzg

That's for the responses guys! Ill try these out today and let you know how it goes!

Stewartcole13 avatar Mar 25 '24 19:03 Stewartcole13

Sorry for the slow response on my end, lots of work lately lol. I ran the compose.yml file with the suggested edits and was still getting the exact same issue. I can grab the logs from that in a bit, was there anything else you guys noticed that would cause this same issue? I just cant seem to get it to download those specific mods. I could probably exclude them but that would cause other issues right?

Thanks again for the help on this fellas.

Stewartcole13 avatar Mar 27 '24 17:03 Stewartcole13

Can you respond with your current full compose file preferably using the code format block.

And include the log of the run.

rhullah avatar Mar 27 '24 20:03 rhullah

Sorry for the poor formatting, not super versed in the coding world, hopefully this is a bit cleaner.

Here is the updated compose file.

version: "3.8"

services: minecraft: image: itzg/minecraft-server tty: true stdin_open: true ports: - "25565:25565" environment: TYPE: "AUTO_CURSEFORGE" CF_API_KEY: "$$2a$$10$$a6IFa6f8iWNV7wDmd8JQTuysWtnWhy8nm1S6pn2DMynQxhy0/181a" CF_PAGE_URL: "https://www.curseforge.com/minecraft/modpacks/all-of-fabric-5/files/4065541" MEMORY: "8G" MAX_MEMORY: "12G" VERSION: "1.18.2" EULA: "TRUE" DEBUG: "TRUE" volumes: - /home/mc-docker:/data - /home/mc-docker/downloads:/downloads restart: on-failure:3

I have debug enabled so I will attach the logs in a .txt file because of how massive it is.

AoF5 Logs.txt

Stewartcole13 avatar Mar 27 '24 20:03 Stewartcole13

Few things:

  1. When posting your compose file, you shouldn't include your CF_API_KEY. You'll want to revoke that and generate a new one.
  2. I would recommend commenting out the the restart: line until you get it working so that you don't hit any API limits.
  3. The reason it's failing is described right at the end of your log. There are 6 mods that need to be manually downloaded and then placed in your host's /home/mc-docker/downloads directory:
    • Toast Manager
    • Display Case
    • Speedometer
    • Better Bad
    • Fix Experience Bug
    • Structory

rhullah avatar Mar 27 '24 20:03 rhullah

That makes sense! I will make sure to generate a new key, I appreciate the heads up on that.

I will edit out the restart line for the time being as well.

And unless I have set things up wrong I believe I have already downloaded the required mods to a downloads directory in mc-docker (screenshot of directories attached)

image

Im sure it complicated things, but I used filezilla to transfer these mods into that downloads folder from my local PC to my ubuntu server. Not sure if that would have any effect on the mods.

Stewartcole13 avatar Mar 27 '24 21:03 Stewartcole13

Hmm, well it looks like your last run couldn't find them. Either they're not there (like a bad volume mapping), or the permissions are not setup correctly. Those files should owned by UID/GID 1000. On your host system you can see this by running ls -n in the host's download folder. If they are not 1000, you can change them running the following in the host's download folder: chown 1000:1000 ./*.jar

rhullah avatar Mar 27 '24 21:03 rhullah

I believe they are 1000 if I'm reading this correctly. (Im not exactly sure what to look for on this haha)

image

Stewartcole13 avatar Mar 27 '24 21:03 Stewartcole13

I would recommend avoiding absolute paths in your compose volumes declarations. I would also recommend avoiding mounting the directory (~/mc-docker) that contains your compose file into the container. It runs the risk of writing over its own compose file.

So, instead of

volumes:
- /home/mc-docker:/data
- /home/mc-docker/downloads:/downloads

I would recommend using relative paths with ./ that declares the directories to attach to be relative to the location of the compose file:

volumes:
- ./data:/data
- ./downloads:/downloads

Side note: I'm thinking your absolute paths were incorrect. On most linux distributions the ~ directory of the current user is something like /home/<user> however what you show as ~/mc-docker must actually be something like /home/<user>/mc-docker.

itzg avatar Mar 28 '24 02:03 itzg

In addition to getting the volumes mounted correctly, you'll also need to manually include a dependent mod. I found this out by testing the modpack myself. You can do this by adding the CURSEFORGE_FILES section as follows:

    environment:
      ...
      CURSEFORGE_FILES: |
        enchantment-descriptions:3976091

rhullah avatar Mar 28 '24 03:03 rhullah

You are gentlemen and you are scholars.

After both of your changes everything is up and running beautifully.

Thank you both so much for the help!

Stewartcole13 avatar Mar 29 '24 22:03 Stewartcole13

This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.

github-actions[bot] avatar Apr 29 '24 02:04 github-actions[bot]