SOLVED MineOS not automatically starting with FreeNAS

Status
Not open for further replies.

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
I am using Freenas 11.0-u4 with Mineos Plug in 9.3.5.
With some tinkering, thanks mostly to tips found in various threads on this forum I have been able to get the MineOS plug in working. Its a long story getting there but to abbreviate I had issues starting the 1.12 version of server. After installing plug in, manually adding jdk8, restarting jail and nas and fixing the network settings for the plugin/jail I am successfully able to create and import worlds and start them.

The only problem I have is the plug in will not start with the freenas. I have to manually open the plug in page and start it. The plug in states I need to add this as a Post Init command:

mount -t linprocfs linprocfs /mnt/NAS/jails/mineos_1/usr/compat/linux/proc

But this makes no difference and the plug in still has to be manually started but everything works. If I change the above line to a Pre Init command, when the FreeNAS starts, it shows the plug in is started, but I cannot start any of the servers/worlds.

I guess next I am going to try just setting up MineOS in a standard jail instead of trying to use the plug in and see if I can make that work. But I would much rather use the plug in if possible for simplicity.
 

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
Ok correction, if I enable that line as a post init command the plug in does not start automatically. I can start it manually and access the MineOS web gui, but I cannot start servers.

if I enable the command as a pre-init the plug in does start at freenas boot up, but I also still cannot start servers.

Is there a log that might help me track down the issue? The logging tab in the webui is not accessible, and I never get any error about the server failing to start.
 
Joined
Jul 10, 2016
Messages
521
if I enable the command as a pre-init the plug in does start at freenas boot up, but I also still cannot start servers.

That is correct, the mount of linprocfs is supposed to be a pre-init command.
So if I understand correctly...
  • The plugin itself behaves as expected.
  • You can you login to the MineOS webgui
  • Somehow when you attempt to start a minecraft server, it fails to start.
You can do the following to troubleshoot. Go to the command line in your jail and:
  • Look at the main logfile /var/log/mineos.log
  • Look at the minecraft server specific logfiles, typically /var/games/minecraft/servers/<your_minecraft_server>/logs/*.log
I agree that the MineOS plugin has quite a few issues. I tried install the plugin in a fresh installation of FreeNAS-11.0-U4 (54848d13b) and managed to get a vanilla 1.12.2 minecraft server running.

If you can't figure out what's wrong, and are willing to create/reinstall a new plugin jail from scratch, below are the steps I went through. I apologize for being overly verbose, but I do not know your skill level and other readers may find this useful.
  • Installed FreeNAS-11.0-U4 (54848d13b)
  • Installed the MineOS plugin, version 9.3.5
  • Review the jail network settings. Turn off VIMAGE & restart the mineos_1 jail
  • Go to command line in jail and execute the following:
Code:
pkg update
pkg upgrade -y
pkg install -y npm4 openjdk8
sed -i '' -e 's|^\(command="\).*\("\)$|\1/usr/local/bin/node\2|' /usr/local/etc/rc.d/mineos
sed -i '' -e 's|^\(start_precmd="\).*\("\)$|\1export PATH=$PATH:/usr/local/bin:/usr/pbi/mineos-amd64/bin\2|' /usr/local/etc/rc.d/mineos
sed -i '' -e 's|^\([[:space:]]*\)/.*/npm\([[:space:]].*\)$|\1CXX=c++ /usr/local/bin/npm\2|' /usr/local/etc/rc.d/mineos
service mineos oneupdate


In FreeNAS, now go ahead & mount linprocfs mount -t linprocfs linprocfs /mnt/tank/jails/mineos_1/usr/compat/linux/proc

Finally, start the plugin service from the plugins>installed tab
 
Last edited:

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
perfect, thank you sir. I have no issue reloading from scratch as I am just getting this all configured. I will try this when I get home this evening. I am quite computer literate, but this is my first experience with FreeNAS/BSD/UNIX and my Linux knowledge is quite limited as well - I have been in exclusively Window's environments until recently.

And a couple follow up questions:

1. From what I had experienced I cannot turn off Vimage unless I manually specify the IP settings for the MineOS jail. Does that seem correct? I can change the settings and manually specify the IP I had set it to pull but wanted to make sure that would be the correct procedure.

2. On the last step you listed - the mount linprocfs; do I run this command at the Freenas shell or put it back in as a Pre-Init Tasks from the Freenas webui?

