Jump to content

[Official] Minecraft (Automatic Java Version - Multiple Mods)


Dennis

Recommended Posts

4 hours ago, Dennis said:

What's New in Version 2.1.0  

  • [Changed] AdoptOpenJDK replaced with Adoptium (Termurin)
  • [Changed] Now using SDKs instead of JREs. Adoptium will not be serving JRE. This will result in slower setup times and more file space being used.
  • [Added] Java 17
    • Minecraft 1.18 snapshots now require Java 18.
  • [Improved] Startup script can now detect when Java 17 is needed

Just to clarify since I already have all needed versions of adoptjdk for Minecraft, would I uninstall those and install the Termurin versions?

Link to comment
Share on other sites

1 hour ago, Joey Misfit said:

Just to clarify since I already have all needed versions of adoptjdk for Minecraft, would I uninstall those and install the Termurin versions?

No, you can use whatever variant of Java that you want, as long as you've configured environment variables for them.

There's no OpenJDK 17 from AdoptOpenJDK, though.

Link to comment
Share on other sites

16 minutes ago, Dennis said:

No, you can use whatever variant of Java that you want, as long as you've configured environment variables for them.

There's no OpenJDK 17 from AdoptOpenJDK, though.

Oh yeah that's true, as for Temurin would we add those as system variables to replace AdoptOpenJDK?

Link to comment
Share on other sites

8 hours ago, Joey Misfit said:

Oh yeah that's true, as for Temurin would we add those as system variables to replace AdoptOpenJDK?

If you want to, sure. AdoptOpenJDK or Adoptium are not required for this config to work - but if you do not set environment variables for JAVA8, JAVA11, JAVA16 and JAVA17, new installations of Minecraft services will use Adoptium by default.

Link to comment
Share on other sites

Hi Dennis,

Thanks for the config. I've got it all working manually. I ended up having to download the appropriate java folder manually and uploading it to the root of each server from the I want to use java files per service and change permissions.

I'm not sure things are looking correct as far as the java version downloader goes.

I've got a blank /etc/environment file (Should be empty if we want to use per-service files, right?) (I also restarted the service manager and monitor on the remote to ensure it's reading correctly). When I go to download the java versions since some services don't have java folders, the following error is received:

image0.jpg

Can this be bypassed to forcefully install java versions onto the game server?

Also, on other services where "Auto-Select Java Version" is selected, the script then does without a java folder this and returns one 0kb file.

drXZ2i1.png

AcrkXQi.png

I'm not quite sure if there's an issue with the download script or what.. I assume the only thing configuration-related I need to have set right on my end is the empty environment file, right?

I've also been getting that URLError 100% of the time for java17.

Any help would be appreciated. Thanks!

Edited by Jimmy-CS
Link to comment
Share on other sites

  • 2 weeks later...
On 11/20/2021 at 10:34 PM, Jimmy-CS said:

Hi Dennis,

Thanks for the config. I've got it all working manually. I ended up having to download the appropriate java folder manually and uploading it to the root of each server from the I want to use java files per service and change permissions.

I'm not sure things are looking correct as far as the java version downloader goes.

I've got a blank /etc/environment file (Should be empty if we want to use per-service files, right?) (I also restarted the service manager and monitor on the remote to ensure it's reading correctly). When I go to download the java versions since some services don't have java folders, the following error is received:

image0.jpg

Can this be bypassed to forcefully install java versions onto the game server?

Also, on other services where "Auto-Select Java Version" is selected, the script then does without a java folder this and returns one 0kb file.

drXZ2i1.png

AcrkXQi.png

I'm not quite sure if there's an issue with the download script or what.. I assume the only thing configuration-related I need to have set right on my end is the empty environment file, right?

I've also been getting that URLError 100% of the time for java17.

Any help would be appreciated. Thanks!

I'm getting the same for the Linux config for all versions of Java. It tries to download but the url is broken. I end up getting the adoptium8.tar.gz file at 0 bytes and that's it. 

Link to comment
Share on other sites

1 hour ago, Dennis said:

@qspider and @Jimmy-CS I just tried on our Ubuntu test server, and everything went fine. If you want me to investigate, could you please send me a DM with admin login to TCAdmin and the Linux server?

I just zipped all 3 java versions, have it stored on my CDN, and then after install it downloads and extracts. Basically a roundabout way to do the same thing. This will suffice for the time being- thank you though.

Link to comment
Share on other sites

  • 2 weeks later...

