[FreeNAS 9 Plugin] - MineOS

Joined
Jul 10, 2016
Messages
521
@Jon Telfer and @jrucker2004 : If you're on the FreeNAS-11-STABLE train (11.1-U4 and 11.1-U5), the easiest and future proof option to get back up and running, is to transition from the old PBI plugin to the new iocage plugin. The process would go something like this:

Preparation
If your Minecraft data (profiles, servers, etc...) still lives inside of your plugin jail, now is a good time to move it to its own dataset in your main pool. This will make it possible to update and upgrade your plugin jail without losing any of your data. If you already use the Jails > Storage feature to manage your data, you can skip this step.
  • Stop your mineos_1 plugin jail
  • Go to Volumes > Storage and create a new dataset, e.g. mc_data (avoid spaces)
    upload_2018-8-6_22-4-6.png

  • Go to the FreeNAS command line and copy the files from your jail to the new dataset. Assuming the jail dataset is /mnt/tank/jail and the new dataset you created is /mnt/tank/mc_data, you would execute: cp -a /mnt/tank/jails/mineos_1/var/games/minecraft/ /mnt/tank/mc_data

Install the plugin
At this time in 11.1-U5, the new UI is not yet complete, but that's where it will be managed. More info on iocage jails here.
The iocage plugin can be created from the FreeNAS command line; Change the interface and IP-address to match your setup.
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.1-RELEASE/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.215/24"



Map your dataset
This will make all you servers, profiles, etc... available to your new plugin
Code:
iocage stop mineos
iocage fstab -a mineos "/mnt/tank/mc_data /var/games/minecraft/ nullfs rw 0 0"
iocage start mineos


Log on to the Admin Portal (should be listed after the install process, e.g. http://192.168.0.215:8443) with mcserver/mcserver and you're in business!

Note that:
1) the first time you may have to use the Refresh profile list and Refresh server list from the Admin menu, for it to (re)index the servers/profiles.
2) this plugin automatically mounts linprocfs; there no more need for a post-init script
3) I tested this 11.1-U4 and U5. This will not work if you’re on 11.0. In release 11.2 you can create using the UI.
 

xxsj

Dabbler
Joined
Aug 2, 2014
Messages
26
@Jon Telfer and @jrucker2004 : If you're on the FreeNAS-11-STABLE train (11.1-U4 and 11.1-U5), the easiest and future proof option to get back up and running, is to transition from the old PBI plugin to the new iocage plugin.

Do you think iocage will be more reliable than jails? I can't count the number of times I've had jails refuse to upgrade, had to rebuild them, or spend hours on the forums chasing down issues that come from upgrades.
 
Joined
Jul 10, 2016
Messages
521
Do you think iocage will be more reliable than jails?
iocage is a new jail manager, used for both plugin jails and regular jails. It replaces warden.

Most issues relates to upgrading MineOS have been caused by the fact the warden plugin infrastructure is no longer maintained and some of the node.js modules seem very fragile when there's a version change or mismatch.

That being said, the single best thing you can do to make your life easy when upgrading/updating is to store your minecraft data outside the jail, as described in the "preparation" step in my post above. That way you can just rebuild a clean/current jail, and if everything works, mount your data in it and destroy the old jail.

iocage has a update, upgrade and rename functionality that warden didn't have. It also has an option to automatically mount linprocfs upon start of the jail/plugin, where in warden you had to do this manually or via post install script.
 

Jon Telfer

Dabbler
Joined
May 7, 2014
Messages
14
Hi Jurgen,
Thanks a lot for your help - it is much appreciated. I've been working through your guide and found an issue - when I got to iocage start mineos I got an error -

Code:
Host: 11.1 is not greater than jail: 11.2
This is unsupported.


I then moved to the 11.2-STABLE train using the update gui (I now know this isn't actually stable, confusing, but I'm here now).

I modified your one of your first instructions to now point to 11.2 -
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.2-RELEASE/mineos.json


and followed the rest of your guide - and it all works brilliantly - thank you! Can I get you a beer?

Jon
 

rovan

Dabbler
Joined
Sep 30, 2013
Messages
33
To get around the iocage error with the 11.2 jail o/s and 11.1 host, you can use the -r flag to specify the release version. I tested it on my FreeNAS 11.1u6 server and its working! thanks heaps to Jurgen for setting this up!
Code:
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.215/24" -r 11.1-RELEASE
 
Last edited:

Seani

