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

How to install Minecraft server in a jail!

asw2012

Newbie
Joined
Dec 17, 2012
Messages
88
@cyberjock:

I do have an annoyance.... I am changing the ops.json file to add my name. I transfer back to server folder, start server, and as soon as it starts, it over-writes it back to blank/default. Would this be caused by the way the NAS box is setup or a MC problem? Would there be a different way to change this file so it's not over-written by the server?

thanks.
 

cyberjock

Moderator
Joined
Mar 25, 2012
Messages
19,148
No clue. I've never done whatever you are trying to do and I don't provide support for Minecraft on this forum (there's already a billion Minecraft forums out there). That file doesn't even exist in my Minecraft jail..
 

TremorAcePV

Newbie
Joined
Jun 20, 2013
Messages
88
@cyberjock This may not be a FreeNAS specific issue, but it seems like it's Jail network related. I've been helping thepokemonkid try and get the MC server working on another forum since this guide worked for me perfectly.

If it helps understand what his issue is (the thing causing that specific error), I asked him to ping www.google.com from within the MC jail, then ping his PC's IP address.

He had 100% packet receipt from www.google.com (i.e. the jail has access to the internet), but when he pings his own IP address, it has 100% loss of packets. I found that a bit bizarre. Apparently they are plugged into the same router and on the same subnet/IP range.

I kinda don't know what that could be. At first I thought it was because his ports were restricted in his router or something similar (as that error is most often caused by lack of connectivity between server and client), but I've never encountered this kind of issue before.
 

cyberjock

Moderator
Joined
Mar 25, 2012
Messages
19,148
Pings aren't supposed to go through to the jail in some situations. So that really doesn't prove anything in my book. ;)
 

TremorAcePV

Newbie
Joined
Jun 20, 2013
Messages
88
Pings aren't supposed to go through to the jail in some situations. So that really doesn't prove anything in my book. ;)
Define "through". The ping was done inside the jail to see if it could see the PC or the internet. I assume it has to do with network stacking.

