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

AUTO_CURSEFORGE - Error after backup restores #3328

Open
brimdor opened this issue Feb 18, 2025 · 4 comments
Open

AUTO_CURSEFORGE - Error after backup restores #3328

brimdor opened this issue Feb 18, 2025 · 4 comments

Comments

@brimdor
Copy link

brimdor commented Feb 18, 2025

A clean setup works great. If the application is removed and added back fresh but there is a backup that can be restored, it will fail every time in the main pod/container.
This creates a crashloopback and the server never starts up.
My guess is the restore of the backup is lacking some data that it doesn't know what to do. I think it might be fixed if we could force a reinstall of the forge mod loader every time it boots up. Takes longer to boot but its worth it.
Could also tackle the issue of the possible missing files that don't get backed up. I turned off any exclusions by the way. So it should be getting everything from /data and it looks like it does when I compare the data.

[mc-image-helper] 21:28:51.153 INFO  : Forge version 47.3.0 for minecraft version 1.20.1 is already installed
[init] Setting mode
[mc-image-helper] 21:28:52.982 INFO  : Created/updated 1 property in /data/server.properties
[init] Setting initial memory to 12G and max to 12G
[init] Using Forge supplied run.sh script...
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-exports
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-opens
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-opens
Error: Could not find or load main class cpw.mods.bootstraplauncher.BootstrapLauncher
Caused by: java.lang.ClassNotFoundException: cpw.mods.bootstraplauncher.BootstrapLauncher
2025-02-18T21:28:53.154Z	WARN	mc-server-runner	Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.	{"exitCode": 1}
2025-02-18T21:28:53.154Z	INFO	mc-server-runner	Done
@itzg
Copy link
Owner

itzg commented Feb 18, 2025

Ah that's because the .forge-manifest.json file got backed up but not the actual content of Forge. It was dry difficult to track the installed files and to do an integrity check of Forge.

Could also temporarily set CF_FORCE_REINSTALL_MODLOADER to true.

@itzg itzg transferred this issue from itzg/mc-image-helper Feb 18, 2025
@brimdor
Copy link
Author

brimdor commented Feb 19, 2025

oh wow! I was not expecting such a quick response. Only because I'm sure you're a busy person with all the awesome repos you keep up with.

Adding CF_FORCE_REINSTALL_MODLOADER to the values.yaml and deployment.yaml appear to have fixed the issue. This indeed reinstalls forge on every reboot of the pod which prevents any issues of missing files. I like this because it will keep the backups size smaller as it doesn't need to store all the mods and forge files as long as it has the manifest and minecraft data files, we are good to go. Thank you @itzg

What are your thoughts on adding that force reinstall env var as an option in the helm charts going forward?

@itzg
Copy link
Owner

itzg commented Feb 19, 2025

Glad to hear that helped.

As for the helm chart, there already is support for any of the env vars via extraEnv

https://github.com/itzg/minecraft-server-charts/blob/master/charts/minecraft/values.yaml#L421

The chart has become bloated with too many specialized options that hinder maintainability, so that extraEnv is the path going forward.

@brimdor
Copy link
Author

brimdor commented Feb 19, 2025

That makes sense. I'll stick to the extraEnv
Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants