[FreeNAS 9 Plugin] - MineOS

DavidHasEdge

Explorer
Joined
Aug 15, 2014
Messages
52
mineos (the webui part) runs as root but shows only what user you log in as their servers. ownership is controlled by permission of the files in the jail. the video works cause I use a user 'mcserver' that has group ownership of the profiles file.

if you choose to use a user other than what I use in the video you need to change ownership of stuff in the jail accordingly.
Yeah I tried everything as mcserver
 
Joined
Mar 1, 2012
Messages
5
possible dumb question: is sftp not setup by default? i have a direwolf20 server running on my desktop and would love to move it over to this plugin. my NAS pulls a lot less power then my desktop.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
possible dumb question: is sftp not setup by default? i have a direwolf20 server running on my desktop and would love to move it over to this plugin. my NAS pulls a lot less power then my desktop.
sftp (ssh) doesn't run by default on either the FreeNAS host or in the MineOS jail. you can enable ssh on either and accomplish what you are describing.
 

OneHungryPoboy

Dabbler
Joined
Oct 24, 2014
Messages
16
I created a server and am able to login. However I do not have permissions to edit files within the jail to copy over an existing world I have created. I am trying to access the files using my windows user through a CIFS share in 9.3. How am I supposed to be able to access the files with write permissions? Do I add my windows user to an mcserver group somehow?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I created a server and am able to login. However I do not have permissions to edit files within the jail to copy over an existing world I have created. I am trying to access the files using my windows user through a CIFS share in 9.3. How am I supposed to be able to access the files with write permissions? Do I add my windows user to an mcserver group somehow?
this isn't specific to this plugin, just general file permissions.

I personally just move files to my server using sftp and change ownership/permissions using the commandline. you can skin this cat a dozen different ways.
 

KoreanJesus

Dabbler
Joined
Jun 17, 2014
Messages
19
Good to know, I've been having a problem getting it working, when ever i login to the webui the bug from your video occurs (no user and undefined version) and there is no way to fix it, i have re-installed the jail several time and have updated the service, really not sure whats wrong.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Good to know, I've been having a problem getting it working, when ever i login to the webui the bug from your video occurs (no user and undefined version) and there is no way to fix it, i have re-installed the jail several time and have updated the service, really not sure whats wrong.
Did you try what I did in the video (logout > login)?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yes several times, and several different browsers
it could be something wrong with linprocfs mounting too. though I thought I got that all worked out =/
 

KoreanJesus

Dabbler
Joined
Jun 17, 2014
Messages
19
Yeah, I think you can set the location for them in settings.
Just found the logs, turns out this error is repeated over and over Full Log
Code:
[05/Feb/2015:14:08:04] HTTP
Request Headers:
  REFERER: http://192.168.1.130:8080/
  HOST: 192.168.1.130:8080
  CONNECTION: keep-alive
  Remote-Addr: 192.168.1.7
  ACCEPT: application/json, text/javascript, */*; q=0.01
  USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
  X-REQUESTED-WITH: XMLHttpRequest
  ACCEPT-LANGUAGE: en-US,en;q=0.8
  ACCEPT-ENCODING: gzip, deflate, sdch
  COOKIE: session_id=3b91e68a87df351fea7c1831b5acc1b3ef000b10
[05/Feb/2015:14:08:04] HTTP Traceback (most recent call last):
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/lib/jsontools.py", line 60, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/pbi/mineos-amd64/share/mineos/mineos/mounts.py", line 162, in loadavg
    return proc_loadavg()
  File "/usr/pbi/mineos-amd64/share/mineos/mineos/procfs_reader.py", line 80, in proc_loadavg
    raw = entries('', 'loadavg').next()[0]
  File "/usr/pbi/mineos-amd64/share/mineos/mineos/procfs_reader.py", line 44, in entries
    with open(os.path.join(_procfs, str(pid), page)) as proc_status:
NameError: global name '_procfs' is not defined
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Just found the logs, turns out this error is repeated over and over Full Log
Code:
[05/Feb/2015:14:08:04] HTTP
Request Headers:
  REFERER: http://192.168.1.130:8080/
  HOST: 192.168.1.130:8080
  CONNECTION: keep-alive
  Remote-Addr: 192.168.1.7
  ACCEPT: application/json, text/javascript, */*; q=0.01
  USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
  X-REQUESTED-WITH: XMLHttpRequest
  ACCEPT-LANGUAGE: en-US,en;q=0.8
  ACCEPT-ENCODING: gzip, deflate, sdch
  COOKIE: session_id=3b91e68a87df351fea7c1831b5acc1b3ef000b10
