Unable to access Jarfile

Hi, this is my first time establishing a Minecraft server and my second time using linux for anything.

I have set up MineOS on my laptop, accessed it by webUI and psftp, imported the archive for the game I had running before. The Start button doesn’t work on the webUI, and when I go into psftp to start the server I get this error:

Unable to access jarfile minecraft_server.1.15.2.jar

So far I have tried renaming the jar file, re-downloading it, and using different arguments in the process of opening it. The command I normally would use is:

java -Xmx1024M -Xms1024M -jar minecraft_server.1.15.2.jar nogui

I am not getting any logs that I can see, and there are no additional messages like I saw in this post: Unable to start any server

Should I be checking java for updates or something? How can I find the problem?

Thank you

EDIT: I just checked the Profiles page and when I clicked the button to download 1.15.2 I got a 403 error. The most recent profile I’m able to download is 1.12.2 - this also does not run and gives the same error.

This is a really odd combination of errors you’re reporting.

On one hand, getting a HTTP 403 Forbidden error is a foreign server error indicating that you’re requesting a download you’re not authorized to get. Of course, the profiles you’re downloading are all public URLs so 403 shouldn’t ever show up.

Can you share the file /var/log/mineos.log?

You’re running this from the command line? Because MineOS is just a front-end, so indeed we can do a lot of troubleshooting outside of the webui, in the terminal.

What is the actual output you get when you attempt to run the server manually with such a command?

Well, I’m trying to use sftp to get the log but I’m getting local: unable to open mineos.log

Going into the laptop running MineOS, I closed the menu and went into the command line as root, then as mc, and checked mineos.log and it showed a ton of stuff. The problem there is I don’t know how to send it to you using the terminal.

As for the second part, I am running that via putty so I’m pretty sure that’s the command line. When I run that, the only thing that ever shows up is “Unable to access jarfile minecraft_server.1.15.2.jar”

I’m going to keep trying to get you that log, as well as try to find solutions. Thank you for your time!

EDIT: Using my laptop directly instead of Putty, I entered the command to start the server and got

Error: Invalid or corrupt jarfile minecraft.1.15.2.jar

I tried switching to server.jar, which I ran from my desktop and know works, and got:

Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/MinecraftServer: Unsupported major.minor version 52.0

   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
   at java.security.AccessController.doPriveleged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
   at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

I have read that using a name that doesn’t follow the minecraft_server...* format can cause issues. Also I typed all that out manually so I apologize for any errors

EDIT 2: Looking around it seems that I have to update Java. I’ve tried multiple methods to no avail. The system doesn’t recognize sudo or apt, updates frequently encounter 404 errors, I unpacked a Java 8 tar.gz but the system still says it has Java 1.7.0_95. Any guidance in this would be greatly appreciated.

My guess is you’re somehow requesting to find /var/log/mineos.log on your local machine, and not on your remote server (MineOS).

When you run it how?

This is not the case. Any server file can be called literally anything, so that’s nothing to worry about.

This is exactly the issue, indeed. It corresponds to:

You do need to upgrade your Java to 1.8 for 1.15.2.

When you’re running into issues, providing the input and the output is the only way for us to help troubleshoot.

I assume you’re running MineOS Turnkey because you labelled the thread with it, so the easiest thing to do is:

  1. log in as root on your server terminal. This makes sudo no longer necessary.
  2. apt-get definitely, 100% should work when you’re running as root.

I don’t know how old your installation is, though. Because MineOS Turnkey based on Debian “Stretch” already has Java 1.8. If this is a new install, you shouldn’t have downloaded Jessie (which has Java 1.7). If this is a new install, start over by downloading the new ISO.

If you don’t feel like using a new ISO, follow instructions like here:

That’s because Linux follows an order to find the first available Java path. Right now, Java 1.7 exists in system paths and wherever you extracted Java 8 is not preceding it in order

Thank you again, I’m going to reinstall with the “stretch” version and hopefully that will fix it.

I’ll update later, and if I run into any future problems I’ll be sure to give all of the information in the preferred way.

1 Like