Just a heads up:
The new config might not allow custom .jar files uploaded by the user. Allowing this is already a security issue in itself, and making a workaround for the Log4J exploit is very difficult when I have to account for all the different ways the hundreds of jars are packaged.

Link to comment
Share on other sites

What's New in Version 2.2.0  

PLEASE READ BEFORE INSTALLING/UPDATING

After installing this release, make sure to click "Update existing services" in the game config! Also restart all of your Minecraft services

This release is introducing a few changes to combat the Log4J exploit. All Minecraft versions from 1.7 and up to 1.18 are exploitable.

  • [Removed] Custom .jar file upload (clients can no longer upload their own .jar file)
    • I know this change will be annoying for some of you but this is a huge security risk. Anyone would be able to upload any .jar file to your server and execute it
  • [Added] Workarounds for the Log4J exploit
    • The current state of the script is not final nor is the code pretty - but it's functional
    • Tested with Minecraft, Paper, Spigot, Craftbukkit, Purpur and Forge

This version of the config might break stuff. There's hundreds of different versions of Minecraft and it's difficult trying to fix everything. Let me know if there's any problems.

Link to comment
Share on other sites

What's New in Version 2.2.1  

PLEASE READ BEFORE INSTALLING/UPDATING

I accidently broke the script that detects the Java version needed before startup in version 2.2.0. It can cause Minecraft services to not start anymore and can also cause slow panel load times. Please update to 2.2.1.

After installing this release, make sure to click "Update existing services" in the game config! Also restart all of your Minecraft services

This release is introducing a few changes to combat the Log4J exploit. All Minecraft versions from 1.7 and up to 1.18 are exploitable.

  • [Removed] Custom .jar file upload (clients can no longer upload their own .jar file)
    • I know this change will be annoying for some of you but this is a huge security risk. Anyone would be able to upload any .jar file to your server and execute it
  • [Added] Workarounds for the Log4J exploit
    • The current state of the script is not final nor is the code pretty - but it's functional
    • Tested with Minecraft, Paper, Spigot, Craftbukkit, Purpur and Forge
  • [Fixed] "Read Minecraft version from .jar file" broke in 2.2.0 - fixed in 2.2.1

This version of the config might break stuff. There's hundreds of different versions of Minecraft and it's difficult trying to fix everything. Let me know if there's any problems.

Link to comment
Share on other sites

Hello,

How could it be configured to work with the latest versions of Forge?

Since Forge 1.17 and later changed the way to start the servers.

I manage to get it to work by starting it directly from the server, but from the panel it throws startup error

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

@mspsmuge In theory: yes.

In practice: ... well, not so easily. The script sets random affinity and low priority on the process during startup and then waits for a specific string to appear in the server's logfile. Old versions of Minecraft uses "server.log" while newer versions of Minecraft uses "logs\latest.log". The string also includes the number of seconds it took to start so we can't search for the entire string like we do with the Rust config. We could search for "Done", but some mods/plugins outputs the exact same string to the log.

I'll see what I can do. No promises though.

Link to comment
Share on other sites

Many times I get the error when trying to start the server: The service is currently processing. Try again later

And when checking in the console the following error appears:

IronPython.Runtime.Exceptions.PythonException: The service is currently processing. Try again later

Server stack trace:
   en TCAdmin.ServiceManLib.WindowsProcessController.a()
   en TCAdmin.ServiceManLib.WindowsProcessController.Start()
   en TCAdmin.ServiceManLib.ServiceManagerProxy.Start(Int32 ServiceId, String description, String userName, String clientIP)
   en System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   en System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
   en TCAdmin.Monitor.Standard.WebServices.ServiceManager.Start(Int32 serviceId, String description, String userName, String clientIP)

When closing the processes that are using the service or restarting the monitor, the error continues.

How can it be fixed?

Edited by Vicente
Link to comment
Share on other sites

7 hours ago, Dennis said:

@Vicente that message is shown when the server is set into "Processing" state. This happens when you're performing a task on the server (such as reinstalling, updating, installing mods etc.)

That's the problem, it doesn't have any scheduled tasks, updates, mods installation, etc.

I notice that it happens when I try to run a server with Forge 1.16.5, with the other versions it does not happen.

NOTE: I have tested with JAVA 8 and 11.

Link to comment
Share on other sites

15 minutes ago, Vicente said:

I notice that it happens when I try to run a server with Forge 1.16.5, with the other versions it does not happen.

The config only supports Forge if it's included in a modpack from the Custom Mods module.
It's a long time ago that Forge was removed from the config. Are you sure that you're on the latest version of the game config?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use