[05/Feb/2015:14:08:04] HTTP Traceback (most recent call last):
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/lib/jsontools.py", line 60, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/usr/pbi/mineos-amd64/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/pbi/mineos-amd64/share/mineos/mineos/mounts.py", line 162, in loadavg
    return proc_loadavg()
  File "/usr/pbi/mineos-amd64/share/mineos/mineos/procfs_reader.py", line 80, in proc_loadavg
    raw = entries('', 'loadavg').next()[0]
  File "/usr/pbi/mineos-amd64/share/mineos/mineos/procfs_reader.py", line 44, in entries
    with open(os.path.join(_procfs, str(pid), page)) as proc_status:
NameError: global name '_procfs' is not defined
Ohh yeah, you were right...
MineOS only works on FreeNAS 9.2.1.8 or 9.3, sorry about that.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
welcome, good luck with the upgrade
 

slushieken

Dabbler
Joined
May 28, 2014
Messages
24
I have the same problem as described by KoreanJesus. 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, it remains the exact same. I am on 9.3.

1. regular install by selecting the plugin worked great. After install I logged in with mcserver, set up a world and my son played all night.
2. I had to reboot today. After reboot the problem started.

I did not add the linproc command. Is that still required?
  1. /sbin/mount -t linprocfs linprocfs /mnt/tank/jails/mineos_1/usr/compat/linux/proc
I executed an update, and it shows there were some changes made:

stock_profiles.py | 8 ++---
12 files changed, 93 insertions(+), 74 deletions(-)
root@mineos_1:/ # uname -a
FreeBSD mineos_1 9.3-RELEASE-p8 FreeBSD 9.3-RELEASE-p8 #0 r275790+153f322: Thu F
eb 5 14:47:50 PST 2015 root@build3.ixsystems.com:/tank/home/jkh/build/93/FN
/objs/os-base/amd64/fusion/jkh/93/FN/FreeBSD/src/sys/FREENAS.amd64 amd64

How do I restart to make those changes take effect btw? If I stop the plugin, the jail/mineos_1 directory empties out except for etc and usr and doesn't regenerate until I reboot again.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I have the same problem as described by KoreanJesus. 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, it remains the exact same. I am on 9.3.

1. regular install by selecting the plugin worked great. After install I logged in with mcserver, set up a world and my son played all night.
2. I had to reboot today. After reboot the problem started.

I did not add the linproc command. Is that still required?
  1. /sbin/mount -t linprocfs linprocfs /mnt/tank/jails/mineos_1/usr/compat/linux/proc
I executed an update, and it shows there were some changes made:

stock_profiles.py | 8 ++---
12 files changed, 93 insertions(+), 74 deletions(-)
root@mineos_1:/ # uname -a
FreeBSD mineos_1 9.3-RELEASE-p8 FreeBSD 9.3-RELEASE-p8 #0 r275790+153f322: Thu F
eb 5 14:47:50 PST 2015 root@build3.ixsystems.com:/tank/home/jkh/build/93/FN
/objs/os-base/amd64/fusion/jkh/93/FN/FreeBSD/src/sys/FREENAS.amd64 amd64

How do I restart to make those changes take effect btw? If I stop the plugin, the jail/mineos_1 directory empties out except for etc and usr and doesn't regenerate until I reboot again.
That command is needed whenever you restart your server, I just added it to Tasks > Post-Init command
If you don't have it run at startup just need to stop and start the plugin and it will run the command then.

As far as I know nothing is needed after updating the plugin like you did.

There's jail OS running from that directory so I doubt those files just disappeared when stopping mineos. Not sure what you are experiencing here.
 

slushieken

Dabbler
Joined
May 28, 2014
Messages
24
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?
Snip20150206_1.png
 
Top