Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How to install MineOS-node in a jail (alternative to using the MineOS plugin)

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
358
The screenshots look good. The transfer settings are context specific, based on what you select it may not show certain options when it thinks it's not relevant.

I would stop the jail before copying the files, and start it back up after the permissions are adjusted. Also, when you stop the jail, you'll have to remount linprocfs as in the first post, otherwise it won't behave properly; that may have been part of the issues you've noticed.
Once it's back up, I would download a new profile and create a brand new server as a test. You can use that to compare the ownership and permissions with the servers that you copied over.
 

DawnTreader

Neophyte
Joined
Mar 21, 2017
Messages
10
Dang! linprocfs... I guess I should have read all the other posts, cause I have skimmed them and you had mentioned that before.

I have some servers up, they are working great, but the transfer of the old one was getting me down. :( but I see now the linprocfs command was what I probably need. Will post again when I try that out.

Thanks a bunch!
 

error500

Junior Member
Joined
Nov 11, 2017
Messages
16
Code:
mount -t linprocfs linprocfs /mnt/LirpaM2/jails/mineos_jail/usr/compat/linux/proc
mount: /mnt/LirpaM2/jails/mineos_jail: No such file or directory


I copied everything in your guide command-for-command but this is giving me an error. I'm on 11.1 not sure if that makes a difference but I can't get neither the plugin nor this jail to start a server.

EDIT: Found out that I had another jails folder /jails_02/ under my volume, gonna go try to start a server again
 
Last edited:

error500

Junior Member
Joined
Nov 11, 2017
Messages
16
Code:
[20:45:42] [Server thread/INFO]: Starting minecraft server version 1.12.2
[20:45:42] [Server thread/WARN]: To start the server with more ram, launch it as "java -Xmx1024M -Xms1024M -jar minecraft_server.jar"
[20:45:42] [Server thread/INFO]: Loading properties
[20:45:42] [Server thread/INFO]: Default game type: SURVIVAL
[20:45:42] [Server thread/INFO]: Generating keypair
[20:45:42] [Server thread/INFO]: Starting Minecraft server on 10.0.0.55:25565
[20:45:43] [Server thread/INFO]: Using default channel type
[20:45:43] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[20:45:43] [Server thread/WARN]: The exception was: java.net.BindException: Can't assign requested address
[20:45:43] [Server thread/WARN]: Perhaps a server is already running on that port?
[20:45:43] [Server thread/INFO]: Stopping server
[20:45:43] [Server Shutdown Thread/INFO]: Stopping server
[20:47:15] [Server thread/INFO]: Starting minecraft server version 1.12.2
[20:47:15] [Server thread/WARN]: To start the server with more ram, launch it as "java -Xmx1024M -Xms1024M -jar minecraft_server.jar"
[20:47:15] [Server thread/INFO]: Loading properties
[20:47:15] [Server thread/INFO]: Default game type: SURVIVAL
[20:47:15] [Server thread/INFO]: Generating keypair
[20:47:15] [Server thread/INFO]: Starting Minecraft server on 10.0.0.55:20065
[20:47:15] [Server thread/INFO]: Using default channel type
[20:47:16] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[20:47:16] [Server thread/WARN]: The exception was: java.net.BindException: Can't assign requested address
[20:47:16] [Server thread/WARN]: Perhaps a server is already running on that port?
[20:47:16] [Server thread/INFO]: Stopping server
[20:47:16] [Server Shutdown Thread/INFO]: Stopping server


I can't find anything on this? I've tried multiple ports but nothing works
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
358

DawnTreader

Neophyte
Joined
Mar 21, 2017
Messages
10
Hey Jurgen, forgot to come back and say thanks for the help! I haven't transferred the old server over but i don't think i want to bother. i have a survival server going now that the boys and i are spending a lot of time on. making archives and restore points of that every time we play, the creative server that i was trying to restore has been forgotten.
 

TKFT

Neophyte
Joined
May 20, 2017
Messages
4
Hi, I installed everything as instructed but when I try and access the WebUI i get a message "The connection was reset". I can't figure out what is wrong but I have tried restarting and reinstalling but nothing seems to work. Any help is appreciated.
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
358
Hmm... there's not much to go on. What version of FreeNAS build are you running? (menu: System>Information)
Here are some pointers to help you troubleshoot:
  • Is linprocfs mounted? Run mount | grep linprocfs in FreeNAS, not the jail
  • Is the mineos service running? In the jail, run service supervisord status
  • Anything interesting in the log files? In your jail, look at file /var/log/mineos.log
  • Any firewall or antivirus that may be blocking the port or connection?
edit: corrected service name
 
Last edited:

TKFT

Neophyte
Joined
May 20, 2017
Messages
4
I am running FreeNAS 11.1-RELEASE and the linprocfs is mounted
Code:
root@Apollo-FreeNAS:~ # mount | grep linprocfs
linprocfs on /mnt/Jails/MineOS/usr/compat/linux/proc (linprocfs, local)

root@MineOS:/ # service supervisord status
supervisord is running as pid 80179.

root@MineOS:/var/log # cat mineos.log																																  
{"level":"info","message":"Starting up server, using commit: 66447ed added /compat/linux/proc to proc_paths (#265)\n","timestamp":"2018-01-03T23:58:10.233Z"}
{"level":"info","message":"Starting up server, using commit: 66447ed added /compat/linux/proc to proc_paths (#265)\n","timestamp":"2018-01-04T00:33:59.851Z"}


There shouldn't be anything blocking the connection and I can access the web pages for my other jails.

Edit: This is the screen I get

 
Last edited:

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
358
Thank you for the clarifications!
I suspect you haven't turned off SSL and are using http instead of https. You should either:
  • access the MineOS service using https, i.e. https://192.168.1.8:8443 You'll like get a warning "This page is not secure"; just click advanced & add an exception
  • or keep using http and edit the /etc/mineos.conf file to change the line use_https = true to use_https = false, save and execute
    service supervisord restart
    to make these changes take effect.
 

TheSuperBen

Newbie
Joined
Jan 13, 2018
Messages
1
Hi guys,

I recently updated to FreeNAS-11.1-RELEASE and I am now unable to create the mineos jail while following these instructions.

Upon inputting the < echo "CXX=c++ npm install" | sh > command I receive the following:

root@mineos_main:/usr/local/games/minecraft # echo "CXX=c++ npm install" | sh

> posix@4.0.2 install /usr/local/games/minecraft/node_modules/posix
> node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: read ENOTCONN
gyp ERR! stack at _errnoException (util.js:999:13)
gyp ERR! stack at Socket._read (net.js:504:20)
gyp ERR! stack at Socket.Readable.read (_stream_readable.js:445:10)
gyp ERR! stack at Socket.read (net.js:376:43)
gyp ERR! stack at new Socket (net.js:259:12)
gyp ERR! stack at createSocket (internal/child_process.js:241:11)
gyp ERR! stack at ChildProcess.spawn (internal/child_process.js:357:23)
gyp ERR! stack at exports.spawn (child_process.js:499:9)
gyp ERR! stack at PythonFinder.exports.execFile (child_process.js:209:15)
gyp ERR! stack at PythonFinder.checkPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:445:10
)
gyp ERR! System FreeBSD 11.1-STABLE
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/games/minecraft/node_modules/posix
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! posix@4.0.2 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the posix@4.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-01-19T04_37_28_428Z-debug.log

