hexparrot / mineos-node

node.js implementation of mineos minecraft management
GNU General Public License v3.0
336 stars 172 forks source link

unable to start server using 1.17 jar #410

Open SmokySauce opened 3 years ago

SmokySauce commented 3 years ago

I am unable to boot my server when I have the 1.17 profile selected with the 1.17 server jar also selected. When I select start simply nothing happens. I suspect it has something to do with 1.17 Minecraft transitioning over to java 16, although I'm not quite sure. Any help would be appreciated.

SmokySauce commented 3 years ago

I have found the issue. It is indeed the java version not being 16, although I have not been able to find a way to change the java version to 16 from 8. If anyone knows an easy way for me to be able to do this, I would love to know because I appreciate the easiness of the mineos WebUI. Thanks.

Altonymous commented 3 years ago

I too am having this issue and would love a way to update the Java version.

flareofghast commented 3 years ago

This has been discussed on discourse.codeemo.com Search for ‘update java’ or similar. You may need to google it for your particular linux version.

Sent from my iPhone

On 10 Jun 2021, at 3:06 am, Chris Altman @.***> wrote:

 I too am having this issue and would love a way to update the Java version.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fegkay15 commented 3 years ago

Be aware, "Update Java" isn't necessarily a cut and dry solution for all. If you update Java to Java 16, a lot if not most modpacks for 1.16 and prior will not work. So if you are maintaining two or more servers, you won't be able to have anything but 1.17 after you update Java. We honestly need a way to change or specify which JRE we need our servers to be running as suggested by #396

DROPLOTHUB commented 3 years ago

how would u change the java 8 to java 16 on true nas

fegkay15 commented 3 years ago

how would u change the java 8 to java 16 on true nas

Not sure how different it is, but I followed this guide for my MineOS Turnkey Server: https://pastebin.com/HeMGyudw

thedesalizes commented 3 years ago

how would u change the java 8 to java 16 on true nas

aight so this worked for me

in mineos jail shell

pkg install openjdk16

thedesalizes commented 3 years ago

But also if you happen to be running minecraft servers with older versions, be careful when doing this. My server from 1.16.2 is no longer able to run for the time being. chrome_9l686hW18j

edit: looks like spigot also wrote about the issue here https://www.spigotmc.org/threads/spigot-bungeecord-1-17.510208/

filter-visor commented 3 years ago

I haven't seen any mention of how to update java for the docker anywhere. Pardon my ignorance, but shouldn't this best be done at the hub? If we update java manually in our docker, won't the next update wipe out our changes? If not, any pointers on how those of us who are running the hexparrot docker in unraid can update java?

hexparrot commented 3 years ago

https://github.com/hexparrot/mineos-node/commit/6bbfd69aa018cda34d2d2d8c3c47cde5da7dd2fe

This feature has existed since the beginning of time, but was woefully undocumented. This allows for the manual assignment of any java binary on your system. With this addition, server.config has a new line: [java] java_binary=

Set this to the full path of your newer/older Java download and you should be set to go.

I will be examining this over the next few days to see how it might be cleanly added to the webui itself.

MichaIng commented 3 years ago

Would it be possible to respect (and pass through) JAVA_HOME? This way the used Java version can be controlled on service level and it would be even possible, in theory, to run a Java 14- and a Java 16+ MineOS UI instance for Minecraft v1.16- and Minecraft v1.17+ instances 🙂.

hexparrot commented 3 years ago

It's my understanding that the java binary is able to handle 100% of use cases with nothing more than invoking the binary (and ensuring the original tree structure is intact). Can you explain more what JAVA_HOME will do re: service level? I'm more than happy to explore with you some way to improve this for your use and for the overall design, but it's my impression that JAVA_BINARY would do everything JAVA_HOME would do.

MichaIng commented 3 years ago

Ah yes, probably the JAVA_BINARY would do as well, generally supporting (one of the) official Java environment variables instead of only a config option would be nice. I'm no Java expert but JAVA_HOME on first view seems more consequent, as the Java directory contains a large number of files provided in defined sub directories within JAVA_HOME, so potentially it would avoid conflicts and/or enable more features to set JAVA_HOME, instead of (only) JAVA_BINARY to avoid having both set to different Java versions. But you'll know better if it plays a role for MineOS and/or Minecraft in general or not.

filter-visor commented 3 years ago

I haven't seen any mention of how to update java for the docker anywhere. Pardon my ignorance, but shouldn't this best be done at the hub? If we update java manually in our docker, won't the next update wipe out our changes? If not, any pointers on how those of us who are running the hexparrot docker in unraid can update java?

I can confirm that anytime the docker restarts, the java upgrade is undone and reverts back to 8. How do we make this persist? Or does this need to be done at the docker hub?

hexparrot commented 3 years ago

@filter-visor I'll have to see how to keep multiple versions of Java installed via apt. apt-alternatives I think it's called, and then indeed, having parallel java versions from the getgo is the goal.

flareofghast commented 3 years ago

Can we just have multiple versions in folders and point to that binary? This is what I am looking at at the moment.

Sent from my iPhone

On 26 Jun 2021, at 2:31 am, William Dizon @.***> wrote:

 @filter-visor I'll have to see how to keep multiple versions of Java installed via apt. apt-alternatives I think it's called, and then indeed, having parallel java versions from the getgo is the goal.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Ahze85283 commented 3 years ago

So like adding a local storage Luke how we store the instance files and then just point to individual binaries

so for example we have Minecraft binary for 1.17 1.16, etc

we could have a Java binary folder with each of the different versions in there JRE 1.8 etc

On Fri, Jun 25, 2021, 1:24 PM Peter Salzmann @.***> wrote:

Can we just have multiple versions in folders and point to that binary? This is what I am looking at at the moment.

Sent from my iPhone

On 26 Jun 2021, at 2:31 am, William Dizon @.***> wrote:

 @filter-visor I'll have to see how to keep multiple versions of Java installed via apt. apt-alternatives I think it's called, and then indeed, having parallel java versions from the getgo is the goal.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hexparrot/mineos-node/issues/410#issuecomment-868814776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ667B44QUKDIHEEA3AT4EDTUTQZRANCNFSM46LVTIUA .

flareofghast commented 3 years ago

That’s what I’m investigating. Not per-server as that would be a waste of space. There is also a couple of projects I came across for making installing versions easier and directory specific ‘installs’ but if we don’t need to mess around with that and just running java from a subfolder works that’s possibly the easiest solution.

Sent from my iPhone

On 26 Jun 2021, at 6:25 am, Ahze85283 @.***> wrote:

 So like adding a local storage Luke how we store the instance files and then just point to individual binaries

so for example we have Minecraft binary for 1.17 1.16, etc

we could have a Java binary folder with each of the different versions in there JRE 1.8 etc

On Fri, Jun 25, 2021, 1:24 PM Peter Salzmann @.***> wrote:

Can we just have multiple versions in folders and point to that binary? This is what I am looking at at the moment.

Sent from my iPhone

On 26 Jun 2021, at 2:31 am, William Dizon @.***> wrote:

 @filter-visor I'll have to see how to keep multiple versions of Java installed via apt. apt-alternatives I think it's called, and then indeed, having parallel java versions from the getgo is the goal.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hexparrot/mineos-node/issues/410#issuecomment-868814776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ667B44QUKDIHEEA3AT4EDTUTQZRANCNFSM46LVTIUA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

flareofghast commented 3 years ago

Using what hexparrot mentioned above (re: adding java_binary to server.config) I was successfully able to start with my chosen Java version which I had stored in "/usr/games/minecraft/java/" image image image image

flareofghast commented 3 years ago

couple more pics for clarity image image

flareofghast commented 3 years ago

I did this with mine... image

flareofghast commented 3 years ago

What I would prefer is a drop down like the jar version, that's beyond my angular skills right now - even that change java version thing was annoying for me. I'll work on some back end code to try and populate a list similar to profiles list and then we could have a drop down with the available versions.

Ahze85283 commented 3 years ago

What about a Javabinary.d?

On Fri, Jun 25, 2021, 3:49 PM Peter Salzmann @.***> wrote:

What I would prefer is a drop down like the jar version, that's beyond my angular skills right now - even that change java version thing was annoying for me. I'll work on some back end code to try and populate a list similar to profiles list and then we could have a drop down with the available versions.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hexparrot/mineos-node/issues/410#issuecomment-868869774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ667B3PIILCEIWNV2EYB33TUUBXZANCNFSM46LVTIUA .

flareofghast commented 3 years ago

If I am not mistaken the .d is used for config files, not directories of binaries. Possibly if the final solution was a directory of config files that pointed to other java directories or further config but that is currently unlikely.

flareofghast commented 3 years ago

also, for managing java versions there is this project - https://github.com/shyiko/jabba and for per directory java https://github.com/jenv/jenv

Not sure how useful this would be without modifying the code but I did look into it for a little while but the proposed solution above is easier and not too difficult for users.

hexparrot commented 3 years ago

It's my impression that all Minecraft server jars seem to be brought up properly with nothing more than the invocation of the full jar path, e.g., /opt/openjdk-16.0.1+9/bin/java or other similarly placed JDK/JRE, no matter the location.

To that end, it seems like any environment setting, or 3rd party pieces of software might be more than we need.

How do we feel about whitelisting javas in /etc/mineos.conf?

use_https = true
socket_host = '0.0.0.0'
socket_port = 8443
base_directory = '/var/games/minecraft'

java_homes = '/opt/openjdk-16.0.1+9,/opt/openjre-11'

Then the webui can parse it, do a simple check for path.join('/opt/openjre-11', '/bin/java'). Each successful file stat can then help populate the dropdown and fill in the java_binary=

Ahze85283 commented 3 years ago

I like that that's what I was trying to get at when I was recommending a .d file the other day.

On Mon, Jun 28, 2021, 12:05 PM William Dizon @.***> wrote:

It's my impression that all Minecraft server jars seem to be brought up properly with nothing more than the invocation of the full jar path, e.g., /opt/openjdk-16.0.1+9/bin/java or other similarly placed JDK/JRE, no matter the location.

To that end, it seems like any environment setting, or 3rd party pieces of software might be more than we need.

How do we feel about whitelisting javas in /etc/mineos.conf?

use_https = true socket_host = '0.0.0.0' socket_port = 8443 base_directory = '/var/games/minecraft'

java_homes = '/opt/openjdk-16.0.1+9,/opt/openjre-11'

Then the webui can parse it, do a simple check for path.join('/opt/openjre-11', '/bin/java'). Each successful file stat can then help populate the dropdown and fill in the java_binary=`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hexparrot/mineos-node/issues/410#issuecomment-869945275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ667B4QGVBYOKFXFGF64S3TVDBW7ANCNFSM46LVTIUA .

flareofghast commented 3 years ago

Can you put all the java related functionality into it’s own file? - single responsibility rule.

Sent from my iPhone

On 29 Jun 2021, at 5:36 am, Ahze85283 @.***> wrote:

 I like that that's what I was trying to get at when I was recommending a .d file the other day.

On Mon, Jun 28, 2021, 12:05 PM William Dizon @.***> wrote:

It's my impression that all Minecraft server jars seem to be brought up properly with nothing more than the invocation of the full jar path, e.g., /opt/openjdk-16.0.1+9/bin/java or other similarly placed JDK/JRE, no matter the location.

To that end, it seems like any environment setting, or 3rd party pieces of software might be more than we need.

How do we feel about whitelisting javas in /etc/mineos.conf?

use_https = true socket_host = '0.0.0.0' socket_port = 8443 base_directory = '/var/games/minecraft'

java_homes = '/opt/openjdk-16.0.1+9,/opt/openjre-11'

Then the webui can parse it, do a simple check for path.join('/opt/openjre-11', '/bin/java'). Each successful file stat can then help populate the dropdown and fill in the java_binary=`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hexparrot/mineos-node/issues/410#issuecomment-869945275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ667B4QGVBYOKFXFGF64S3TVDBW7ANCNFSM46LVTIUA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

CorneliusCornbread commented 2 years ago

What's the status of this issue? This is starting to become a major issue for hosting Minecraft servers with varied versions.