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)

obsodien

Member
Joined
May 4, 2014
Messages
41
Ok i may be a little late to the race... Currently:

Freenas 11.1 u4
Supermicro MBD-X10SDV_TLN4F-O
16gb RDMIMM
5x3TB RaidZ1

i have followed the steps listed above and I have actually been able to get to the HTTPS login web page but cannot login with the userid and password created with the adduser command. additional could not install npm4 pkg cause it could not be found so, i had to install npm....

A few listed outputs from previously requested info from other posts:

[root@mineos_jail /usr/local/games/minecraft]# echo "CXX=c++ npm install" | sh

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

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:397:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:170:21)
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.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.1 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-04-09T21_52_16_420Z-debug.log

[root@mineos_jail /usr/local/games/minecraft]# ls -al
total 644
drwxrwxrwx 7 games games 26 Apr 9 11:28 .
drwxrwxrwx 3 games games 3 Apr 9 11:26 ..
drwxrwxrwx 8 games games 13 Apr 9 11:26 .git
-rwxrwxrwx 1 games games 483 Apr 9 11:26 .gitattributes
-rwxrwxrwx 1 games games 513 Apr 9 11:26 .gitignore
-rwxrwxrwx 1 games games 4240 Apr 9 11:26 auth.js
-rwxrwxrwx 1 games games 1624 Apr 9 11:26 Dockerfile
-rwxrwxrwx 1 games games 1021 Apr 9 11:26 entrypoint.sh
-rwxrwxrwx 1 games games 2889 Apr 9 11:26 generate-sslcert.sh
drwxrwxrwx 7 games games 9 Apr 9 11:26 html
drwxrwxrwx 2 games games 6 Apr 9 11:26 init
-rwxrwxrwx 1 games games 35147 Apr 9 11:26 LICENSE.md
-rwxrwxrwx 1 games games 4217 Apr 9 11:26 mineos_console.js
-rwxrwxrwx 1 games games 262 Apr 9 11:26 mineos.conf
-rwxrwxrwx 1 games games 53901 Apr 9 11:26 mineos.js
drwxrwxrwx 308 games games 308 Apr 9 17:52 node_modules
-rwxrwxrwx 1 games games 127062 Apr 9 11:26 package-lock.json
-rwxrwxrwx 1 games games 2082 Apr 9 11:26 package.json
-rwxrwxrwx 1 games games 25355 Apr 9 11:26 profiles.js
-rwxrwxrwx 1 games games 4434 Apr 9 11:26 README.md
-rwxrwxrwx 1 games games 1276 Apr 9 11:26 reset_webui.sh
-rwxrwxrwx 1 games games 49682 Apr 9 11:26 server.js
-rwxrwxrwx 1 games games 772 Apr 9 11:26 service.js
drwxrwxrwx 2 games games 6 Apr 9 11:26 test
-rwxrwxrwx 1 games games 1058 Apr 9 11:26 update_webui.sh
-rwxrwxrwx 1 games games 9470 Apr 9 11:26 webui.js

[root@mineos_jail /usr/local/games/minecraft]# id mcserver
uid=1001(mcserver) gid=1001(mcserver) groups=1001(mcserver),13(games)

if there is any I have missed, please let me know... this was a second run through the instructions and got it right... for the most part...

UPDATE.
3rd attempt and got the same results.... consistent at least LOL
 
Last edited:

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
357
The core of the issue is that the warden jail template hasn't been updated in FreeNAS 11.1 and some of the node.js modules no longer work properly.

You'll have to switch to iocage. The good news is that there's an easy way to build a MineOS jail as of FreeNAS 11.1 U4.
From the FreeNAS command line, run the following as root:
The last string em0|192.168.0.100 you'll have to adjust for your installation:
  • em0: The name of your network interface. If you don't know, you can find using menu Network>Network summary
  • 192.168.0.100: Pick an IP address appropriate for your network/subnet
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/master/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.100"

That's it!

Note that you won't see this jail in the regular UI; iocage jails show the new/beta UI. You can run iocage list -P to see the status & service URL.
 

obsodien

Member
Joined
May 4, 2014
Messages
41
I went ahead and got it to install properly on a Virtual Freenas installation before trying on production server.... had issues creating via iocage so issued iocage detroy mineos to remove. upon attempt to go through creation process listed above, i seem to have lost the em0 interface....
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
357
If I understand correctly:
  1. You successfully managed to install MineOS in FreeNAS on a VM using the steps in post #62
  2. When trying to do the same on your production FreeNAS, you ran into issues.
Is that correct?

