Score:2

Minecraft Server Error

eg flag

I followed the guide exactly on this site to install a Minecraft server on my Ubuntu Server 20.04 system, and I get the following output using the commands shown:

owner@mk-dell-t110:~$ sudo systemctl start minecraft@survival
owner@mk-dell-t110:~$ sudo systemctl status minecraft@survival
● [email protected] - Minecraft Server: survival
     Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2021-09-26 04:46:11 UTC; 23s ago
    Process: 583600 ExecStart=/usr/bin/screen -DmS mc-survival /usr/bin/java -Xmx4G -jar minecraft_server.jar nogui (code=exited, status=0/SUCCE>
    Process: 583619 ExecStop=/usr/bin/screen -p 0 -S mc-survival -X eval stuff "say SERVER SHUTTING DOWN IN 5 SECONDS. SAVING ALL MAPS..."^M (co>
   Main PID: 583600 (code=exited, status=0/SUCCESS)

Sep 26 04:46:11 mk-dell-t110 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 5.
Sep 26 04:46:11 mk-dell-t110 systemd[1]: Stopped Minecraft Server: survival.
Sep 26 04:46:11 mk-dell-t110 systemd[1]: [email protected]: Start request repeated too quickly.
Sep 26 04:46:11 mk-dell-t110 systemd[1]: [email protected]: Failed with result 'exit-code'.
Sep 26 04:46:11 mk-dell-t110 systemd[1]: Failed to start Minecraft Server: survival.
owner@mk-dell-t110:~$ journalctl -u [email protected]
-- Logs begin at Thu 2021-09-23 21:52:02 UTC, end at Sun 2021-09-26 04:46:37 UTC. --
Sep 26 00:25:48 mk-dell-t110 systemd[1]: Started Minecraft Server: survival.
Sep 26 00:25:48 mk-dell-t110 screen[558000]: No screen session found.
Sep 26 00:25:48 mk-dell-t110 systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Sep 26 00:25:48 mk-dell-t110 systemd[1]: [email protected]: Failed with result 'exit-code'.
Sep 26 00:25:48 mk-dell-t110 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
Sep 26 00:25:48 mk-dell-t110 systemd[1]: Stopped Minecraft Server: survival.
Sep 26 00:25:48 mk-dell-t110 systemd[1]: Started Minecraft Server: survival.
Sep 26 00:25:48 mk-dell-t110 screen[558027]: No screen session found.
Sep 26 00:25:48 mk-dell-t110 systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Sep 26 00:25:48 mk-dell-t110 systemd[1]: [email protected]: Failed with result 'exit-code'.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 2.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: Stopped Minecraft Server: survival.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: Started Minecraft Server: survival.
Sep 26 00:25:49 mk-dell-t110 screen[558049]: No screen session found.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Sep 26 00:25:49 mk-dell-t110 systemd[1]: [email protected]: Failed with result 'exit-code'.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 3.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: Stopped Minecraft Server: survival.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: Started Minecraft Server: survival.
Sep 26 00:25:49 mk-dell-t110 screen[558072]: No screen session found.
Sep 26 00:25:49 mk-dell-t110 systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Sep 26 00:25:49 mk-dell-t110 systemd[1]: [email protected]: Failed with result 'exit-code'.
owner@mk-dell-t110:~$ 

I am new to Ubuntu Server, so I apologize if this isn't very helpful in diagnosing errors. Like I said, I followed the linked guide exactly up until the part labeled "Provision new Minecraft server instance on the same host". I only want the one Minecraft server as of right now.

Update: I just tried to run the server manually with the java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui command, and this is the output:

owner@mk-dell-t110:/opt/minecraft/survival$ ls
eula.txt  minecraft_server.jar
owner@mk-dell-t110:/opt/minecraft/survival$ java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Error: LinkageError occurred while loading main class net.minecraft.server.Main
    java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 55.0
owner@mk-dell-t110:/opt/minecraft/survival$ 

This is right after I tried to check to make sure I have Java installed by using the command sudo apt install wget screen default-jdk nmap from the website tutorial (previously linked above) I followed to get this far.

ru flag
We need the output of `journalctl -u [email protected]`. This will get us *all* the error output. The command and screenshot you showed is only a *single* log indicating it's crashing and restarting too quickly, which isn't the ACTUAL error - we can get the actual error from `journalctl` if we go back further. Copy and paste output into your post as an edit and use code fences. (Or just paste your code in as an edit without formatting, and let one of us go through and apply the formatting if you don't know what code fences or code formatting is here on Ask Ubuntu)
lordoftimelords avatar
eg flag
@Nmath Thank you for the advice. I fixed the link, which should hopefully give more context. I apologize for the original incorrect formatting. I have since fixed it (at least I hope). Please let me know if anything else needs to be clarified or edited. As you can tell, I am new to this site and Ubuntu Server.
lordoftimelords avatar
eg flag
@ThomasWard I have since added the output of 'journalctl -u [email protected]'. If there is anything else I should add please let me know.
ru flag
You need a newer Java on your computer - the version of Java that is used in Minecraft's `.jar` is newer than the version of Java on your system.
Score:1
eg flag

I added the Java repository with sudo add-apt-repository ppa:linuxuprising/java, then used sudo apt-get update, and finally used sudo apt install openjdk-17-jdk to get the newest version of Java. I then proceeded to run the server and the status shows that it is working. I also am able to connect from my Minecraft client.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.