[Resolved] Vanilla 1.12 works, but no other version

I’ve got a couple issues, but lets run one thing at a time.

The first is that I created a vanilla 1.11 instance and attempted to connect

Failed to connect to the server
Internal Exception: java.IOException: An existing connection was forcibly closed by the remote host

Thinking it was an iptables issue (Ubuntu 16.04), I cleared out the filters, restarted server and client services, and received the same result.

Here’s my filters:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http-alt
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8443
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere             tcp dpts:25568:25570
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh
ACCEPT     udp  --  anywhere             anywhere             udp spt:4445
ACCEPT     all  --  anywhere             anywhere

I also installed vanilla 1.12.2, and was able to connect to it with no problem, even after I reset my iptables. So, I don’t think its a firewall issue since I can run vanilla 1.12.2, SSH, and FTP into the server just fine.

Nothing significant was recorded in the log, and a crash log was not created. I verified the client is running the latest version of 1.11.2, too.

Another odd thing occurred. I found the above issue after I was unable to get an instance of Forge 1.11.2 running. After getting vanilla 1.11.2 run for the first time for EULA and scaffolding, I ran the instance using the 1.11.2-recommended for the install, and then switched over to the -universal release. For some reason, the start button doesn’t want to start the instance.

For Forge, the /var/log/mineos.log shows the events. The error only shows if I don’t assign an IP address in the server.properties.

{"level":"info","message":"[ForgeCraft] 192.168.0.107 issued command : \"start\"","timestamp":"2017-10-03T03:34:17.351Z"}
{"level":"info","message":"[ForgeCraft] received request \"start\"","timestamp":"2017-10-03T03:34:17.354Z"}
{"level":"error","message":"Cannot bind broadcaster to ip ","timestamp":"2017-10-03T03:34:19.491Z"}
{"level":"info","message":"[ForgeCraft] 192.168.0.107 issued command : \"modify_sp\"","timestamp":"2017-10-03T03:36:48.686Z"}
{"level":"info","message":"[ForgeCraft] received request \"modify_sp\"","timestamp":"2017-10-03T03:36:48.691Z"}
{"level":"info","message":"[ForgeCraft] 192.168.0.107 issued command : \"start\"","timestamp":"2017-10-03T03:37:00.381Z"}
{"level":"info","message":"[ForgeCraft] received request \"start\"","timestamp":"2017-10-03T03:37:00.382Z"}

No further logs were created in the server, to include crash logs.

Here’s some system information:

npm: 3.10.10
nodejs: v6.11.3
java: openjdk version "9-internal"
git commit: d529e70

port: 25568 - 1.11.2
port: 25569 - 1.12.2
port: 25570 - Forge 1.11.2

My end state goal is to migrate from my other server to this more robust hardware. Even after failing Forge above, I tried to bring a copy of an archived server over to this instance, but I was presented with the same results.

UPDATE:
I created a Forge server using the latest build, but I still received no response from the start button.

I also compared the file structure and properties between both servers (old and new) /var/games/minecraft. after making the few changes (the MC servers were being built with a custom group on one and the minecraft group on the other), I ran systemctl restart mineos and tested, resulting the same.

Are you filling in the server-ip fields of your servers in server.properties or leaving them blank?

I did at first, which is what produced the bind error. You’ll see the modification to the properties file and then an attempt at the end to try to re-start the instance.

Start with IP:

 {"level":"info","message":"[ForgeCraft] 192.168.0.107 issued command : \"start\"","timestamp":"2017-10-03T03:34:17.351Z"}
{"level":"info","message":"[ForgeCraft] received request \"start\"","timestamp":"2017-10-03T03:34:17.354Z"}
{"level":"error","message":"Cannot bind broadcaster to ip ","timestamp":"2017-10-03T03:34:19.491Z"}

server.properties modification to remove IP

{"level":"info","message":"[ForgeCraft] 192.168.0.107 issued command : \"modify_sp\"","timestamp":"2017-10-03T03:36:48.686Z"}
{"level":"info","message":"[ForgeCraft] received request \"modify_sp\"","timestamp":"2017-10-03T03:36:48.691Z"}

Start without IP:

{"level":"info","message":"[ForgeCraft] 192.168.0.107 issued command : \"start\"","timestamp":"2017-10-03T03:37:00.381Z"}
{"level":"info","message":"[ForgeCraft] received request \"start\"","timestamp":"2017-10-03T03:37:00.382Z"}

Can you confirm these servers start up using the Java9 straight from the command line?

