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

[EEROR] Failed to auto-install CurseForge modpack

Open GManIsCoding opened this issue 2 months ago • 23 comments

Describe the problem

A guy had same bug as this and I real want to know how to fix it, and if there is anything else wrong with my code please tell me

Container definition

#https://docker-minecraft-server.readthedocs.io/en/latest/ services: mc: image: itzg/minecraft-server:latest pull_policy: daily tty: true stdin_open: true ports: - "25565:25565" environment: TYPE: AUTO_CURSEFORGE CF_SLUG: jay-pack CF_API_KEY: $$2a$$10$$Wfhccj5YSrMR/XRSu8KaDecrS3V6A/IlGNID16v7E0MePIVgKHgwq CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/JAY_PACK.zip EULA: "TRUE" MEMORY: 12G MOTD: "" WHITELIST: "OrenthalGaming14" OPS: "OrenthalGaming14" MAX_PLAYERS: 2 VERSION: 1.201 volumes: - ./data:/data restart: on-failure

Container logs

[mc-image-helper] 03:44:00.121 ERROR : 'install-curseforge' command failed. Version is 1.50.4 me.itzg.helpers.errors.GenericException: No mods found with slug=JAY_PACK.zip at me.itzg.helpers.curseforge.CurseForgeApiClient.lambda$searchMod$2(CurseForgeApiClient.java:151) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132) at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:113) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158) at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Suppressed: java.lang.Exception: #block terminated with an error at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) at reactor.core.publisher.Mono.block(Mono.java:1779) at me.itzg.helpers.curseforge.CurseForgeInstaller.installByRetrievingModpackZip(CurseForgeInstaller.java:272) at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$install$3(CurseForgeInstaller.java:196) at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:242) at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:195) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:252) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:33) at picocli.CommandLine.executeUserObject(CommandLine.java:2031) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469) at picocli.CommandLine$RunLast.handle(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2423) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at picocli.CommandLine$RunLast.execute(CommandLine.java:2425) at picocli.CommandLine.execute(CommandLine.java:2174) at me.itzg.helpers.McImageHelper.main(McImageHelper.java:176) [init] [ERROR] Failed to auto-install CurseForge modpack

GManIsCoding avatar Nov 06 '25 03:11 GManIsCoding

You can't declare both CF_SLUG and CF_PAGE_URL. Also your CF_PAGE_URL is wrong. It shouldn't reference a zip file. Read the docs to see proper url to put there.

Next time open a discussion item instead of an issue.

itzg avatar Nov 06 '25 12:11 itzg

I removed the CF slug, and put in the URL which is: https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425 But it is still giving me the same Error.

GManIsCoding avatar Nov 07 '25 02:11 GManIsCoding

Please provide the new logs. Also make sure you use docker compose up -d to apply the changes.

itzg avatar Nov 07 '25 02:11 itzg

services: mc: image: itzg/minecraft-server:latest pull_policy: daily tty: true stdin_open: true ports: - "25565:25565" environment: TYPE: AUTO_CURSEFORGE CF_API_KEY: $$2a$$10$$Wfhccj5YSrMR/XRSu8KaDecrS3V6A/IlGNID16v7E0MePIVgKHgwq CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425 EULA: "TRUE" MEMORY: 12G MOTD: "" WHITELIST: "OrenthalGaming14" OPS: "OrenthalGaming14" MAX_PLAYERS: 2 VERSION: 1.20.1 volumes: - ./data:/data restart: on-failure