For reference, I can ping my PC just fine from within my MC server jail (i.e. root@minecraftserver:/ # ping 192.168.1.10) , as well as the internet. Probably doesn't prove anything either since you said "in some situations", but still, mine works and his doesn't. Correlation =/= causation, but it does imply it, and the same principle applies here I think.

Regardless, do you know of any documents that would explain why pings won't always work through jails so I can read about it? It might help him with his problem and I might learn something. If you don't, it's cool. Thanks either way.
 
Joined
Jan 11, 2014
Messages
6
@cyberjock:

I do have an annoyance.... I am changing the ops.json file to add my name. I transfer back to server folder, start server, and as soon as it starts, it over-writes it back to blank/default. Would this be caused by the way the NAS box is setup or a MC problem? Would there be a different way to change this file so it's not over-written by the server?

thanks.
The ops file works differently since 1.7....8, I think it is. It confused me the other day too. Basically, it needs 3 parameters in JSON now instead of just a username in text; your username, its UUID, and the op level you want to set it at. A really quick way to do this is to just enter "op [username]" in the server console and it'll fill in the whole thing as needed, since you likely don't know your UUID off the top of your head anyway.

Anyway, since one of the things I'm planning to do once I got my FreeNAS box set up is putting a Minecraft server on it, I had something on my mind. If I want the MC server to run on an SSD (separate from the main storage pool), what would be the best practice to configure that, or is IO on RAIDZ not considered a tight enough bottleneck to bother?
 

asw2012

Newbie
Joined
Dec 17, 2012
Messages
88
The ops file works differently since 1.7....8, I think it is. It confused me the other day too. Basically, it needs 3 parameters in JSON now instead of just a username in text; your username, its UUID, and the op level you want to set it at. A really quick way to do this is to just enter "op [username]" in the server console and it'll fill in the whole thing as needed, since you likely don't know your UUID off the top of your head anyway.

Anyway, since one of the things I'm planning to do once I got my FreeNAS box set up is putting a Minecraft server on it, I had something on my mind. If I want the MC server to run on an SSD (separate from the main storage pool), what would be the best practice to configure that, or is IO on RAIDZ not considered a tight enough bottleneck to bother?
Hi there, thanks for the reply. What I've done instead of going the edit the .json file is I went into the minecraft console via PuTTY (Thanks cyberjock for the directions on this) - I just op'd myself through there.

Also, it's funny you mention something about bottle-necking. Since I have the console open now (different computer) I watch eveything that's going on. one thing I noticed that was peculiar are all the messages "Can't keep up! Did the system time change, or is the server overloaded? Running 'xxxx' ms behind, skipping 'xx' ticks" This is only when I log in, I have my graphics set maxed out (see far chunks). It does not happen on the wife's computer, her graphics are set to view closer.

I think I've set the memory usage to 1G-2G with this command through the Shell on the FreeNAS GUI

# sysrc minecraft_java_opts="-Xms1G -Xmx2G"
then
# service minecraft stop

How am I able to check for sure how much RAM I am using? For reference, if this info is useful, I have 16G RAM with 8-3TB drives setup in RAIDz2

Would it be beneficial to add 16G RAM and increase the Minecraft usage to, say 8G?
 
Joined
Jan 11, 2014
Messages
6
Hi there, thanks for the reply. What I've done instead of going the edit the .json file is I went into the minecraft console via PuTTY (Thanks cyberjock for the directions on this) - I just op'd myself through there.
Yeah, that's what I meant by using the server console.

Also, it's funny you mention something about bottle-necking. Since I have the console open now (different computer) I watch eveything that's going on. one thing I noticed that was peculiar are all the messages "Can't keep up! Did the system time change, or is the server overloaded? Running 'xxxx' ms behind, skipping 'xx' ticks" This is only when I log in, I have my graphics set maxed out (see far chunks). It does not happen on the wife's computer, her graphics are set to view closer.

I think I've set the memory usage to 1G-2G with this command through the Shell on the FreeNAS GUI

# sysrc minecraft_java_opts="-Xms1G -Xmx2G"
then
# service minecraft stop

How am I able to check for sure how much RAM I am using? For reference, if this info is useful, I have 16G RAM with 8-3TB drives setup in RAIDz2

Would it be beneficial to add 16G RAM and increase the Minecraft usage to, say 8G?
Dunno about the checking the amount of RAM (but with Java, you can just assume it'll use all of the RAM you allow it to, so 2GB), but the "Can't keep up" message is pretty standard when loading up several chunks at a time. If it only happens when you log in (and the amount of ticks skipped is pretty low), then your setup is pretty much fine as is, especially if you're just running Vanilla for only 2 people.
 

cyberjock

Moderator
Joined
Mar 25, 2012
Messages
19,148
How am I able to check for sure how much RAM I am using? For reference, if this info is useful, I have 16G RAM with 8-3TB drives setup in RAIDz2

Would it be beneficial to add 16G RAM and increase the Minecraft usage to, say 8G?
In that setup, with 24TB of disks, I'd go to 32GB with your Minecraft jail if it won't break your bank. I run Minecraft in a jail on my server and I've seen it eat as much as 3GB of RAM. I have my settings as xms1g xms6g. The reason I didn't increase the xms is that it only sets a lower limit. I see no reason to "force" minecraft to use a bunch of RAM if the server is idle. So I let it sip on RAM if it needs and go hog wild if it needs to.
 

asw2012

Newbie
Joined
Dec 17, 2012
Messages
88
In that setup, with 24TB of disks, I'd go to 32GB with your Minecraft jail if it won't break your bank. I run Minecraft in a jail on my server and I've seen it eat as much as 3GB of RAM. I have my settings as xms1g xms6g. The reason I didn't increase the xms is that it only sets a lower limit. I see no reason to "force" minecraft to use a bunch of RAM if the server is idle. So I let it sip on RAM if it needs and go hog wild if it needs to.
Thanks for the advice, I will install 16G more. Not a big deal.
 

Skilty

Newbie
Joined
Sep 13, 2012
Messages
17
Fantastic guide cyberjock as always!

MC up and running in less than 30 minutes. The only thing I did that was slightly different, symbolic link for minecraft_server.jar to whichever version I want to run the server on. Now to setup McMyAdmin, then I can ditch the Minecraft server hosted on FragNet!

Also need to order another 16GB of ECC...
 

pelle1101

Newbie
Joined
Apr 3, 2013
Messages
11
So after I got this server setup back in Feb, I've been playing MC up until about 2 months ago. I wanted to get back into again so I tried launching the game and received the java.netConnectException error. I thought maybe updating the server jar would fix it but I received the same error. I created a brand new jail and I am still receiving the same issue.
 

pelle1101

Newbie
Joined
Apr 3, 2013
Messages
11
LMAO....in 1.7.10, you need to agree to the EULA to continue playing....give me a break. After changing the EULA to true, it started working again.
 

Skilty

Newbie
Joined
Sep 13, 2012
Messages
17
I skipped McMyAdmin, it can't report server CPU or memory usage so opted for a MineOS installation instead. Up and running and Fragnet sub cancelled.
 
Joined
Oct 15, 2014
Messages
1
Anybody using this approach see issues with your world data saving? Even if I never shut down the server, when players leave and come back, often times (but not always), much of their progress will have been lost.
 

Skilty

Newbie
Joined
Sep 13, 2012
Messages
17
Anybody using this approach see issues with your world data saving? Even if I never shut down the server, when players leave and come back, often times (but not always), much of their progress will have been lost.
Has been working fine for me following the guide by cyberjock to configure the Jail. After that I then branched off onto the install MineOS on FreeBSD as the GUI downloads the various versions of MC. The only problem I had was with linprocfs, took me a while to figure that one out. If the server goes down I have to run the command manually before the MineOS GUI works.
 
Joined
Apr 6, 2015
Messages
1
I have everything work and I get to step 8, but I cannot connect to my server on minecraft ! !
 

KenNashua

Newbie
Joined
Feb 24, 2012
Messages
55
So my server doesn't start up after each power outtage or server reboot. I can't quite figure out what's going on.

I added a set -x on the /usr/local/etc/rc.d/minecraft file to debug and get the following on "service minecraft status"

+ debug 'run_rc_command: doit: minecraft_status '
+ eval 'minecraft_status '
+ minecraft_status
+ minecraft_running
+ local check ses
+ ses=minecraft-session
+ su -m minecraft -c '/usr/local/bin/screen -list'
+ grep minecraft-session
+ check=' 9227.minecraft-session (Dead ???)'
+ [ ' 9227.minecraft-session (Dead ???)' ]
+ return 0
+ echo 'minecraft is running.'
minecraft is running.
+ _return=0
+ [ 0 -ne 0 ]
+ return 0
+ _run_rc_postcmd
+ [ -n '' ]
+ return 0
+ return 0

/var/run shows no minecraft.pid file, but does have mcwatchdog.pid

Suggestions?
 

Skar78

Newbie
Joined
Mar 18, 2014
Messages
15
I have tremendous issues with getting it to work with adding the following ops:
"-server -Xms512m -Xmx2048M -XX:permSize=256m -d64 -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:parallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"

This is for an fTB inifinity 2.2.2 server and the server starts up nicely if i just use manually:
"java -server -Xms512m -Xmx2048M -XX:permSize=256m -d64 -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:parallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar FTBServer-1.7.10-1558.jar nogui"

But throws memory issues with me adding the same stuff to the "minecraft" file.
 
Top