Thanks for your time and assistance.
Clint
 
Joined
Jul 10, 2016
Messages
521
1. From what I had experienced I cannot turn off Vimage unless I manually specify the IP settings for the MineOS jail. Does that seem correct? I can change the settings and manually specify the IP I had set it to pull but wanted to make sure that would be the correct procedure.
That is correct, it also forces you to uncheck IPv4 DHCP checkbox. Somehow networking in the jail wasn't working for me with VIMAGE checked, but that could have been a side effect because I was doing this in a VM. Note that I have my jails configured to assign an IP address outside the DHCP range of my router, as per the manual.

2. On the last step you listed - the mount linprocfs; do I run this command at the Freenas shell or put it back in as a Pre-Init Tasks from the Freenas webui?
You have to do both. The first time I execute it manually, so it takes effect immediately. The point of the pre-init command is that it is executed when you reboot your FreeNAS system, so you don't have to remember doing this whenever you reboot. Note that, if for any reason you stop of reboot the mineos_1 jail, the mount gets lost and you have to rerun this command before starting the jail otherwise some of the functions in the MineOS webui won't work properly.
 

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
Awesome thanks. I am excited to try again when I get home this evening and will report my results back here. Hopefully this is all I need and ill have a happily working mineos plug in and I can move on to my next issue - vm's in the freenas.
 

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
Thank you sir. The plug in is now successfully starting automatically with the FreeNAS. I apparently am missing something in regards to networking though. The server I setup starts, then immediate crashes and it looks like its network setting related so now I am trying to figure that out. My FreeNAS box has 2 network ports, both configured to static IP via DHCP static mappings - 172.16.1.250 and 251, dhcp server/router is 172.16.1.1. Here are some of the crash details I am getting if anyone has any pointers - it looks like the plugin is not being provided complete IP information unless its just being cut off on line 2.

[00:54:19] [Server thread/ERROR]: Encountered an unexpected exception
java.net.UnknownHostException: 172.16.: hostname nor servname provided, or not known
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_152]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[?:1.8.0_152]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[?:1.8.0_152]
at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[?:1.8.0_152]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_152]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_152]
at java.net.InetAddress.getByName(InetAddress.java:1076) ~[?:1.8.0_152]
at nz.j(SourceFile:158) ~inecraft_server.1.12.2.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:434) inecraft_server.1.12.2.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
[00:54:19] [Server thread/ERROR]: This crash report has been saved to: /var/games/minecraft/servers/test/./crash-reports/crash-2017-12-12_00.54.19-server.txt
[00:54:19] [Server thread/INFO]: Stopping server
[00:54:19] [Server Shutdown Thread/INFO]: Stopping server
 
Joined
Jul 10, 2016
Messages
521
Can this be an "application error"? In the MineOS webui, please check the "server.properties" tab for your server and check the field "server IP". I suspect you fat-fingered some junk in there, i.e. a partial IP address. This field can be left blank, or just 0.0.0.0
 

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
If by application error you mean human typo/sloppy clicking, looks like that was it. My bad. Thanks so much for your assistance all appears to be working for me now. I redid it all one more time from start to finish but in my case I left DHCP on and VIMAGE checked. Not sure yet what the consequences of that will be. However the MineOS plug in started as ON with the FreeNAS and the actual mineos ui works and the actual server is alive and broadcasting without any user intervention, which is exactly what I was looking for.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Ah ... great then. After my short-lived Corral endeavour I ignored the Warden based "old-style" plugins. OTOH iocage has not yet reached feature parity. E.g. running a DHCP server inside an iocage jail is not supported. So I switched everything to VMs. Given enough memory that works great for the services I need.

Patrick
 

cdfurry

Cadet
Joined
Dec 9, 2017
Messages
7
Well thanks for that suggestion Patrick. I am happy with the way the Plug in is working for me now. But I have so far not been able to get any VM's running in BHyve so perhaps this will help me get that going as that is my next project to work on with Freenas. I have my storage working, and Plex was super simple to setup and update. I spent way more time on the MineOS plug-in that I should have but I think it really helped my understanding of the entire system. I still have some things to work out with permissions to the minecraft files first. So unless this new information helps me get a VM going I will likely be starting a new thread for some help with VM's later this week.
 
Status
Not open for further replies.
Top