[FreeNAS 9 Plugin] - MineOS

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Disappeared files: basically, after a stop/start of the jail, it would fail to start, saying no /dev directory. I opened a root prompt to navigate into the jail directory, and all there was there was a flat file called etc with some scripting in it, and a usr folder with just a few files in it. It looks to me like the file structure is created automagically when the jail is started somehow. No worries about that problem if you have not seen that before.

So sticking with core issue, same as seen before. Log in, and it shows the below.

Logging out of the session by clicking on the avatar and choosing 'Sign Off' presents me with the logon screen again. When I authenticate again with mcserver, it remains the exact same. I am on 9.3.

Could a screen shot help?
View attachment 6575
so the issue with that screen is it's missing the servers you setup right?

can you try stopping and starting your plugin from the Plugins>Installed tab.
also that should show whatever is in your mineos directory, which I think by default is /var/games/minecraft but can be configured in the mineos menu in the left panel of the freenas webinterface
 

slushieken

Dabbler
Joined
May 28, 2014
Messages
24
so the issue with that screen is it's missing the servers you setup right?

can you try stopping and starting your plugin from the Plugins>Installed tab.
also that should show whatever is in your mineos directory, which I think by default is /var/games/minecraft but can be configured in the mineos menu in the left panel of the freenas webinterface

Its not the screen missing the servers - in fact they are there. Look in the top right corner and you will see the root problem - the user is not actually logged in. For example, if I select 'Manage Profiles', i see 'webui version: undefined', no user name, and the message:

You do not have rights on /profiles/profile.config, so you may prototype a profile but not update it.

But clearly the authentication is happening somehow; I can't even log in as a non existent user. Its like part of the process does not start or something. If you look on the screenshot you can see the mineos server is just not actually running - even though it is there.

So problem 1 is that I can authenticate but it does not actually log in. Problem 2 could be why it can't authenticate - it does not actually start the server.

Stop/start of the plugin makes no change at all.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Its not the screen missing the servers - in fact they are there. Look in the top right corner and you will see the root problem - the user is not actually logged in. For example, if I select 'Manage Profiles', i see 'webui version: undefined', no user name, and the message:

You do not have rights on /profiles/profile.config, so you may prototype a profile but not update it.

But clearly the authentication is happening somehow; I can't even log in as a non existent user. Its like part of the process does not start or something. If you look on the screenshot you can see the mineos server is just not actually running - even though it is there.

So problem 1 is that I can authenticate but it does not actually log in. Problem 2 could be why it can't authenticate - it does not actually start the server.

Stop/start of the plugin makes no change at all.
usually I see that issue when linprocfs isn't mounted into the jail, which is why I recommended stopping/starting the plugin (which performs the mount).

can you run the following from the freenas commandline
Code:
mount | grep linprocfs
 

slushieken

Dabbler
Joined
May 28, 2014
Messages
24
JPR, it was that. I mounted it manually on the core OS, stopped and started the jail, and it is working again. So I guess the root issue is that it did not mount that automagically then, and probably because I didn't add that to start up scripts. Sorry for wasting your time on that...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
JPR, it was that. I mounted it manually on the core OS, stopped and started the jail, and it is working again. So I guess the root issue is that it did not mount that automagically then, and probably because I didn't add that to start up scripts. Sorry for wasting your time on that...
what's strange is stopping+starting the plugin didn't work cause that's supposed to do it automatically.
no worries, glad you got it working.
 

SirClutch

Cadet
Joined
Feb 16, 2015
Messages
4
Hi guys, I created a guide for importing/exporting Minecraft worlds between Windows and MineOS on FreeNas. Hope it helps save some time, this took me an entire weekend to get my head around the permissions.
http://www.mediafire.com/view/lohri7e3er1igb2/Creating_a_new_Minecraft_map_on_MineOS_on_FreeNas.docx
Let me know if there's anything that needs changing/clarification.

Thanks for this guide I found it quite useful! Would you happen to know how to update the java version packaged with the plugin? I have numerous plugins not working due to an out of data java version (tested by copying server files to updated windows box and running there).
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks for this guide I found it quite useful! Would you happen to know how to update the java version packaged with the plugin? I have numerous plugins not working due to an out of data java version (tested by copying server files to updated windows box and running there).
I wouldn't be very easy but might be possible. java is installed in /usr/pbi/mineos-amd64/openjdk7

What version did you need to install?
 

SirClutch

Cadet
Joined
Feb 16, 2015
Messages
4
I wouldn't be very easy but might be possible. java is installed in /usr/pbi/mineos-amd64/openjdk7

What version did you need to install?

