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

Forge: Missing required library #344

Open
xadox-1st opened this issue Aug 14, 2024 · 2 comments
Open

Forge: Missing required library #344

xadox-1st opened this issue Aug 14, 2024 · 2 comments

Comments

@xadox-1st
Copy link

xadox-1st commented Aug 14, 2024

MSCS running in an Ubuntu 22.04.4 LTS LXC on Proxmox.

After setting up forge (tried several forge releases >=1.17.1) with the manual:
https://minecraftservercontrol.github.io/docs/mscs/adjusting-world-server-properties/forge

I am not able to start the forge server.
Most of the forge libraries can not be found. here is an snippet from the console.out:

...
Missing required library: org/ow2/asm/asm/9.7/asm-9.7.jar
Missing required library: org/ow2/asm/asm-analysis/9.7/asm-analysis-9.7.jar
Missing required library: org/ow2/asm/asm-commons/9.7/asm-commons-9.7.jar
Missing required library: org/ow2/asm/asm-tree/9.7/asm-tree-9.7.jar
Missing required library: org/ow2/asm/asm-util/9.7/asm-util-9.7.jar
Missing required library: org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.jar
...

All of the are under "/opt/mscs/server/forge-VERSION/libraries"

cat mscs.properties:

mscs-enabled=true
mscs-client-version=1.21.1
mscs-server-version=1.21.1
mscs-server-command=/opt/mscs/server/forge-1.21.1-52.0.2/run.sh
mscs-server-url=

cat ../forge-1.21.1-52.0.2/libraries/net/minecraftforge/forge/1.21.1-52.0.3/unix_args.txt

-Djava.net.preferIPv6Addresses=system -jar /opt/mscs/server/forge-1.21.1-52.0.2/forge-1.21.1-52.0.3-shim.jar

cat run.sh

#!/usr/bin/env sh
# Add custom JVM arguments (such as RAM allocation) to the user_jvm_args.txt

java -jar /opt/mscs/server/forge-1.21.1-52.0.2/forge-1.21.1-52.0.3-shim.jar --onlyCheckJava || exit 1

# Add custom program arguments (such as nogui) to the next line before the --nogui "$@" or pass them to this script directly
java @/opt/mscs/server/forge-1.21.1-52.0.2/user_jvm_args.txt @/opt/mscs/server/forge-1.21.1-52.0.2/libraries/net/minecraftforge/forge/1.21.1-52.0.3/unix_args.txt --nogui "$@"

@sandain
Copy link
Member

sandain commented Aug 20, 2024

If I remember right, the libraries folder needs to be in the world folder. This allows for each world to have a separate set of libraries disconnected from the server setup. I think a soft link in the world folder to your current setup would also work.

ln -s /opt/mscs/server/forge-1.21.1-52.0.2/libraries /opt/mscs/worlds/WORLDNAME/libraries

If this is indeed the issue, we should update the documentation. If you feel comfortable submitting a patch for the documentation, I would appreciate it.

@Redmage753
Copy link

If I remember right, the libraries folder needs to be in the world folder. This allows for each world to have a separate set of libraries disconnected from the server setup. I think a soft link in the world folder to your current setup would also work.

ln -s /opt/mscs/server/forge-1.21.1-52.0.2/libraries /opt/mscs/worlds/WORLDNAME/libraries

If this is indeed the issue, we should update the documentation. If you feel comfortable submitting a patch for the documentation, I would appreciate it.

This fixed it for me - almost identical setup, just using mscs with debian lxc on proxmox. I also had to manually add /opt/mscs/server/forge-1.21.1-52.0.8/ before every forge-1.21.1-52.0.8-shim.jar reference. I retried the sed commands/deleted the files and reinstalled, cloned backups and ran each one individually.

I ended up adding it in two places:
/opt/mscs/server/forge-1.21.1-52.0.8/run.sh
java -jar forge-1.21.1-52.0.8-shim.jar --onlyCheckJava || exit 1
to
java -jar /opt/mscs/server/forge-1.21.1-52.0.8/forge-1.21.1-52.0.8-shim.jar --onlyCheckJava || exit 1
and
/opt/mscs/server/forge-1.21.1-52.0.8/libraries/net/minecraftforge/forge/1.21.1-52.0.8/unix_args.txt
-Djava.net.preferIPv6Addresses=system -jar forge-1.21.1-52.0.8-shim.jar
to
-Djava.net.preferIPv6Addresses=system -jar /opt/mscs/server/forge-1.21.1-52.0.8/forge-1.21.1-52.0.8-shim.jar

I will try to submit a documentation patch later, unless I see this issue close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants