docker-minecraft-server: ERROR : 'install-curseforge' command failed
Describe the problem
When trying to set up a Mechanical Mastery server I get a ‘install-curseforge’ command failed error. Logs below.
Container definition
Empty fields redacted.
mm:
container_name: mm
image: itzg/minecraft-server
ports:
- 25566:25565
environment:
DEBUG: "true"
EULA: "TRUE"
MOTD: "Mastery the Mechanical!"
DIFFICULTY: normal
WHITELIST:
ENFORCE_WHITELIST: "true"
OPS:
ICON:
ENABLE_RCON: "true"
RCON_PORT: 25576
RCON_PASSWORD: qweasdzxc
GENERATE_STRUCTURES: "true"
SPAWN_PROTECTION: 0
ALLOW_FLIGHT: "true"
MEMORY: 8G
TZ: Australia/Sydney
OVERRIDE_SERVER_PROPERTIES: "true"
OVERRIDE_WHITELIST: "true"
ONLINE_MODE: "true"
ENABLE_WHITELIST: "true"
TYPE: AUTO_CURSEFORGE
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/mechanical-mastery
CF_API_KEY:
#CF_SERVER_MOD: Divine_Journey_2.19.2_Server_Pack.zip
VERSION: 1.18.2
#USE_MODPACK_START_SCRIPT: "false"
tty: true
stdin_open: true
restart: unless-stopped
volumes:
- /minecraft/mm:/data
Container logs
[init] 2023-04-01 15:23:03+11:00 ERROR failed to auto-install CurseForge modpack
+ exit 1
+ export HOME=/data
+ HOME=/data
++ id -u
++ id -g
++ ls -lnd /data
+ log 'Running as uid=1000 gid=1000 with /data as '\''drwxrwxr-x 2 1000 1000 4096 Apr 1 14:34 /data'\'''
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-04-01 15:23:04+11:00 Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 2 1000 1000 4096 Apr 1 14:34 /data'
+ '[' '!' -e /data/eula.txt ']'
+ isTrue false
+ case "${1,,}" in
+ return 1
+ isTrue false
+ case "${1,,}" in
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ fixJavaPath
+ which java
+ export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ case "X$VERSION" in
+ VANILLA_VERSION=1.18.2
+ export VANILLA_VERSION
++ get_major_version 1.18.2
++ version=1.18.2
++ echo 1.18.2
++ cut -d. -f 1-2
+ MAJOR_VANILLA_VERSION=1.18
+ export MAJOR_VANILLA_VERSION
+ log 'Resolved version given 1.18.2 into 1.18.2 and major version 1.18'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-04-01 15:23:04+11:00 Resolved version given 1.18.2 into 1.18.2 and major version 1.18
+ cd /data
+ export ORIGINAL_TYPE=AUTO_CURSEFORGE
+ ORIGINAL_TYPE=AUTO_CURSEFORGE
+ isTrue false
+ case "${1,,}" in
+ return 1
+ isTrue false
+ case "${1,,}" in
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ versionLessThan 1.7
+ mc-image-helper compare-versions 1.18.2 lt 1.7
+ return 1
+ log 'Resolving type given AUTO_CURSEFORGE'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-04-01 15:23:04+11:00 Resolving type given AUTO_CURSEFORGE
+ case "${TYPE^^}" in
+ exec /start-deployAutoCF
+ args=(--results-file="$resultsFile")
+ [[ -n https://www.curseforge.com/minecraft/modpacks/mechanical-mastery/files/4238671 ]]
+ args+=(--modpack-page-url="$CF_PAGE_URL")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ args+=(--parallel-downloads="$CF_PARALLEL_DOWNLOADS" --force-synchronize="$CF_FORCE_SYNCHRONIZE")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json ]]
+ args+=(--exclude-include-file="$CF_EXCLUDE_INCLUDE_FILE")
+ mc-image-helper install-curseforge --results-file=/data/.install-curseforge.env --modpack-page-url=https://www.curseforge.com/minecraft/modpacks/mechanical-mastery/files/4238671 --parallel-downloads=4 --force-synchronize=false --exclude-include-file=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json
[mc-image-helper] 15:23:05.694 DEBUG : JSON FETCH: uri=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json headers=DefaultHttpHeaders[user-agent: mc-image-helper/1.24.12 (cmd=unspecified), accept: application/json, host: raw.githubusercontent.com]
[mc-image-helper] 15:23:05.782 DEBUG : JSON FETCH: uri=https://api.curse.tools/v1/cf/mods/search?gameId=432&slug=mechanical-mastery headers=DefaultHttpHeaders[user-agent: mc-image-helper/1.24.12 (cmd=install-curseforge), accept: application/json, host: api.curse.tools]
[mc-image-helper] 15:23:06.120 ERROR : 'install-curseforge' command failed. Version is 1.24.12
me.itzg.helpers.errors.GenericException: Failed to parse response body into class me.itzg.helpers.curseforge.model.ModsSearchResponse: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (reactor.netty.ByteBufMono$ReleasingInputStream); line: 1, column: 2]
at me.itzg.helpers.http.ObjectFetchBuilder.lambda$assemble$1(ObjectFetchBuilder.java:59)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
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:99)
at reactor.core.publisher.Mono.block(Mono.java:1710)
at me.itzg.helpers.http.ObjectFetchBuilder.execute(ObjectFetchBuilder.java:37)
at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:89)
at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:122)
at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:20)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at me.itzg.helpers.McImageHelper.main(McImageHelper.java:104)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (reactor.netty.ByteBufMono$ReleasingInputStream); line: 1, column: 2]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2418)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:749)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:673)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2784)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:907)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:793)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4817)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4723)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3714)
at me.itzg.helpers.http.ObjectFetchBuilder.lambda$assemble$1(ObjectFetchBuilder.java:57)
... 9 common frames omitted
+ log 'ERROR failed to auto-install CurseForge modpack'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-04-01 15:23:06+11:00 ERROR failed to auto-install CurseForge modpack
+ exit 1
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (10 by maintainers)
for information the CF_API_KEY not detect the third char “$” in the key to avoid that i just add an other “$” at this position and it’s work
Sorry to bounce back to this, I’ve not had to double up the $ signs in my docker compose file. I used single quotes initially and could not get the server to start.
I have it running without issue with the compose file configuration as below.
When I attempted this with single quotes it continued to fail with similar errors as to described in this thread.
I’ll do some further testing later today and see what I find.
@R15B FWIW I just now tested with
and the following
includes:
So, it appears single or double quotes make no difference either way.
$
's need to be doubled up to escape them.I actually did have it filled in, just removed it here because wasn’t sure if it should be private. I did also make sure to include the extra $ before each of its occurrences