I seem to have lost the em0 interface....
3. What does that mean? Lost em0 on your host or on the jail? The output if ifconfig from
the FreeNAS host may be useful.

... had issues creating via iocage...
4. Any specific issues? Did it issue any error messages?
 

obsodien

Member
Joined
May 4, 2014
Messages
41
1. Correct, successfully got MineOS, connected and actually got a minecraft world up and running
2. first command ran fine downloading mineos.json
3. output of second command:

root@freenas:~ # iocage fetch -P -n mineos.json ip4_addr="em0|10.0.0.241"
Plugin: mineos
Using RELEASE: 11.1-RELEASE
Post-install Artifact: https://github.com/jsegaert/iocage-plugin-mineos.git
These pkgs will be installed:
- sysutils/rdiff-backup
- sysutils/screen
- net/rsync
- devel/gmake
- devel/git-lite
- lang/python2
- www/node8
- www/npm-node8
- java/openjdk8-jre
- ftp/wget
- shells/bash
ifconfig: interface em0 does not exist
jail: /sbin/ifconfig em0 inet 10.0.0.241 netmask 255.255.255.255 alias: failed

IFCONFIG outoput:

root@freenas:~ # ifconfig
ix0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether ac:1f:6b:60:53:54
hwaddr ac:1f:6b:60:53:54
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect
status: no carrier
ix1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether ac:1f:6b:60:53:55
hwaddr ac:1f:6b:60:53:55
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect
status: no carrier
igb0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
ether ac:1f:6b:60:50:02
hwaddr ac:1f:6b:60:50:02
inet 10.0.0.200 netmask 0xffffff00 broadcast 10.0.0.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
igb1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=6403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether ac:1f:6b:60:50:03
hwaddr ac:1f:6b:60:50:03
inet 10.0.0.201 netmask 0xffffff00 broadcast 10.0.0.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:d9:ef:ed:db:00
nd6 options=1<PERFORMNUD>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: epair2a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 9 priority 128 path cost 2000
member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 8 priority 128 path cost 2000
member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 7 priority 128 path cost 2000
member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 3 priority 128 path cost 20000
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:f6:50:00:07:0a
hwaddr 02:f6:50:00:07:0a
nd6 options=1<PERFORMNUD>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:f6:50:00:08:0a
hwaddr 02:f6:50:00:08:0a
nd6 options=1<PERFORMNUD>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair
epair2a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:f6:50:00:09:0a
hwaddr 02:f6:50:00:09:0a
nd6 options=1<PERFORMNUD>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair

and yet...
root@freenas:~ # iocage list -l
+-----+--------+------+-------+----------+-----------------+----------------+-----+----------+
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE |
| - | mineos | on | down | pluginv2 | 11.1-RELEASE-p9 | em0|10.0.0.241 | - | - |
+-----+--------+------+-------+----------+-----------------+----------------+-----+----------+

something worked...
 
Last edited:

obsodien

Member
Joined
May 4, 2014
Messages
41
will do, but i saw briefly during boot up where it cold not fine em0 in some config file...

ran as suggested and everything seems to have run just fine and now have login screen and created a minecraft world...no problems...
 
Last edited:

DR4GONSTEAR

Neophyte
Joined
Jun 9, 2018
Messages
5
2. Shell into your jail & install the necessary packages
Login as root to your jail and run the following commands:
Code:
pkg update
pkg upgrade -y
pkg install -y rdiff-backup rsync gmake screen git sysutils/py-supervisor node8 npm-node8 openjdk8-jre wget bash


This code here needs to install also install python, because I was getting heaps of errors, and after going through the errors, see below:
Code:
root@mineos_1:/usr/local/games/minecraft																		  # echo "CXX=c++ npm install" | sh

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

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON e							nv variable.
gyp ERR! stack	 at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node							_modules/node-gyp/lib/configure.js:483:19)
gyp ERR! stack	 at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_							modules/node-gyp/lib/configure.js:397:16)
gyp ERR! stack	 at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:							68:16)
gyp ERR! stack	 at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:							80:29)
gyp ERR! stack	 at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:							16
gyp ERR! stack	 at /usr/local/lib/node_modules/npm/node_modules/which/node_modules							/isexe/index.js:42:5
gyp ERR! stack	 at /usr/local/lib/node_modules/npm/node_modules/which/node_modules							/isexe/mode.js:8:5
gyp ERR! stack	 at FSReqWrap.oncomplete (fs.js:152:21)
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 v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.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-06-17T13_37_01_481Z-debug.log


Then added this code
Code:
pkg install -y python