Dabbler
Joined
Oct 18, 2016
Messages
41
@Jon Telfer and @jrucker2004 : If you're on the FreeNAS-11-STABLE train (11.1-U4 and 11.1-U5), the easiest and future proof option to get back up and running, is to transition from the old PBI plugin to the new iocage plugin. The process would go something like this:

Preparation
If your Minecraft data (profiles, servers, etc...) still lives inside of your plugin jail, now is a good time to move it to its own dataset in your main pool. This will make it possible to update and upgrade your plugin jail without losing any of your data. If you already use the Jails > Storage feature to manage your data, you can skip this step.
  • Stop your mineos_1 plugin jail
  • Go to Volumes > Storage and create a new dataset, e.g. mc_data (avoid spaces)
    View attachment 25087
  • Go to the FreeNAS command line and copy the files from your jail to the new dataset. Assuming the jail dataset is /mnt/tank/jail and the new dataset you created is /mnt/tank/mc_data, you would execute: cp -a /mnt/tank/jails/mineos_1/var/games/minecraft/ /mnt/tank/mc_data

Install the plugin
At this time in 11.1-U5, the new UI is not yet complete, but that's where it will be managed. More info on iocage jails here.
The iocage plugin can be created from the FreeNAS command line; Change the interface and IP-address to match your setup.
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.1-RELEASE/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.215/24"



Map your dataset
This will make all you servers, profiles, etc... available to your new plugin
Code:
iocage stop mineos
iocage fstab -a mineos "/mnt/tank/mc_data /var/games/minecraft/ nullfs rw 0 0"
iocage start mineos


Log on to the Admin Portal (should be listed after the install process, e.g. http://192.168.0.215:8443) with mcserver/mcserver and you're in business!

Note that:
1) the first time you may have to use the Refresh profile list and Refresh server list from the Admin menu, for it to (re)index the servers/profiles.
2) this plugin automatically mounts linprocfs; there no more need for a post-init script
3) I tested this 11.1-U4 and U5. This will not work if you’re on 11.0. In release 11.2 you can create using the UI.

@Jurgen Segaert
Thanks for the guide. I followed your instructions by the book (only difference is that I simply installed the 11.2 Plugin and then mounted the /mnt/tank1/apps/mineos dataset into that since FreeNas 11.2 STABLE is out.) Seemed to have worked since I can access the MineOS GUI, it shows me my old server and I can start it but when I log into it in the game, I can walk 2m (after that nothing I do takes effect, like destroying blocks) and then the mc server shuts down after 60s. The minecraft log shows that the server shuts down due to a FATAL watchdog error with Ticks taking >60s. I tried the workaround for that by setting max-tick-time to "-1" in the Server.properties. After doing that, the mcserver doesn't shut down on its own after 60s but occupies more and more cpu+ram until I stop the plugin via FreeNas WebGUI. Same thing happens when I create a new Server from scratch and join that. I tried different jars, different ram settings etc. and even recreated the Plugin 2 times from scratch.

Is it possible that the MineOS plugin for 11.2 STABLE is broken? Or has anyone a clue what I'm doing wrong? All the other iocage jails I installed so far (Plex, Tautulli, MySQL, HandBrake) work perfectly.
 

andre-geert

Cadet
Joined
Dec 2, 2017
Messages
2
I tried the workaround for that by setting max-tick-time to "-1" in the Server.properties. After doing that, the mcserver doesn't shut down on its own after 60s but occupies more and more cpu+ram until I stop the plugin via FreeNas WebGUI. Same thing happens when I create a new Server from scratch and join that. I tried different jars, different ram settings etc. and even recreated the Plugin 2 times from scratch.
I'm having this problem on creating a 1.12 server. I can't even seem to get a 1.13 server to generate logs.

I've deleted/recreated the jail from the plugin option at least 4 times, trying various upgrade options.
 
Joined
Jul 10, 2016
Messages
521
To help me reproduce this, can you provide some detail:
What exact version of FreeNAS are you on? Are you using the latest 11.2-RELEASE version?
Did you install the plugin from the new UI or via the command line? If the latter, can you provide the exact commands you used to do so.
 

Seani

Dabbler
Joined
Oct 18, 2016
Messages
41
To help me reproduce this, can you provide some detail:
What exact version of FreeNAS are you on? Are you using the latest 11.2-RELEASE version?
Did you install the plugin from the new UI or via the command line? If the latter, can you provide the exact commands you used to do so.
I'm running the most current Freenas 11.2-RELEASE Version (just checked for updates) and I installed the plugin from the new UI.
 