Logs: [init] Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 9 1000 1000 4096 Nov 6 01:01 /data' [init] Image info: buildtime=2025-11-07T02:51:50.783Z,version=java21,revision=baf55337c541518b85a7b5918ebc79860ad1cfb8 [mc-image-helper] 04:35:30.223 ERROR : 'install-curseforge' command failed. Version is 1.50.4 me.itzg.helpers.errors.GenericException: The modpack authors have indicated this file is not allowed for project distribution. Please download the client zip file from https://www.curseforge.com/minecraft/modpacks/jay-pack and pass via CF_MODPACK_ZIP environment variable or place in downloads repo directory. at me.itzg.helpers.curseforge.CurseForgeInstaller.resolveModpackFileAndProcess(CurseForgeInstaller.java:382) at me.itzg.helpers.curseforge.CurseForgeInstaller.installByRetrievingModpackZip(CurseForgeInstaller.java:274) at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$install$3(CurseForgeInstaller.java:196) at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:242) at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:195) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:252) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:33) at picocli.CommandLine.executeUserObject(CommandLine.java:2031) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469) at picocli.CommandLine$RunLast.handle(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2423) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at picocli.CommandLine$RunLast.execute(CommandLine.java:2425) at picocli.CommandLine.execute(CommandLine.java:2174) at me.itzg.helpers.McImageHelper.main(McImageHelper.java:176) [init] [ERROR] Failed to auto-install CurseForge modpack

GManIsCoding avatar Nov 07 '25 04:11 GManIsCoding

It says it in the error

GenericException: The modpack authors have indicated this file is not allowed for project distribution. Please download the client zip file from https://www.curseforge.com/minecraft/modpacks/jay-pack and pass via CF_MODPACK_ZIP environment variable or place in downloads repo directory.

itzg avatar Nov 07 '25 11:11 itzg

I didn’t see That thank you

GManIsCoding avatar Nov 12 '25 19:11 GManIsCoding

I having trouble finding the zip URL services: mc: image: itzg/minecraft-server:latest pull_policy: daily tty: true stdin_open: true ports: - "25565:25565" environment: MODPACK_PLATFORM: AUTO_CURSEFORGE CF_API_KEY: $$2a$$10$$Wfhccj5YSrMR/XRSu8KaDecrS3V6A/IlGNID16v7E0MePIVgKHgwq CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425 CF_MODPACK_ZIP: https://www.curseforge.com/minecraft/modpacks/jay-pack EULA: "TRUE" MEMORY: 12G MOTD: "" WHITELIST: "OrenthalGaming14" OPS: "OrenthalGaming14" MAX_PLAYERS: 2 VERSION: 1.20.1 volumes: - ./data:/data restart: on-failure

GManIsCoding avatar Nov 15 '25 01:11 GManIsCoding

It is showing me "modpack page URL or slug identifier is required"

GManIsCoding avatar Nov 15 '25 01:11 GManIsCoding

You're pointing to the server file https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425

I know that seems tempting, but it's wrong. You're supposed to reference the client modpack since CurseForge only includes metadata in those.

The docs describe this requirement

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#pinning-modpack-and-mod-loader-versions

itzg avatar Nov 15 '25 13:11 itzg

do you what me to delete CF_PAGE_URL and add SLUG and FILEID?

GManIsCoding avatar Nov 17 '25 02:11 GManIsCoding

it is also saying NoSuchFileException

GManIsCoding avatar Nov 17 '25 02:11 GManIsCoding

When I use:

https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425

as in

services:
  mc:
    image: itzg/minecraft-server
    environment:
      EULA: true
      TYPE: AUTO_CURSEFORGE
      CF_API_KEY: ${CF_API_KEY}
      CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425
      MEMORY: 4G

it reports

me.itzg.helpers.errors.GenericException: The modpack authors have indicated this file is not allowed for project distribution. Please download the client zip file from https://www.curseforge.com/minecraft/modpacks/jay-pack and pass via CF_MODPACK_ZIP environment variable or place in downloads repo directory.

itzg avatar Nov 17 '25 02:11 itzg

...oh, you're not following the instructions in the error. You have to download the zip file, mount it into the container, and provide that path and not a URL as CF_MODPACK_ZIP.

Or, also in the instructions, attach a /downloads directory into the container that contains the modpack zip.

itzg avatar Nov 17 '25 02:11 itzg

I'm so sorry for the trouble this is one of my first projects on linux

GManIsCoding avatar Nov 18 '25 04:11 GManIsCoding

okay well I am attaching it by: docker run -d --pull=always -v /gman/data:/data
-e CF_MODPACK_ZIP=https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server and it 's refusing to download saying: Error response from daemon: Conflict. The container name "/mc" is already in use by container "6b58dbb29b11ee70b194f3da47b44225f45b8bfdb58a45be82817976d453a840". You have to remove (or rename) that container to be able to reuse that name.

