Closed ghost closed 2 years ago
Sorry for the huge delay in getting to this. Some modpacks have random or incompatible issues. Instead try this for the environment replacing TYPE and CF_SERVER_MOD:
TYPE: FORGE
VERSION: 1.18.2
FORGEVERSION: 40.1.68
GENERIC_PACK: /modpacks/Better+MC+Server+Pack+[FORGE]+v14.zip
I am running into a similar problem using the same modpack. The console output is as follows.
[+] Running 1/1
- Container BetterMC-server Recreated 0.1s
Attaching to BetterMC-server
BetterMC-server | [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 9 1000 1000 4096 Sep 7 07:59 /data'
BetterMC-server | [init] Resolved version given 1.18.2 into 1.18.2 and major version 1.18
BetterMC-server | [init] Resolving type given FORGE
BetterMC-server | [init] Checking Forge version information.
BetterMC-server | [init] Checking if generic packs are up to date
BetterMC-server | [init] Generic pack(s) are out of date. Re-applying...
BetterMC-server | [init] Manifest exists from older generic pack, cleaning up ...
BetterMC-server | [init] Writing generic pack manifest ...
BetterMC-server | [init] Applying generic pack ...
BetterMC-server | [init] Saving generic pack(s) checksum
BetterMC-server exited with code 1
BetterMC-server | [init] Resolved version given 1.18.2 into 1.18.2 and major version 1.18
BetterMC-server | [init] Resolving type given FORGE
Gracefully stopping... (press Ctrl+C again to force)
[+] Running 1/1
- Container BetterMC-server Stopped 11.2s
canceled
PS C:\Users\dwill\projects\Minecraft_Server\forge_minecraft>
I also tried using the "java8-jdk" tag as I read forge doesn't work with latest sometimes (although my version should be new enough) and got this output instead.
[+] Running 1/0
- Container BetterMC-server Recreated 0.1s
Attaching to BetterMC-server
BetterMC-server | [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 9 1000 1000 4096 Sep 7 08:03 /data'
BetterMC-server | [init] Resolved version given 1.18.2 into 1.18.2 and major version 1.18
BetterMC-server | [init] Resolving type given FORGE
BetterMC-server | [mc-image-helper] 08:06:08.827 INFO : Removing previously installed files due to version change from MC 1.19.2/Forge 43.1.1 to MC 1.18.2/Forge 40.1.68
BetterMC-server | [mc-image-helper] 08:06:08.847 INFO : Downloading Forge installer 40.1.68 for Minecraft 1.18.2
BetterMC-server | [mc-image-helper] 08:06:12.654 INFO : Running Forge installer. This might take a while...
BetterMC-server | [init] Removing old mods including:*.jar,*-version.json excluding:
BetterMC-server | [init] Checking if generic packs are up to date
BetterMC-server | [init] Generic pack(s) are out of date. Re-applying...
BetterMC-server | [init] Manifest exists from older generic pack, cleaning up ...
BetterMC-server | [init] Writing generic pack manifest ...
BetterMC-server | [init] Applying generic pack ...
BetterMC-server | [init] Saving generic pack(s) checksum
BetterMC-server | [init] server.properties already created, skipping
BetterMC-server | [init] Updating ops
BetterMC-server | [init] merryfistmas already present in ops.json, skipping
BetterMC-server | [init] Checking for JSON files.
BetterMC-server | [init] Setting initial memory to 1G and max to 8G
BetterMC-server | [init] Using Forge supplied run.sh script...
BetterMC-server | Error: Could not find or load main class @user_jvm_args.txt
BetterMC-server | 2022-09-07T08:06:48.103Z WARN mc-server-runner Minecraft server process failed {"exitCode": 1}
BetterMC-server | 2022-09-07T08:06:48.103Z INFO mc-server-runner Done
BetterMC-server exited with code 1
BetterMC-server | [init] Resolved version given 1.18.2 into 1.18.2 and major version 1.18
Gracefully stopping... (press Ctrl+C again to force)
[+] Running 1/1
- Container BetterMC-server Stopped 11.1s
canceled
This line
Error: Could not find or load main class @user_jvm_args.txt
appears to be the problem, however a file with this name generated in my docker volume. The contents of the file is:
-Xmx8G -Xms1G
This is my docker-compose.yml
version: "3.8"
services:
minecraft:
image: itzg/minecraft-server:latest
#image: itzg/minecraft-server:java8-jdk
volumes:
- radminecraftdata:/data
- .\extras:/extras
container_name: BetterMC-server
ports:
- 25556:25566
environment:
OPS: merryfistmas
SERVER_NAME: "Dockerized-Minecraft-Server"
MOTD: "Better MC Server"
EULA: "TRUE"
#VERSION: "1.19.2"
#TYPE: "CURSEFORGE"
#CF_SERVER_MOD: /extras/BetterMC_ServerPack_FORGE_1.16.5_v58.5.zip
TYPE: FORGE
VERSION: 1.18.2
FORGEVERSION: 40.1.68
GENERIC_PACK: /extras/BetterMC_ServerPack_FORGE_1.16.5_v58.5.zip
MODE: "survival"
INIT_MEMORY: 1G
MAX_MEMORY: 8G
LEVEL_TYPE: "DEFAULT"
DIFFICULTY: "hard"
VIEW_DISTANCE: "24"
ENABLE_RCON: "true"
RCON_PASSWORD: password
RCON_PORT: 25576
SERVER_PORT: 25566
ENABLE_WHITELIST: "true"
ENFORCE_WHITELIST: "true"
MAX_PLAYERS: 20
ANNOUNCE_PLAYER_ACHIEVEMENTS: "true"
SPAWN_ANIMALS: "true"
SPAWN_MONSTERS: "true"
PVP: "true"
GUI: "FALSE"
REMOVE_OLD_MODS: "true"
stdin_open: true
tty: true
restart: unless-stopped
volumes:
radminecraftdata:
external: true
data: {}
The commented lines are other variables I've tried to get it to work. I have also tried the RAD server mod as well and it gives me the same error codes so I'm not convinced it's the fault of the mod. Do you know what the problem could be?
Make sure to pull the latest image. An issue in that exact spot was fixed recently.
Also, you can't use Java 8 with Minecraft 1.18+, which is why you saw the other error.
I got it working. I looked at run.sh and changed the minecraft and forge versions to match it. The mod page in curseforge also tells you what version to use, so it turns out I just needed to read the mod page. I did have to use java8-jdk. I'll leave my docker-compose.yml here in case anyone else runs into a similar problem.
version: "3.8"
services:
minecraft:
image: itzg/minecraft-server:java8-jdk
volumes:
- BetterMCdata:/data
- .\extras:/extras
container_name: BetterMC-server
ports:
- 25566:25566
environment:
OPS: merryfistmas
SERVER_NAME: "Dockerized-Minecraft-Server"
MOTD: "Better MC Server"
EULA: "TRUE"
VERSION: 1.16.5
FORGEVERSION: 36.2.39
TYPE: FORGE
GENERIC_PACK: /extras/BetterMC_ServerPack_FORGE_1.16.5_v58.5.zip
MODE: "survival"
INIT_MEMORY: 1G
MAX_MEMORY: 8G
LEVEL_TYPE: "DEFAULT"
DIFFICULTY: "hard"
VIEW_DISTANCE: "24"
ENABLE_RCON: "true"
RCON_PASSWORD: password
RCON_PORT: 25576
SERVER_PORT: 25566
ENABLE_WHITELIST: "true"
ENFORCE_WHITELIST: "true"
MAX_PLAYERS: 20
ANNOUNCE_PLAYER_ACHIEVEMENTS: "true"
SPAWN_ANIMALS: "true"
SPAWN_MONSTERS: "true"
PVP: "true"
GUI: "FALSE"
REMOVE_OLD_MODS: "true"
stdin_open: true
tty: true
restart: unless-stopped
volumes:
BetterMCdata:
external: true
data: {}
Resolved by #1762
Describe the problem
I have been trying to start a curseforge server and using Better MC 1.18.2 (Forge) server pack to run it but everytime I try to run it I run into this error message
2022-07-21T22:16:56.506Z WARN mc-server-runner Minecraft server process failed {"exitCode": 2}
Here is the link to the said modpack: https://www.curseforge.com/minecraft/modpacks/better-mc-modpack-new
Docker Logs (I replaced names with dots besides my own or privacy):
Docker-compose file (I replaced names with dots besides my own or privacy) :
Container definition
Container logs