Joined
Jul 10, 2016
Messages
521
OK, I managed the reproduce this. I suspect that one of the recent java updates has an issue. If you switch from the "latest" to the "quarterly" repository it works fine. I'll have the repo switched in FreeNAS but that may take a bit. As an immediate workaround, install from the command line with the adjusted json manifest file, as follows [adjust network settings as needed]:
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.2-RELEASE/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.210/24"


<EDIT>This is no longer relevant, see this post
 
Last edited:
Joined
Dec 18, 2018
Messages
1
Jurgen, this works well. I was wondering if it was just me but MineOS was just broken in so many ways that I figured it was a Java issue or something. In 11.2 with the latest plugin it won't restart servers, crashes all the time, and imported worlds weren't working at all.

OK, I managed the reproduce this. I suspect that one of the recent java updates has an issue. If you switch from the "latest" to the "quarterly" repository it works fine. I'll have the repo swithced in FreeNAS but that may take a bit. As an immediate workaround, install from the command line with the adjusted json manifest file, as follows [adjust network settings as needed]:
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.2-RELEASE/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.210/24"
 

Durahl

Dabbler
Joined
Mar 1, 2016
Messages
21
OK, I managed the reproduce this. I suspect that one of the recent java updates has an issue. If you switch from the "latest" to the "quarterly" repository it works fine. I'll have the repo swithced in FreeNAS but that may take a bit. As an immediate workaround, install from the command line with the adjusted json manifest file, as follows [adjust network settings as needed]:
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.2-RELEASE/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.210/24"
What would be the more elaborate procedure to fix this?

I basically never use CLI so whatever knowledge I may have gathered like a year+ ago while troubleshooting something similar like this has probably already vanished xD

Should these commands be entered in the general Shell or a maybe already existing MineOS Jail Shell?

If it's NOT the latter, should the prior installed and not functional MineOS ( Plugin Version ) be uninstalled before attempting this?
 

deschoe

Cadet
Joined
Jan 8, 2019
Messages
1
*push*

Should these commands be entered in the general Shell or a maybe already existing MineOS Jail Shell?

If it's NOT the latter, should the prior installed and not functional MineOS ( Plugin Version ) be uninstalled before attempting this?

I'm having the same issue, and I'm not a CLI-guy either. I was able to SSH into the mineos jail, copy/paste a few commands, but soon after that everything was a mess. xD

Was the SSH bit the correct place for your commands? Maybe I just didn't alter the paths adequately.

Thanks a bunch!
 
Last edited:
Joined
Jul 10, 2016
Messages
521
The quarterly release rolled, and those packages were added, so the workaround to switch to the quarterly release no longer works.

If you do a fresh install, it should install the previous version of Java that works properly.
To fix an existing jail, login to your jail shell and run the following commands:
Code:
service mineos stop
pkg delete -y openjdk8-jre
fetch https://github.com/jsegaert/binaries/releases/download/v0.1/openjdk8-jre-8.181.13.txz
pkg add openjdk8-jre-8.181.13.txz
service mineos start
 

Dogchainx

Cadet
Joined
Jun 15, 2017
Messages
3
I haven't been able to locate any information, so going to post here. I can get older Minecraft 1.7.10 servers running without much issue, but anything newer (especially 1.12.10) can never properly start a server. I've updated Java, deleted and installed old Java, deleted Jails, reinstalled jails, updated WEBGUI, started from scratch on numerous occasions.

Is the MineOS plugin still viable? or would a try at the Turnkey MineOS manual install work better?

UPDATE: So I can manually start the server, log in from a client and play the game, but MineOS doesn't show the server running. When I try to start the server, it shows players on it, but will shut down the server. Manually starting works, but MineOS starting doesn't?

UPDATE...NOW WORKS: 1.12.2 DireWolf20 FTB profile pack now starts and runs. I did the instructions from the above posts at the main Freenas shell and it created a new jail:

fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/11.2-RELEASE/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.210/24"

I edited it to say "mineos.json ip4_addr="igb0|10.0.0.7/24" for my own network settings, and now the server starts and continues to work stably. For me, this is still a valid fix. Thanks for the instructions, it was driving me insane!
 
Last edited:
Joined
Jul 10, 2016
Messages
521
Go to the command line of your mineos jail and enter the command passwd mcserver and enter the new password.
 

sjp770

Dabbler
Joined
Jul 26, 2018
Messages
19
Is there a certain amount of memory allocated to the iocage or MineOS? Or does it have access to as much of the host memory as needed? In the past I've run spigot and needed 2gb+
 
Top