GManIsCoding avatar Nov 18 '25 05:11 GManIsCoding

You have to remove (or rename) that container to be able to reuse that name.

Use

docker rm mc

itzg avatar Nov 18 '25 13:11 itzg

okay well I installed the zip and attach it but I'm getting NoFileException

services: mc: image: itzg/minecraft-server:latest pull_policy: daily tty: true stdin_open: true ports: - "25565:25565" environment: TYPE: AUTO_CURSEFORGE CF_API_KEY: $$2a$$10$$Wfhccj5YSrMR/XRSu8KaDecrS3V6A/IlGNID16v7E0MePIVgKHgwq #CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425 CF_SLUG: jay-pack CF_FILEID: "7131425" CF_MODPACK_ZIP: "/gman/data/minecraft_server.1.21.10.zip" EULA: "TRUE" MEMORY: 12G MOTD: "" WHITELIST: "OrenthalGaming14" OPS: "OrenthalGaming14" MAX_PLAYERS: 2 VERSION: 1.20.1 volumes: - ./data:/data - ./downloads:/downloads restart: on-failure

[mc-image-helper] 02:18:03.162 ERROR : 'install-curseforge' command failed. Version is 1.50.6 me.itzg.helpers.errors.GenericException: File system issue during installation: /gman/data/minecraft_server.1.21.10.zip at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:247) at me.itzg.helpers.curseforge.CurseForgeInstaller.installFromModpackZip(CurseForgeInstaller.java:150) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:248) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:33) at picocli.CommandLine.executeUserObject(CommandLine.java:2031) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469) at picocli.CommandLine$RunLast.handle(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2423) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at picocli.CommandLine$RunLast.execute(CommandLine.java:2425) at picocli.CommandLine.execute(CommandLine.java:2174) at me.itzg.helpers.McImageHelper.main(McImageHelper.java:176) Caused by: java.nio.file.NoSuchFileException: /gman/data/minecraft_server.1.21.10.zip at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(Unknown Source) at java.base/java.nio.channels.FileChannel.open(Unknown Source) at java.base/java.nio.channels.FileChannel.open(Unknown Source) at org.apache.commons.compress.archivers.zip.ZipFile.openZipChannel(ZipFile.java:525) at org.apache.commons.compress.archivers.zip.ZipFile.access$000(ZipFile.java:94) at org.apache.commons.compress.archivers.zip.ZipFile$Builder.get(ZipFile.java:167) at me.itzg.helpers.curseforge.CurseForgeInstaller.extractModpackManifest(CurseForgeInstaller.java:1028) at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$installFromModpackZip$0(CurseForgeInstaller.java:151) at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:242) ... 12 common frames omitted [init] [ERROR] Failed to auto-install CurseForge modpack

GManIsCoding avatar Nov 21 '25 02:11 GManIsCoding

You didn't mount at the container path starting with /gman

In environment you have

CF_MODPACK_ZIP: "/gman/data/minecraft_server.1.21.10.zip"

But your volumes only declare /data and /downloads.

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

So, the error is correct that the file doesn't exist because the entire path doesn't exist.

FYI right of the colon is the container path. You can only reference container paths from the environment variables.

volumes:
  {host path}:{container path}

Refer to https://docs.docker.com/reference/compose-file/services/#short-syntax-5

itzg avatar Nov 21 '25 02:11 itzg

like this?: - ./home/gman/data/minecraft_server.1.21.10.zip:/var/lib/docker

GManIsCoding avatar Nov 21 '25 04:11 GManIsCoding

Much closer. Host path needs to be absolute in this case and right side still needs to be a path inside the container. So

/home/gman:/gman

and leave that environment variable as this since it starts with the inside-container path of /gman

CF_MODPACK_ZIP: "/gman/data/minecraft_server.1.21.10.zip"

There's many other ways you could structure your files, but wanted to help clarify the host:container aspect of mapping.