Your first error is a java-related issue and this is the first time I’ve heard of somebody using Java 9, so that would be the first place to start, I think.

Running a server from the command line will allow you to see much of the screen output that MineOS shields from you (because most of the time, what you need is the logging – which is shown – versus the stderr).

You mentioned this is the first run with Java 9, so I did a bit of reading. https://www.reddit.com/r/Minecraft/comments/461su2/java_8_or_java_9/

I ran the Vanilla 1.11.2 instance successfully. In MC, I added a server using the 192.168.0.102:25568 address as noted above. Initially, it responded with a ping issue. So I allowed incoming and outgoing ping requests and replies.

iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d 192.168.0.102 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 0 -s 192.168.0.102 -d 0/0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 8 -s 192.168.0.102 -d 0/0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -s 0/0 -d 192.168.0.102 -m state --state ESTABLISHED,RELATED -j ACCEPT

Manually started the vanilla instance with java -jar minecraft_server.1.11.2.jar -Xmx:4G -Xms:1G

[16:50:38] [Server thread/INFO]: Starting minecraft server version 1.11.2
[16:50:38] [Server thread/INFO]: Loading properties
[16:50:38] [Server thread/INFO]: Default game type: SURVIVAL
[16:50:38] [Server thread/INFO]: Generating keypair
[16:50:39] [Server thread/INFO]: Starting Minecraft server on 192.168.0.102:25568
[16:50:39] [Server thread/INFO]: Using epoll channel type
[16:50:40] [Server thread/INFO]: Preparing level "world"
[16:50:41] [Server thread/INFO]: Preparing start region for level 0
[16:50:42] [Server thread/INFO]: Preparing spawn area: 13%
[16:50:43] [Server thread/INFO]: Preparing spawn area: 92%
[16:50:43] [Server thread/INFO]: Done (2.302s)! For help, type "help" or "?"
[16:52:38] [Server thread/INFO]: Stopping the server
[16:52:38] [Server thread/INFO]: Stopping server
[16:52:38] [Server thread/INFO]: Saving players
[16:52:38] [Server thread/INFO]: Saving worlds
[16:52:38] [Server thread/INFO]: Saving chunks for level 'world'/Overworld
[16:52:38] [Server thread/INFO]: Saving chunks for level 'world'/Nether
[16:52:38] [Server thread/INFO]: Saving chunks for level 'world'/The End
[16:52:38] [Server Shutdown Thread/INFO]: Stopping server
[16:52:38] [Server Shutdown Thread/INFO]: Saving players

Same results with the IP address being specified and blank in he server.properties file.

So no luck yet.

Inmy servers all the IP adresses are set to 0.0.0.0, so they listen to connections on any ip connection available. That is also the default setting. I simply do not change it when I start a new server.

I just tried running all these on a server with Java9. Results:

Java9 with forge-universal:

mc@mineos servers/zfffff$ java -jar forge-1.12.1-14.22.1.2478-universal.jar
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:564)
        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: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        ... 6 more

The error seems to be completely in line with this post:

Java 9 brings many changes which are incompatible with things in forge. When the time comes (i.e. when Java 9 is officially released) those will be fixed.


Java9 with vanilla: WORKS


Java9 with FTB Beyond 1.10

mc@mineos servers/beyond$ java -jar FTBserver-1.10.2-12.18.3.2316.jar
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:564)
        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: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        ... 6 more

(same error)

It appears that fundamental changes to Java9 are causing the incompatibilities here. I think Java9 will need to be out for longer while authors determine if/when they want to get it working. In the meantime…Java 9 seems a bit premature to adopt IMO.

This non-starting from the command-line will also explain the seemingly non-functioning use of the start button in the webui.

Caused by: java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader

According to the blogosphere, it’s because AppClassLoader is evidently no longer subclassed from ClassLoader, causing all sorts of disarray (but probably has some merit to warrant the change). It appears almost unanimously that overcoming this issue might require pretty hefty rewrites from JAR authors themselves.

I downgraded from openJDK9 to openJDK8.

vanilla 1.11.2 started; successfully logged into server as player
vanilla 1.12.2 started; successfully logged into server as player

Since I don’t have a local version of Forge in the -latest and -recommended, I went ahead and imported the instance from my old server. It started normally after updating the port and IP address, and I was successfully able to connect to the server.

The downgrade to Java 8 seems to be the fix

In the meantime…Java 9 seems a bit premature to adopt IMO.

I concur. It seems like there’s going to be some heavy lifting of MineOS in the future.

Topic renamed and category changed to Java.

You’re a good man Charlie Brown.

1 Like