I have copied and pasted each step so far and this worked on another jail prior to upgrading.


Any assistance would be greatly appreciated!


Ben
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
358
Hi Ben! Unfortunately, it seems that the warden jail template has not been updated in FreeNAS 11.1 and the mismatch between older freebsd-version and the newer packages is causing conflicts. I would recommend to spin up an iocage jail instead. There are quite a few other threads explaining this process; the easiest way to do this would be from the command line of FreeNAS host, something like this:

Code:
iocage activate tank
iocage create -n mineos_jail ip4_addr="em0|192.168.0.222/24" -r 11.1-RELEASE mount_procfs=1 mount_linprocfs=1 boot=on

Be sure to replace tank, em0 and the ip-address with the values relevant to your system.

Enter the jail by using the command iocage console mineos_jail and then run through the steps from the first post, except the linprocfs stuff (see below).
Note that:
  • If you only have one pool, the first iocage activate command is optional, otherwise this is how you can/should indicate what pool you want your jails to be on.
  • You can skip the linprocfs stuff (i.e. the steps mkdir -p /usr/compat/linux/proc and the mount -t linprocfs linprocfs /mnt/tank/jails/mineos_jail/usr/compat/linux/proc at the end. The mount_linprocfs flag in iocage takes care of all that.
Once you're done, exit out of the jail and iocage restart mineos and you should be in business!
 

Cyfyguy

Neophyte
Joined
Jan 29, 2015
Messages
4
Hi Jurgen, any thoughts on my issue: node-gyp fails to rebuild after issuing

echo "CXX=c++ npm install" | sh


69 verbose stack Error: posix@4.0.2 install: `node-gyp rebuild`

69 verbose stack Exit status 7

69 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)

69 verbose stack at EventEmitter.emit (events.js:159:13)

69 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)

69 verbose stack at ChildProcess.emit (events.js:159:13)

69 verbose stack at maybeClose (internal/child_process.js:943:16)

69 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

70 verbose pkgid posix@4.0.2

71 verbose cwd /usr/local/games/minecraft

72 verbose FreeBSD 10.3-STABLE

73 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"

74 verbose node v9.3.0

75 verbose npm v5.6.0

76 error code ELIFECYCLE

77 error errno 7

78 error posix@4.0.2 install: `node-gyp rebuild`

78 error Exit status 7

79 error Failed at the posix@4.0.2 install script.

79 error This is probably not a problem with npm. There is likely additional logging output above.

80 verbose exit [ 7, true ]


Thanks,

-Cy
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
358
I would reinstall node-gyp and try again. Run the following in your mineos jail:

Code:
service supervisord onestop
cd /usr/local/games/minecraft
rm -rf node_modules
npm install -g node-gyp node-pre-gyp
echo "CXX=c++ npm install" | sh
 

Cyfyguy

Neophyte
Joined
Jan 29, 2015
Messages
4
I would reinstall node-gyp and try again. Run the following in your mineos jail:

Code:
service supervisord onestop
cd /usr/local/games/minecraft
rm -rf node_modules
npm install -g node-gyp node-pre-gyp
echo "CXX=c++ npm install" | sh

AAAAAAAND THE CROWD GOES WILD!!! Thanks!
 
Top