itzg avatar Nov 21 '25 13:11 itzg

okay I changed it:

services: mc: image: itzg/minecraft-server:latest pull_policy: daily tty: true stdin_open: true ports: - "25565:25565" environment: TYPE: AUTO_CURSEFORGE CF_API_KEY: $$2a$$10$$Wfhccj5YSrMR/XRSu8KaDecrS3V6A/IlGNID16v7E0MePIVgKHgwq #CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/jay-pack/files/7131425 CF_SLUG: jay-pack CF_FILEID: "7131425" CF_MODPACK_ZIP: "/gman/data/minecraft_server.1.21.10.zip" EULA: "TRUE" MEMORY: 12G MOTD: "" WHITELIST: "OrenthalGaming14" OPS: "OrenthalGaming14" MAX_PLAYERS: 2 VERSION: 1.21.10 volumes: - ./data:/data - ./downloads:/downloads - ./home/gman:/gman restart: on-failure

but it still shows:

[init] Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 9 1000 1000 4096 Nov 21 02:17 /data' [init] Image info: buildtime=2025-11-23T19:15:55.613Z,version=java21,revision=c26119b512245df7e5e8ecfa50d6c638bd12030d [mc-image-helper] 22:31:52.968 ERROR : 'install-curseforge' command failed. Version is 1.50.8 me.itzg.helpers.errors.GenericException: File system issue during installation: Is a directory at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:250) at me.itzg.helpers.curseforge.CurseForgeInstaller.installFromModpackZip(CurseForgeInstaller.java:153) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:254) at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:33) at picocli.CommandLine.executeUserObject(CommandLine.java:2031) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469) at picocli.CommandLine$RunLast.handle(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2423) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at picocli.CommandLine$RunLast.execute(CommandLine.java:2425) at picocli.CommandLine.execute(CommandLine.java:2174) at me.itzg.helpers.McImageHelper.main(McImageHelper.java:176) Caused by: java.io.IOException: Is a directory at java.base/sun.nio.ch.UnixFileDispatcherImpl.read0(Native Method) at java.base/sun.nio.ch.UnixFileDispatcherImpl.read(Unknown Source) at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at java.base/sun.nio.ch.IOUtil.read(Unknown Source) at java.base/sun.nio.ch.IOUtil.read(Unknown Source) at java.base/sun.nio.ch.FileChannelImpl.read(Unknown Source) at org.apache.commons.io.IOUtils.read(IOUtils.java:1949) at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:214) at org.apache.commons.compress.archivers.zip.ZipFile.tryToLocateSignature(ZipFile.java:654) at org.apache.commons.compress.archivers.zip.ZipFile.positionAtEndOfCentralDirectoryRecord(ZipFile.java:582) at org.apache.commons.compress.archivers.zip.ZipFile.openZipChannel(ZipFile.java:527) at org.apache.commons.compress.archivers.zip.ZipFile.access$000(ZipFile.java:94) at org.apache.commons.compress.archivers.zip.ZipFile$Builder.get(ZipFile.java:167) at me.itzg.helpers.curseforge.CurseForgeInstaller.extractModpackManifest(CurseForgeInstaller.java:1037) at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$installFromModpackZip$0(CurseForgeInstaller.java:154) at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:245) ... 12 common frames omitted [init] [ERROR] Failed to auto-install CurseForge modpack

GManIsCoding avatar Nov 23 '25 22:11 GManIsCoding

I said to use

/home/gman

not

./home/gman

A path that starts with a slash / is absolute. A path that starts with a dot slash ./ is a relative path. Very different.

At this you point you need to tidy up things because now you have a file where a directory is expected or vice versa.

Perhaps read up on Linux paths

https://opensource.com/article/19/8/understanding-file-paths-linux

itzg avatar Nov 23 '25 22:11 itzg

every things is fix it is just missing a manfest:

[mc-image-helper] 00:51:11.910 ERROR : Invalid parameter provided for 'install-curseforge' command: Modpack file is missing a manifest. Make sure to reference a client modpack file.

GManIsCoding avatar Nov 24 '25 00:11 GManIsCoding