And now I get
Code:
root@mineos_1:/usr/local/games/minecraft # echo "CXX=c++ npm install" | sh

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

gmake: Entering directory '/usr/local/games/minecraft/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
  SOLINK_MODULE(target) Release/obj.target/posix.node
  COPY Release/posix.node
gmake: Leaving directory '/usr/local/games/minecraft/node_modules/posix/build'
added 2 packages from 9 contributors in 13.724s
[!] 69 vulnerabilities found [1408 packages audited]
	Severity: 37 Low | 20 Moderate | 12 High
	Run `npm audit` for more detail


Just adding my two cents, since I've been stuck trying to get this to work for two days. Back then I didn't even know what python was, or that I could install it. Super noob here.
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
357
Hi, welcome to the Forums!

Thanks for pointing this out; This particular error has been reported in one of the posts above and depends on the versions of FreeNAS, pkg repo and jail manager.

Can you provide the output of the following:
  • In the FreeNAS host: cat /etc/version and zfs list | grep mineos
  • In the jail: pkg -vv
Also, did you get it up and running in the end? In the last snippet, it looks like the build ended successfully.
 

DR4GONSTEAR

Neophyte
Joined
Jun 9, 2018
Messages
5
Code:
root@DR4GON-FREENAS:~ # cat /etc/version
FreeNAS-11.1-U4 (89e3d93bc)
root@DR4GON-FREENAS:~ # zfs list | grep mineos
SYSTEM/jails/mineos_1											  569M   411G  2.14G  /mnt/SYSTEM/jails/mineos_1

Code:
root@mineos_1:/ # pkg -vv
Version				 : 1.10.5
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-11";
HANDLE_RC_SCRIPTS = false;
DEFAULT_ALWAYS_YES = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
	"/etc/pkg/",
	"/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:11:amd64";
ALTABI = "freebsd:11:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
HTTP_USER_AGENT = "pkg/1.10.5";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
	all-depends = "query %dn-%dv";
	annotations = "info -A";
	build-depends = "info -qd";
	cinfo = "info -Cx";
	comment = "query -i \"%c\"";
	csearch = "search -Cx";
	desc = "query -i \"%e\"";
	download = "fetch";
	iinfo = "info -ix";
	isearch = "search -ix";
	prime-list = "query -e '%a = 0' '%n'";
	prime-origins = "query -e '%a = 0' '%o'";
	leaf = "query -e '%#r == 0' '%n-%v'";
	list = "info -ql";
	noauto = "query -e '%a == 0' '%n-%v'";
	options = "query -i \"%n - %Ok: %Ov\"";
	origin = "info -qo";
	provided-depends = "info -qb";
	raw = "info -R";
	required-depends = "info -qr";
	roptions = "rquery -i \"%n - %Ok: %Ov\"";
	shared-depends = "info -qB";
	show = "info -f -k";
	size = "info -sq";
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = true;
PKG_CREATE_VERBOSE = false;
AUTOCLEAN = false;
DOT_FILE = "";
REPOSITORIES {
}
VALID_URL_SCHEME [
	"pkg+http",
	"pkg+https",
	"https",
	"http",
	"file",
	"ssh",
	"ftp",
	"ftps",
	"pkg+ssh",
	"pkg+ftp",
	"pkg+ftps",
]
ALLOW_BASE_SHLIBS = false;
WARN_SIZE_LIMIT = 1048576;
METALOG = "";
OSVERSION = 1100122;
IGNORE_OSVERSION = false;


Repositories:
  FreeBSD: {
	url			 : "pkg+http://pkg.FreeBSD.org/freebsd:11:x86:64/latest",
	enabled		 : yes,
	priority		: 0,
	mirror_type	 : "SRV",
	signature_type  : "FINGERPRINTS",
	fingerprints	: "/usr/share/keys/pkg"
  }


The only thing I'm unable to do, despite being able to ping 8.8.8.8 from the server and the jail, is download a profile to start a minecraft server.