I'm honestly not sure, I'm running JRE8 on windows so whatever the latest version is would most likely work. The plugins fail to create the required directories in the plugins folder so I think it's either a folder permissions issue or a Java issue. The plugins load but don't function correctly - the plugins' commands are present in-game but don't work correctly (chests won't lock with LWC and no LWC directory is created in plugins folder). I understand this is not Minecraft support so I won't post logs unless you want me to.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'm honestly not sure, I'm running JRE8 on windows so whatever the latest version is would most likely work. The plugins fail to create the required directories in the plugins folder so I think it's either a folder permissions issue or a Java issue. The plugins load but don't function correctly - the plugins' commands are present in-game but don't work correctly (chests won't lock with LWC and no LWC directory is created in plugins folder). I understand this is not Minecraft support so I won't post logs unless you want me to.
Does your (minecraft) plugin say anything about requiring java8? the mineos (freenas) plugin ships with java7
 

SirClutch

Cadet
Joined
Feb 16, 2015
Messages
4
Does your (minecraft) plugin say anything about requiring java8? the mineos (freenas) plugin ships with java7
Not specifically, which leads me to believe that the .jar file lacks permissions to create the directory if that makes sense. I have a Storage link to that folder to transfer plugins, could this be causing the issue?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Not specifically, which leads me to believe that the .jar file lacks permissions to create the directory if that makes sense. I have a Storage link to that folder to transfer plugins, could this be causing the issue?
the 'jar' isn't what would be lacking permissions.

mineos runs as root, but starts (minecraft) servers as a user, in the jail, that own that particular (minecraft) server. If you didn't change anything then all (minecraft) servers you create are owned by mcserver (UID=199) and the server directory should be writable by this user.

Code:
chown -R mcserver:mcserver /path/to/minecraft/servers
 

SirClutch

Cadet
Joined
Feb 16, 2015
Messages
4
the 'jar' isn't what would be lacking permissions.

mineos runs as root, but starts (minecraft) servers as a user, in the jail, that own that particular (minecraft) server. If you didn't change anything then all (minecraft) servers you create are owned by mcserver (UID=199) and the server directory should be writable by this user.

Code:
chown -R mcserver:mcserver /path/to/minecraft/servers

So I have solved the issue! The first step was removing the Storage link in the jails settings - it causes permissions issues and makes the directory unwritable from inside the jail. As my plugins were no longer available I copied them into the /minecraft/import folder and then used the Terminal window in the FreeNAS web GUI to cp the files from /import to the servers /minecraft/servername/plugins folder. Thank you for your help!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So I have solved the issue! The first step was removing the Storage link in the jails settings - it causes permissions issues and makes the directory unwritable from inside the jail. As my plugins were no longer available I copied them into the /minecraft/import folder and then used the Terminal window in the FreeNAS web GUI to cp the files from /import to the servers /minecraft/servername/plugins folder. Thank you for your help!
The storage link doesn't change permission at all. it is possible to work with one; I use one in my production setup

But, I'm glad you got it working either way.
 

OneHungryPoboy

Dabbler
Joined
Oct 24, 2014
Messages
16
There appears to be a bug in the latest build of mineos where it will not update profiles. Verified by reinstalling the plugin with the version it comes with and updating a profile, then updating the mineos service and being unable to update profiles.
Where can this be reported to?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Rogallaig

Cadet
Joined
Feb 24, 2015
Messages
4
I'm having a similar problem as Obsodien (post #37) when attempting to create a restore point:

Traceback (most recent call last): File "/usr/pbi/mineos-amd64/bin/rdiff-backup", line 20, in import rdiff_backup.Main File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/Main.py", line 25, in import Globals, Time, SetConnections, selection, robust, rpath, \ File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/SetConnections.py", line 30, in import Globals, connection, rpath File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/connection.py", line 539, in import Globals, Time, Rdiff, Hardlink, FilenameMapping, C, Security, \ File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/Rdiff.py", line 22, in import os, librsync File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/librsync.py", line 28, in import _librsync ImportError: Shared object "librsync.so.1" not found, required by "_librsync.so"

Per Joshua's suggested fix (post #38), I have confirmed both of these links exist:
  • ln -s /usr/pbi/mineos-amd64/lib/libpopt.so.0 /usr/local/lib
  • ln -s /usr/pbi/mineos-amd64/lib/libpopt.so.1 /usr/local/lib
...yet I'm still unable to create a restore point and receive the same error. Stopping/starting the NAS, jail and MineOS server has not resolved the issue after ensuring the links exist. Thoughts or suggestions?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'm having a similar problem as Obsodien (post #37) when attempting to create a restore point:

Traceback (most recent call last): File "/usr/pbi/mineos-amd64/bin/rdiff-backup", line 20, in import rdiff_backup.Main File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/Main.py", line 25, in import Globals, Time, SetConnections, selection, robust, rpath, \ File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/SetConnections.py", line 30, in import Globals, connection, rpath File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/connection.py", line 539, in import Globals, Time, Rdiff, Hardlink, FilenameMapping, C, Security, \ File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/Rdiff.py", line 22, in import os, librsync File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/rdiff_backup/librsync.py", line 28, in import _librsync ImportError: Shared object "librsync.so.1" not found, required by "_librsync.so"

Per Joshua's suggested fix (post #38), I have confirmed both of these links exist:
  • ln -s /usr/pbi/mineos-amd64/lib/libpopt.so.0 /usr/local/lib
  • ln -s /usr/pbi/mineos-amd64/lib/libpopt.so.1 /usr/local/lib
...yet I'm still unable to create a restore point and receive the same error. Stopping/starting the NAS, jail and MineOS server has not resolved the issue after ensuring the links exist. Thoughts or suggestions?
Tell me if this works
Code:
ln -s /usr/pbi/mineos-amd64/lib/librsync.so.1 /usr/local/lib


This link is supposed to already exist, not sure why it got deleted for you.
 

Rogallaig

Cadet
Joined
Feb 24, 2015
Messages
4
Tell me if this works
Code:
ln -s /usr/pbi/mineos-amd64/lib/librsync.so.1 /usr/local/lib


This link is supposed to already exist, not sure why it got deleted for you.

Nope. It says

Code:
ln: /usr/local/lib/librsync.so.1: File exists


Maybe I'm running it from the wrong location? I'm opening the shell on the jail and running the code. That's the correct location, right?
 
Top