emsm icon indicating copy to clipboard operation
emsm copied to clipboard

Forge worlds won't start after upgrade to Debian 9

Open SilkAndSlug opened this issue 5 years ago • 5 comments

I upgraded Debian (and Python) this weekend, and now my vanilla worlds start but my forge worlds don't -- and I can't find any output or logging to explain why!

root@jumbo:/# minecraft -w holiday worlds --start
    holiday:
         the world is now online
root@jumbo:/# minecraft -w holiday worlds --status
    holiday:
         offline

Htop shows lots of processes running vanilla, and zero running forge.

holiday.world.conf is:

[world]
stop_timeout = 10
stop_delay = 5
stop_message = The server is going down. Please save and quit!!
server = minecraft forge 1.12
start_command = java -Xms512m -Xmx2G -jar {server_exe} nogui

[plugin:initd]
enable = yes

[plugin:backups]

I've tried commenting-out that start_command line, then running minecraft -s 'minecraft forge 1.12' server --update, but the world still won't start.

worlds/holiday/logs/latest.log and debug.log have nothing since I rebooted at lunchtime.

log/emsm.log has many mentions of holiday. Specifically, initializing world, failed the guard test, and arguments for initializing:

[2019-07-18 22:54:29][INFO    ][argparse_                ] parsed arguments: Namespace(all_server=False, all_worlds=False, configuration=None, console=None, directory=None, force_restart=None, force_stop=None, kill=None, log=None, log_limit=None, log_start=None, pid=None, plugin='worlds', restart=None, send=None, server=[], start=None, status=1, stop=None, uninstall=None, verbose_send=None, worlds=['holiday'], worlds_address=None)

The files in /var/log are very noisy, but there's only one mention of emsm (in daemon.log AND syslog). The timestamp is today's reboot:

syslog:Jul 18 13:04:36 jumbo minecraft[1076]:  > Module     /usr/local/lib/python3.7/dist-packages/emsm/core/plugins.py
syslog:Jul 18 13:04:36 jumbo minecraft[1076]:  > Message:   [Errno 13] Permission denied: '/usr/local/lib/python3.7/dist-packages/emsm/plugins'

That directory is owned root:staff, permissions 02770. Minecraft is a member of staff.

EMSM was (re)installed with Pip3. Pip says the version is n.a.; emsm.log says 6.0.3b0.

Any ideas?

SilkAndSlug avatar Jul 18 '19 22:07 SilkAndSlug

I don't know if it's relevant but, after the upgrade/restart, guard --restart is ineffective. I get the emails, but the worlds aren't restarted. I manually started the Vanilla worlds, and now they don't show on guard's list, but the Forge worlds are still stopped.

SilkAndSlug avatar Jul 19 '19 12:07 SilkAndSlug

By adding lots of print() lines, I found that screen starts (thus returning 'online') but the new screen almost immediately terminates (thus later reporting 'offline').

Running a screen session myself, with this command:

screen -L -mS minecraft_holiday java -jar '/home/emsm/server/minecraft forge 1.12/forge-1.12-14.21.1.2405-universal.jar' nogui

Gives this output:

A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62)
    at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31)

Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot 
    be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
    at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    ... 6 more

I am rapidly leaving my comfort zone. Hopefully you, gentle reader, will know what I should do next!

SilkAndSlug avatar Jul 19 '19 21:07 SilkAndSlug

Google says that's a 'corrupted libraries' error, suggesting Forge has pulled in some bad files. Lex Manos says this should be impossible, as all libraries are checksummed. The installation log is attached, dated from my re-install yesterday.

tmp9r3pbequ.log

SilkAndSlug avatar Jul 19 '19 22:07 SilkAndSlug

I noticed the server was MC Forge 1.12, not 1.12.2 as in Issue #83. I've used the config from that and reinstalled; log is attached. The error is unchanged. Sad face. tmpm5gz9o81.log

SilkAndSlug avatar Jul 19 '19 22:07 SilkAndSlug

Fixed it!

Debian 9 changes the default Java JDK from v8 to v11.

Minecraft Forge 1.12 is not compatible with v11.

My fix was to create a command called java8 :

cd /usr/local/bin
ln -s /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java java8

And to specify that in the relevant world.conf :

cd /opt/minecraft/conf
nano holiday.world.conf

Add these lines:

[server:minecraft forge 1.12]
start_command = java8 -Xmx1G -jar {server_exe} nogui

And start & test the server:

minecraft -w holiday worlds --start
minecraft -w holiday worlds --status

The fixes would, I guess, be to:

  1. wait a few seconds during the start method, before testing the world's status;
  2. test the selected server & java version, then throw an exception e.g. "Forge 1.12 isn't compatible with Java 11; please configure the world's start_command accordingly"

SilkAndSlug avatar Jul 19 '19 22:07 SilkAndSlug