edit: I just tried stopping and starting the jail and I get this:
Code:
root@DR4GON-FREENAS:~ # warden start mineos_1
Mounting user-supplied file-systems
jail -c path=/mnt/SYSTEM/jails/mineos_1 name=mineos_1 host.hostname=mineos_1 allow.raw_sockets=true persist vnet=new
Setting IPv4 address: 192.168.100.8/24
inet6_enable: YES -> YES
ip6addrctl_enable: YES -> YES
add net default: gateway 192.168.100.254
ls: /usr/pbi/*-amd64/lib: No such file or directory
Starting jail with: /etc/rc
 
Last edited:

Malpractis

Neophyte
Joined
Feb 16, 2016
Messages
4
Code:
fetch https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/master/mineos.json
iocage fetch -P -n mineos.json ip4_addr="em0|192.168.0.100"
Hey Jurgen,

I've just tried running this however I'm getting spammed with:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/games/minecraft/node_modules/posix/.node-gyp/8.11.3"

Which appears to run indefinitely. I'll try manually creating the iocage jail with the commands you suggested earlier in the thread.

*edit* manually creating the jail and running through the commands got everything up and running :)
 
Last edited:

DawnTreader

Neophyte
Joined
Mar 21, 2017
Messages
10
So... as Arnold would say...

I am back. I had to rebuild my NAS again cause a drive was failing and I tried to upgrade it to the latest version of FreeNAS and then deal with the drive. Both failed miserably. SO I am recreating my MineOS jail, my youngest son is pestering me to "get the server backup so we can play together again!"

But as luck would have it, I have run into more snags...

3. Install MineOS-node
Code:
mkdir -p /usr/compat/linux/proc
mkdir -p /usr/local/games
cd /usr/local/games
git clone git://github.com/hexparrot/mineos-node minecraft
cd minecraft
chmod +x *.sh
./generate-sslcert.sh
cp mineos.conf /etc/mineos.conf
echo "CXX=c++ npm install" | sh


If you do not care to use SSL/HTTPS, you can edit the mineos configuration file /etc/mineos.conf to change parameter use_https to false.
I got this far and after the last line, the echo line, I got an error.

upload_2018-10-7_22-50-52.png


Notice the "Shared object "libdl.so.1" not found, required by "libuv.so.1"

So is this a "fatal" problem or do I just move on to the next section? I am taking this one error at a time as I have already just moved on once before, this is about the third time I am trying to create this jail, to the next section and the jail failed to create a working MineOS install.

Not a criticism or complaint, but I was wondering if it might be time to redo this helpful guide and add in all the fixes and new steps and changes to the first post to make it more easily followable.

Any and all help appreciated.
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
357
What exact version are you on; I guess 11.1-something? This particular issue with libdl.so.1 has been popping up in the last few days with various other jails. The main cause is that FreeBSD 11.1 is EOL and the packages switched to 11.2.

The quickest & easiest way to get you going, is to switch your package repo to an older version before you install any packages. Start over with a clean jail and, in your jail, before step #2:
  • create a directory: mkdir -p /usr/local/etc/pkg/repos and then
  • create a file /usr/local/etc/pkg/repos/FreeBSD.conf with the following content:
Code:
FreeBSD: {
	url : "pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/release_2"
}

  • continue with step 2, and afterwards also install python2 with pkg install -y python2
  • continue with step 3, etc...
That should do it. :)

Alternatives, using the new plugin system:
  • follow the instructions in this thread to create an iocage plugin jail from the command line.
  • upgrade to 11.2 BETA
 

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
I ended up needing to do a few things extra to make it work on mine. I modified the instructions to make it work and it seems to work, my son is currently playing on it, give this a shot...

Run this to update and upgrade...

pkg update && pkg -y upgrade && portsnap fetch && portsnap fetch extract && portsnap fetch update



1. Create a standard jail.
I named the jail mineos_jail. You can call it whatever you want; the default settings should be OK.
<EDIT>The VIMAGE option may cause the system to hang, so I suggest to uncheck that checkbox</EDIT>

2. Shell into your jail & install the necessary packages

Login as root to your jail and run the following commands:

Code:
pkg update
pkg upgrade -y
pkg install -y rdiff-backup rsync gmake screen git python2 sysutils/py-supervisor node8 npm-node8 openjdk8-jre wget bash nano npm





[note: I added bash & wget, as I needed these to
run/instal specific Minecraft servers and scripts related to Spigot
and RaspberryJuice]

<EDIT 20NOV2017> changed package
www/npm to npm4, as the the latest version of npm got out of sync
with node</EDIT>

<EDIT 20APR2018> changed node &
npm4 packages to resp. node8 & npm-node8, as they were renamed
upstream</EDIT>



3. Install MineOS-node

Code:

mkdir -p /usr/compat/linux/proc
mkdir -p /usr/local/games
cd /usr/local/games
git clone git://github.com/hexparrot/mineos-node minecraft
cd minecraft
chmod +x *.sh
./generate-sslcert.sh
cp mineos.conf /etc/mineos.conf

edit the file "/usr/local/etc/pkg.conf" and add the
following in the first line:
set OSVERSION = 1101001

in
the file /etc/pkg/FreeBSD.conf change the property "url"
to:
url:"pkg+http://pkg.FreeBSD.org/${ABI}/release_2",

in the file
/usr/local/etc/pkg/repos/FreeBSD.conf change the property "url"
to:
url:"pkg+http://pkg.FreeBSD.org/freebsd:11:x86:64/release_2",

pkg update -f
pkg upgrade -f
pkg clean

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

If you do not care to use
SSL/HTTPS, you can edit the mineos configuration file
/etc/mineos.conf to change parameter use_https to
false.

4. Startup MineOS-node when jail starts

Code:
cat /usr/local/games/minecraft/init/supervisor_conf.bsd >> /usr/local/etc/supervisord.conf
echo 'supervisord_enable="YES"' >> /etc/rc.conf

5. Add a unprivileged user to use with the MineOS
web-ui

Use the adduser command to start the process
Code:
adduser

Allow the prompts; the result should more or less look like
the example below. I'm sticking to the same user mcserver as
the plugin.

Code:

[root@mineos_jail /usr/local/games/minecraft]# adduser
Username: mcserver
Full name: User for MineOS
Uid (Leave empty for default):
Login group [mcserver]:
Login group is mcserver. Invite mcserver into other groups? []: games
Login class [default]:
Shell (sh csh tcsh git-shell bash rbash nologin) [sh]: bash
Home directory [/home/mcserver]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username : mcserver
Password : *****
Full Name : User for MineOS
Uid : 1001
Class :
Groups : mcserver games
Home : /home/mcserver
Home Mode :
Shell : /usr/local/bin/bash
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (mcserver) to the user database.
Add another user? (yes/no): no
Goodbye!
Pw usermod mcserver -G wheel

6. Exit the jail & go back to FreeNAS webUI

a)Stop the jail

b) run the command:

Code:
mount -t linprocfs linprocfs /mnt/volume01/jails/mineos_jail/usr/compat/linux/proc

c) Start the jail again

Notes:
  • My pool is called volume01 and I named the jail mineos_jail, so be sure to change these values as needed
  • Consider adding the command in "Tasks>Init/Shutdown scripts" as a postinit command to ensure MineOS-node works after a reboot

You should now be able to access the MineOS webUI using the following URL:
https://<IP address of jail>:8443/admin/login.html
 

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
Well I just noticed that the server doesn't seem to save any created servers between reboots (jail restarts).

Anyone have any idea why this is?
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
357
Some questions to help you troubleshoot:
  • I notice you added user mcserver to the wheel group. What problem were you trying to solve doing this? You're supposed to use an unprivileged user to logon to the admin page. If you want to use more than one user to maintain servers and profiles, you can use the games group.
  • Did you do anything special with your MineOS data files (directory /var/games/minecraft/ and subfolders located in your jail), e.g. does the data folder just live in your jail, or do you have it mounted from your main pool using the "storage" functionality?
  • If you browse to the data folder, do your servers show in the servers subfolder? Check the permissions, they should be owned by mcserver:mcserver or mcserver:games Did you create a SMB share and added ACL permissions?
  • Is it just the servers that are disappearing? Are the "profiles" still there?
I don't run it in 11.1, as that release is problematic as you noticed in your post above. :D I'll update the first post with instructions to move-on to iocage & release 11.2. Note that the plugin in 11.2-RELEASE works fine.
 

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
OK, I saw your very valid point there about that user having wheel access. I've now removed it and set the user up with "pw usermod mcserver -G games,mcserver"
The idea was to give the user wheel access in the jail so my son could log in and modify the server as needed so he can learn command line stuff, however I may have made the mistake of adding mcserver to the wheel group there by removing mcserver from all other groups with the command given so I will edit that out of my modified how to.

To answer your second question, no I didn't do anything special with the /var/games/minecraft folder. I wanted to keep everything contained within the jail as i could also copy it out later of re-point that folder later if I'd like. That and I wanted to keep it decently simple to work on.

For the 3rd question, it was root:games I just changed it to mcserver:games

No I don't have a SMB share and no on the ACLs

The servers and profiles were seemingly not writing to the jail, though now that I've taken a look at the group settings of the user and file permissions, I think that was the issue. I'll let you know.

What is a IOCage
Ohh, good to know on the plugin working good in 11.2. I tried 11.2 and found my jails weren't even listed so I haven't upgraded yet.
 

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
Well just re-installed it all from scratch, set the permissions of the games folder to 775 mcserver:games, created a server called "Frinends", backed up the server, stopped the server then proceeded to reboot the jail.
Upon logging in, the interface isn't correct, things are missing and the created server is missing.
 
Top