Wednesday 4 February 2015

Raspberry Pi 2 or 3 - Minecraft Server

The new Raspberry Pi 2 has got twice the RAM and a load more processing power, so will it make a better Minecraft server?  The old Pi made an adequate Minecraft server providing you only had a few players and you kept the view distance low.

Update - The Pi 3 takes it up a step and provides more stability and connectivity is a lot easier.


I tried both the vanilla server and a spigot server, both similar results, both performed reasonably well, but Spigot seemed a little more stable (but this is only based on feeling).  I was only able to test with up to 3 players but it worked well under those conditions.


Setting up your own server is pretty simple.

You will need to download either the vanilla server from Mojang or build your own spigot server jar file.

Note - The instructions below, will take you through how to create a vanilla server, if you have built spigot the only difference will be the name of the 'jar file' you put into the start.sh file

1. Make a directory for your Minecraft server

mkdir ~/MinecraftServer
cd ~/MinecraftServer

2. Download the 1.8.1 vanilla Minecraft server jar file

wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8.1/minecraft_server.1.8.1.jar

3. Create a script to run the server jar file

nano start.sh

Enter the following command which will run the server

java -Xmx1024M -Xms512M -jar minecraft_server.1.8.1.jar nogui

Ctrl X to exit & save

4. Make the script executable:

chmod +x start.sh

5. Run the server

./start.sh

You should receive a message asking you to accept the EULA.



6. Accept the EULA (end user license agreement), open eula.txt

nano eula.txt

Change:

eula=false

To:

eula=true

Ctrl X to save and exit

7. Run the server

./start.sh

The first time the server runs it will take a while to start as it creates a new world.

Once you see the word "Done", the server is up and running and you should be able to connect to the server using Minecraft choosing Multiplayer, Direct Connect and entering the IP address of the Pi.


You can shutdown the server by typing the command "stop" in the command window .

If you find the server is slow, particularly when generating chunks (i.e. creating new bits of the world when you get to the edge), you could try reducing the view distance.  I reduced it from 10 to 7 and this seemed to make the server more responsive.

8. Edit view-distance in server.properties

nano server.properties

Change:

view-distance=10

To:

view-distance=7

Ctrl X to save and exit

Restart the server for the change to take effect.

118 comments:

  1. Excellent! Did you overclock/overvolt at all?

    ReplyDelete
    Replies
    1. No, that was on a 'normal' Pi2

      Delete
    2. Got it running ... couple things. I was running Apache, PHP, MySQL and PostSwitch on it ... it would load up, and run for a few minutes, but as I started walking around the server kept falling behind and would eventually crash.

      At first it was doing it regularly, so I Overclocked it - roughly the same effect. Then I changed the memory swap ... all the way down to 16 for GNU - this died quick ...then all the way up to 256.

      at 256 it lasted about 5 minutes longer. I think a fresh install will be my next test, and ONLY running Minecraft.

      I'll update with results

      Delete
    3. I tried using the vanilla server on my B+ but it was super slow to start up and crashed when I went on it. I then disabled a lot of extras like animals, mobs, and villages in the server.properties file. I also overclocked my Pi to "turbo." Even then, it crashed after about a minute. I wasn't running anything else at the time. The only other thing I have installed is the tightvncserver. What could I try to make the server work?

      Delete
    4. I have previous run a Minecraft server on a Raspberry Pi 1 (not the 2 which this post is about) http://www.stuffaboutcode.com/2013/09/raspberry-pi-setup-minecraft-server.html using Spigot.

      I had to change the memory config and turn the view distance down considerably to make it stable.

      Delete
    5. in the terminal:
      sudo nano /etc/rc.local

      then add:
      bash /home/minecraft-start.sh

      ^ change that to whatever your sh file's path & name is

      Delete
  2. Replies
    1. What OS on the Raspberry Pi? Raspbian.

      Delete
    2. Did you use the standard .cfg file? I have tried this but the server lags and eventually crashes.

      Delete
    3. The only thing I did was change the view distance from 10 to 7. Ill update the post with a how-to

      Delete
    4. I would also recommend trying the spigot build, it does tend to be perform better than the vanilla build but in my limited tested I didnt really notice a big difference.

      Delete
    5. Thanks, i used a view distance of 5 and allowed flight but if i flew to far and to fast it crashed. I did try the spigot build but ran into difficulties. I followed your link and eventually it seemed to of built but going to the spigot folder shows no .jar files

      Delete
  3. You can also use MCServer. It's a C++ Minecraft server. We managed to get around 7 players with the previous Pi (although we did disable some things like entities, water/lava physics and redstone).

    ReplyDelete
    Replies
    1. I'm running MCServer too now, and even though it is not feature complete, it is MUCH more performant, and runs without a hitch. Download, untar, run, works. Seriously, this one is awesome!

      Delete
    2. Thanks for trying :) We put a lot of free time and effort in the project, but it's hard to keep up with vanilla, so we're still looking for more developers.

      Delete
    3. MCServer... I thought I was running that, but mine is the 1.8.3 .jar...
      That sounds like java, not C++...
      Where can I download a C++ MCServer from? That should (could) be a lot faster than the Java-server!

      Delete
    4. You can find it here. Download the arm version for the Pi. :)
      http://mc-server.org

      Delete
    5. There are six people (me included) playing on MCServer every day now, and we had only very few problems. There are some bugs, but everyone is enjoying, and willing to wait. I just wish the thing had version numbering. I never know when a new version is out. With actual changes, not a snapshot.

      Bugs: Doors fall out of frames if they're not placed in a specific way. Chests, doors and beds multiply or re-appear in your inventory. We have monsters disabled after we encountered invisible creepers. Pictures disappear, and item frames cause errors and nearby blocks get deleted.

      But once you know these things you're good! I just wish I knew when something is fixed so I could redownload.

      Delete
    6. One last note ... I tried downloading the latest Linux arm package and the binary is broken. Can't be executed.

      Delete
    7. Thanks for pointing me towards http://mc-server.org
      I managed to build the executable from source (on my Pi2).
      Will ask my son, who is a MineCraft user, to give it a try one of these days.

      Delete
    8. No problem! This time it should really create a world.ini for you, that you can modify as well. By default the world has a specific default seed, is endless, has monsters, and is uncompressed - and really large. My world.ini download link in the older comment should still work.

      It'll have no monsters at night (they are horribly bugged), a max world radius of about 70 chunks, and compression enabled.

      Delete
    9. On a sidenote, it makes sense to download the plugin "NoChunkFall" from the link below, for installations on the Pi, so people do not fall through the empty world or suffocating in rocks when spawning, and it loads too slow.

      https://github.com/DevToaster/NoChunkFall/archive/master.zip

      There is a Plugins directory with subdirectories for each. Unzip this one into a folder called NoChunkFall, and then edit settings.ini -- find the plugins section and add what you need:

      [Plugins]
      ; Plugin=Debuggers
      ; Plugin=HookNotify
      ; Plugin=ChunkWorx
      ; Plugin=APIDump
      ; Plugin=NoFireSpread
      Plugin=Core
      Plugin=TransAPI
      Plugin=ChatLog
      Plugin=NoChunkFall

      Delete
    10. @Jammet
      When installing the NoChunkFall stuff, as you suggested, it looks like I get a NoChunkFall-master (not a NoChunkFall) so the settings.ini should be edited adding: Plugin=NoChunkFall-master
      Is that correct?

      When I start the server using that I see:
      [10:57:30] -- Loading Plugins --
      [10:57:30] Initialised NoChunkFall for RasPi v0.3
      [10:57:30] WARNING: IT IS NOT ADVISED THAT YOU RELOAD THE SERVER WITH NoChunkFall ACTIVATED!!!

      Delete
    11. Yes that's the correct one. I just forgot that I renamed it so that the -master isn't in the name anymore. :) Sorry about that.

      Delete
    12. Seems to be running well and fast! I have one question though…
      We live in The Netherlands and my son, the real MineCraft Player here, prefers a flat world to build on. I have tried to set: level-type=FLAT in the [general] part of the world.ini and also in the settings.ini, but that doesn't seem to work.
      Can you give me a hint? Is there any docs somewhere about the structure and possibilities of both .ini-files?

      I have created a script that installs MCServer from scratch and I am having quite some fun building and rebuilding it just about everyday… It takes about an hour on my Pi2, which is connected to the internet over a 4Mbps ADSL link.

      Delete
    13. To be honest, I have no idea. Maybe - just maybe, you could pre-generate a flat world in standard Minecraft, spend some time wandering and generating a lot of chunks, before then copying the world data to MCServer, and see if that works out reasonably well? The world files are compatible, even if the generators don't produce the same results.

      Maybe using a search-engine you could find seeds that generate a world that's more level than other ones, but the world generator here is not at all likethe one in original Minecraft and it could look awkward.

      Amazing work on the build script. I could imagine the people at the MCserver Forum (the actively developing people there) might be interested in such a thing as well. At the very least they'll be able to provide definite answers world generator questions. :)

      Delete
    14. I've asked for what you are looking for on the MCServer Forum. Here is how you do it:

      You do that by going to your world's world.ini and changing the values in [Generator] to:
      BiomeGen=Constant
      ConstantBiome=Plains
      HeightGen=Flat
      FlatHeight=5
      CompositionGen=Classic
      ClassicSeaLevel=0
      ClassicBeachHeight=-1
      Finishers=

      Delete
    15. Thanks! Will try that tomorrow!

      Delete
    16. The fact that the server-commands appear to be different from 'the other server' makes it hard for me to get my son to play with it, although he did say that this C++ version appears to be a lot faster.

      Delete
    17. There is a Plugin called essentials that might introduce the commands he is looking for, fingers crossed. I wish I could help,but at that point, they're really different by design ..

      https://github.com/tonibm19/Essentials
      (Download ZIP button on the right)

      Delete
    18. Thanks! Just installed the plugin. Will ask my son to reconsider ;-)

      Delete
  4. I used to run a Spigot server with a reduced map distance and pre-generated light map with reduced max-height test with 5 players, ran well... but i wonder, there used to be automatic builds of Spigot jars.. They don't exist anymore? I guess i'm gonna try to build the server later. Just in case, would you be nice enough to provide the build of Spigot you ran? :)

    ReplyDelete
    Replies
    1. Unfortunately, legally, you cant provide a prebuilt spigot server.

      Delete
  5. Ow :( After quite some time... Spigot compilation ended up with a "BUILD FAILURE".

    ReplyDelete
    Replies
    1. Just in case it could help someone else, i could finally build Spigot.
      From the buildtool page, they say to do
      "sudo apt-get install git openjdk-7-jdk tar"
      So i had installed openjdk-7-jdk and i don't know which version was installed before that. By removing that package (and autoremove the rest) and because i couldn't run a vanilla server anymore, i could then successfuly build Spigot.

      Delete
    2. Anyone have a clean Pi 2 specific Spigot build document? I tried to remove the JDK, but the build is still failing and my vanilla server will no longer run now. Will have to start over again.

      Delete
    3. https://pimylifeup.com/raspberry-pi-minecraft-server/

      the link above is perfectly detailed in setting up a spigot server on the pi 2

      Delete
  6. Hi Guys, I'm getting the following error when trying to setup vanilla minecraft server - at step 5 above ... i have got this working on my mint 17 box, but i'm stumped on the pi - does this point to a corrupt micro sd card?

    Thanks in advance :)

    pi@pi2 ~/MinecraftServer $ ./start.sh
    ./start.sh: line 1: 3128 Segmentation fault java -Xmx1024M -Xms512M -jar minecraft_server.1.8.1.jar nogui

    ReplyDelete
    Replies
    1. Segmentation fault has the smell of something seriously wrong.

      Delete
    2. I was getting the segmentation fault when I used the old version of n00bs on the new pi 2 b ... put on 1.4 and it went away.

      now i've got my pi2 b build ... followed your instructions, and when i run .start.sh i get:

      Initial heap size set to a larger value than the maximum heap size.

      any advice?

      Delete
  7. Could you try this while the raspberry pi 2 is overclocked(core_freq and arm_freq) with view-distance 10?

    ReplyDelete
  8. For some reason trying to start the vanilla Minecraft server doesn't work at all. It doesn't ask me for the EULA. It doesn't say anything. It just keeps loading stuff and then stops loading stuff and before it takes a dirtnap. :(

    ReplyDelete
    Replies
    1. Is there anyone who might have an idea about why this could be? We're running the exact same software on the same hardware ... you'd think this would behave the exact same.

      Delete
  9. Hoping you can help me out with this. I'm also having difficulty after trying to start the server with ./start.sh as above. After running it, I get the following:

    ERROR Cannot access RandomAccessFile {}) java.io.FileNotFoundException: logs/latest.log (Mo such file or directory)
    ERROR Unable to invoke method createAppender in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element
    RollingRandomAccessFile java.lang.reflect.InvocationTargetException

    Followed by a wall of text that just scrolls continuously until I hit ctrl+pause/break

    I've got Raspbian/Debian Wheezy that I downloaded from the Pi downloads page last week.
    Java 1.8.0
    JRE build 1.8.0-b132
    HotSpot Client VM build 25.0-b70 mixed mode

    ReplyDelete
    Replies
    1. Mmmm - Im wondering if think the error you have picked out above is not the error that is actually causing the problem. I have a feeling that the minecraft server reports this error on first boot before then creating the logs/latest.log file. What does the wall of text say? Anything interesting?

      Delete
  10. @Martin I am getting the following warning during startup of the Vanilla server. Any suggestions?

    Java HotSpot(TM) Client VM warning: You have loaded library /tmp/libnetty-transport-native-epoll4577557247436507689.so which might have disabled stack guard. The VM will try to fix the stack guard now.

    ReplyDelete
    Replies
    1. Sorry I dont, other than rebuild from the latest version of raspbian and try again!

      Delete
    2. Same here after simply downloading the 1.8.3 server file and activating that. It gives:
      [13:31:40] [Server thread/INFO]: Starting Minecraft server on *:25565
      Java HotSpot(TM) Client VM warning: You have loaded library /tmp/libnetty-transport-native-epoll4321536857884905119.so which might have disabled stack guard. The VM will try to fix the stack guard now.
      It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
      [13:31:40] [Server thread/INFO]: Using default channel type

      Now how do we 'rebuild from the latest version of raspbian'?

      Delete
    3. Download the latest version of raspbian / noobs and reflash your card.You might want to try upgrading the OS first see http://www.raspberrypi.org/documentation/raspbian/updating.md

      Delete
    4. The card I use just got the latest raspbian 4 days ago.

      Delete
    5. In that case I am out of ideas. Sorry

      Delete
    6. @Adam - Is the warning causing any problems that you can detect? Or does it seem to be benign so far? It sounds like you and I are in the same boat... brand new raspbian... mine was from Sunday. I'm not sure if the warning is causing me any real problems yet.

      Delete
    7. So far I did not see any problems caused by this although it was good to see you reported it. At least one of the developers might take a look at it now.
      Also: I've got 2 RPi2's here. Both show the same error although the filenames (/tmp/libnetty-transport-native-…….so) varies on each and every occasion while these files themselves are NOT real files, they don't exist.

      Delete
    8. I suggest we "do not worry" as is suggested here:
      https://groups.google.com/forum/#!topic/fusionreactor/iRsnTT3al04

      Delete
    9. The files are in the /tmp folder. They seem to appear after you start the game and get removed when stopped.

      Delete
  11. Since all the original Java based servers keep crashing no matter what, I gave MCServer a go (mentioned above) and this one really blows them all out of the water with how performant it is. Set the view distance to 7, like here, and edited the world.ini file so that compression was set to 6 (best setting, really).

    And that's that. Seriously, if anyone else, like me, fiddled around with spigot, vanilla and Java for hours and hours, only to see them crashing time and time again, get MCServer instead.

    ReplyDelete
    Replies
    1. I'm a newbie in the MCServer world. Just put up the 1.8.3 server on a Pi2 for my son. It appears to run well with the distance set to 7. Wanted to implement your compression=6 mod too but it looks like I don't have a file world.ini!
      Where does that go? What exactly should be in there?

      Delete
    2. I agree MCServer runs a treat (even on an original Pi). Its just a shame it doesnt support the full feature set (yet - hopefully)

      Delete
    3. This comment has been removed by the author.

      Delete
    4. Once you started MCServer once, and it has created a new world, stop it with the stop command.

      It will have created that new world in a directory called "world".
      Inside that directory is the world.ini file.
      It contains the compression setting as well as the seed for that world.
      Remove everything here except the world.ini file, change the compression setting to 6, and - if you want - change the seed, save the file, and restart MCServer to get the new world in compressed format, and the seed of your choice.

      Delete
    5. Oh yes, and one more thing: Right now, the monsters in the game are very buggy. You should change the difficulty setting to 0 (peaceful) and then you can enjoy the basic survival mode. Chests, doors, and beds have placement and dublication bugs in many positions, but once I figured that out, it was alright. And I am sure these bugs are going to be fixed in the coming releases.

      Delete
    6. After first starting the server all files I see are:
      14:58 quadberrypi: Command? cd world
      14:58 quadberrypi: Command? ls -la
      total 40
      drwxr-xr-x 7 pi pi 4096 Feb 26 14:56 .
      drwxr-xr-x 5 pi pi 4096 Feb 26 14:56 ..
      drwxr-xr-x 2 pi pi 4096 Feb 26 14:55 DIM-1
      drwxr-xr-x 2 pi pi 4096 Feb 26 14:55 DIM1
      drwxr-xr-x 2 pi pi 4096 Feb 26 14:56 data
      -rw-r--r-- 1 pi pi 621 Feb 26 14:56 level.dat
      -rw-r--r-- 1 pi pi 621 Feb 26 14:56 level.dat_old
      drwxr-xr-x 2 pi pi 4096 Feb 26 14:55 playerdata
      drwxr-xr-x 2 pi pi 4096 Feb 26 14:55 region
      -rw-r--r-- 1 pi pi 8 Feb 26 14:56 session.lock

      Not a world.ini here...

      Delete
    7. That is strange. Here is a link to mine. Try if this works, if you change it as needed.

      https://www.dropbox.com/s/7tpxlqy1ujkxouf/world.ini?dl=0

      Delete
    8. I think that worked, thanks. I've put your file inside the 'world' directory and restarted the server…The world looks different now, so I bet it processed your world.ini properly. Thanks!

      Delete
  12. It wasn't completely obvious to me, how to ge the other Minecraft Pi edition to connect to the server.

    ReplyDelete
    Replies
    1. This isn't a server for Minecraft: Pi Edition is a server for the full PC version of Minecraft.

      If you want to play multiplayer on the Pi Edition just start a game on one Pi and the 'Join' the game from the other Pi(s).

      Delete
    2. An alternative would be to start a Minecraft Pocket Edition game or server from version 0.3.3 if MCPE. That is Pi version compatible, or largely so.

      Delete
  13. I'm missing a Java install instruction - please help?

    ReplyDelete
  14. I believe Java is installed by default on the Raspbian "wheezy" image...
    I can't remember installing it, yet it's there!

    /usr/bin/java

    ReplyDelete
  15. Ok - I'll check with Raspbian - I'm currently trying to install it on OSMC as I'm using it as a media center - The Mincraft Server is for my son :)

    ReplyDelete
  16. Installed Java and ran the ./start.sh - getting ./start.sh: linje 1: 10167 Segmentfejl - fejl is error on danish :)

    ReplyDelete
  17. And what does your start.sh look like?

    type: head -2 start.sh | od -c
    and: cat start.sh

    ReplyDelete
  18. Hi Adam - Installed Xbian distro and added Java - and followed the howto and accepted the eula.txt - Now I'm getting this one:

    [17:25:34] [Server thread/INFO]: Starting minecraft server version 1.8.1
    [17:25:34] [Server thread/INFO]: Loading properties
    [17:25:34] [Server thread/INFO]: Default game type: SURVIVAL
    [17:25:34] [Server thread/INFO]: Generating keypair
    [17:25:55] [Server thread/INFO]: Starting Minecraft server on *:25565
    [17:25:55] [Server thread/INFO]: Using default channel type
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    # Internal Error (os_linux_zero.cpp:285), pid=23560, tid=782234736
    # fatal error: caught unhandled signal 11
    #
    # JRE version: 6.0_34-b34
    # Java VM: OpenJDK Zero VM (23.25-b01 mixed mode linux-arm )
    # Derivative: IcedTea6 1.13.6
    # Distribution: Debian GNU/Linux 7.8 (wheezy), package 6b34-1.13.6-1~deb7u1+rpi1
    # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

    ReplyDelete
  19. xbian@xbian ~/MinecraftServer $ head -2 start.sh | od -c
    0000000 j a v a - X m x 1 0 2 4 M -
    0000020 X m s 5 1 2 M - j a r m i n
    0000040 e c r a f t _ s e r v e r . 1 .
    0000060 8 . 1 . j a r n o g u i \n
    0000076
    xbian@xbian ~/MinecraftServer $ cat start.sh
    java -Xmx1024M -Xms512M -jar minecraft_server.1.8.1.jar nogui

    ReplyDelete
    Replies
    1. I've completely stopped trying to run any java based Minecraft servers on the known distributions. It takes forever to launch, if it does, and is prone to crashes. At least that's my experience. :/

      Delete
  20. OK - is there another solution for running the Minecraft server on my Rasp Pi 2

    ReplyDelete
  21. If you're running om a Pi2 then use these values:
    STARTMEM = 512M
    MAXMEM = 896M

    Also: There is a 1.8.4 available! Try that!

    Also: I installed both the Java and the C++ version. My son, the MC-player, prefers the java-variant because he know how to control it (commands and stuff).
    And believe me, on a Pi2 it works. Although you do need to make some adjustments to the server.properties file.
    My son uses (don't ask me why):
    gamemode=1
    difficulty=0
    max-tick-time=-1
    view-distance=7

    ReplyDelete
  22. Hi Adam,

    Where do I set the STARTMEM and MAXMEM values - I'm on PI 2

    Do you have a wget url for getting the 1.8.4 server?

    ReplyDelete
  23. java -Xmx896M -Xms512M -jar minecraft_server.1.8.1.jar nogui

    https://s3.amazonaws.com/Minecraft.Download/versions/1.8.4/minecraft_server.1.8.4.jar

    ReplyDelete
  24. Hi Adam

    I grapped the 1.8.4 from minecraft.net - and updated my .start.sh file accordingly.

    Still crashes:

    ./start.sh: line 1: 10966 Aborted java -Xmx896M -Xms512M -jar minecraft_server.1.8.4.jar nogui

    ReplyDelete
  25. My Java is this one:

    java version "1.6.0_34"
    OpenJDK Runtime Environment (IcedTea6 1.13.6) (6b34-1.13.6-1~deb7u1+rpi1)
    OpenJDK Zero VM (build 23.25-b01, mixed mode)

    ReplyDelete
  26. come try my 1.8.3 server out... beerme.no-ip.org:25555 its running 24/7 on my pi 2.

    ReplyDelete
    Replies
    1. Um. That's verynice, but you spawn in a tiny hole there, and you can't get out. At all. Can't break the rock, because it's rock _and_ it's spawn protected ...

      Delete
    2. sh*t.... then one of my plugins is messed up. i will work on it tomorrow.

      Delete
    3. i just dug out the spawn spot for now.

      Delete
    4. took a lil bit but some one came on the server and messed up a few things and wrecked my bed and chests as well as a few other small things. oh well its happens lol

      Delete
    5. took a lil bit but some one came on the server and messed up a few things and wrecked my bed and chests as well as a few other small things. oh well its happens lol

      Delete
  27. Hello,
    I got a problem when I run the server: after clicking on "play", I receive this message in "game output":

    OpenJDK Zero VM warning: You have loaded library /home/pi/.minecraft/versions/1.8.4/1.8.4-natives-1089459863716/liblwjgl64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
    It’s highly recommended that you fix the library with ‘execstack -c ‘, or link it with ‘-z noexecstack’.
    Exception in thread « main » java.lang.UnsatisfiedLinkError: /home/pi/.minecraft/versions/1.8.4/1.8.4-natives-1089459863716/liblwjgl.so: /home/pi/.minecraft/versions/1.8.4/1.8.4-natives-1089459863716/liblwjgl.so: Can't open the shared object file: No file of this type (Possible cause: can’t load IA 32-bit .so on a ARM-bit platform)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at org.lwjgl.Sys$1.run(Sys.java:72)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
    at org.lwjgl.Sys.loadLibrary(Sys.java:96)
    at org.lwjgl.Sys.(Sys.java:117)
    at ave.J(SourceFile:2524)
    at net.minecraft.client.main.Main.main(SourceFile:41)
    I use a Raspberry Pi 2 with raspbian and my java version is:
    java version "1.7.0_75"
    OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~deb7u1+rpi1)
    OpenJDK Zero VM (build 24.75-b04, mixed mode).
    My version of Minecraft is the 1.8.4 (the last one at this date).
    I've tried the commands "execstack -c" and "-z noexecstack" without results.
    If someone could help me please, it would be very nice.
    Please excuse me for my faults, I'm french.

    ReplyDelete
    Replies
    1. It looks like you are trying to run the minecraft server 'gui'. This wont run on an ARM computer as it requires an x86 java library liblwjgl.

      You have to run the jar file directly using the command java -Xmx1024M -Xms512M -jar minecraft_server.1.8.1.jar nogui

      Delete
    2. You can.. Its just VERY VERY slow. In fact I couldnt even get past the main menu.

      Delete
  28. Hi All
    can you run a modded server with this system? like forge-1.8-11.14.1.1334-universal.jar?
    M

    ReplyDelete
    Replies
    1. No idea, I dont see why not though, canarymod, bukkit and spigot are all basically modded minecraft servers. Have a go!

      Delete
    2. If I get one I let you know how i go Thank :)

      Delete
  29. I've been hosting a Pi2 server for about a month now. Made it an 8 player server with about 40 plugins. View distance is 4 which is adequate. Slight over clocking to 1000MHz ARM and Core at 500MHz.

    See what you think here:

    81.99.59.115:25566

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. or check out the Dynmap: http://81.99.59.115:8124

      Delete
    3. Plugins (38): NetherRoofProtect, AsyncWorldEditInjector, WorldEdit, Simple-AutoSave, mcjobs, AutoShutdown, PermissionsBukkit, RemoteBukkit, Vault, Multiverse-Core, WorldGuard, Jail, dynmap, AntiSwear, IPLog, TimeFold, Lockette, ClearLag, RoyalAuth, ProtocolLib, BlockThatName, TeleportRequest, Essentials, WorldBorder, AsyncWorldEdit, NoCheatPlus, EssentialsSpawn, EssentialsGeoIP, SkinsRestorer, FramePicture, dynmap-mobs, ScoreboardStats, EssentialsAntiBuild, CommandBlockerUltimate, Residence, Lift, ChestShop, dynmap-residence

      Delete
  30. Hi. Hopefully someone can help me. I am getting the segmentation fault error as others have when following the instructions. I agree it smells rather aquatic, but can someone give me any idea what to do about it? Does it suggest that my new raspberry pi is damaged or maybe a rubbish micro-sd card?

    ReplyDelete
    Replies
    1. Your pi is fine. Sometimes you need a very specific Java runtime environment. I rid myself of these troubles by using the MCServer instead of the original Minecraft server. Though it's changing it's name to Cuberite. www.cuberite.org

      If nothing else helps, give it a go.

      Delete
    2. Thanks. Looks like I've got MCServer running okay. I've a port clash / forwarding issue going on at the moment but it should be easy to resolve that. I'd still like to know where I went wrong on the vanilla and Spigot installs but I'll leave my investigations to another day! Thanks again.

      Delete
  31. i don't get asked to accept eula ?

    ReplyDelete
  32. nvm idk what happend i got it

    ReplyDelete
  33. All i get is this when i try to boot it.

    "2015-08-26 02:58:29,912 ERROR Error processing element Queue: CLASS_NOT_FOUND
    2015-08-26 02:58:36,806 ERROR Unable to locate appender ServerGuiConsole for logger
    Exception in thread "main" java.lang.ClassFormatError: Unknown constant tag 226 in class file org/apache/commons/io/IOUtils
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at fj.(SourceFile:27)
    at fj.(SourceFile:19)
    at fi.(SourceFile:7)
    at aln.k(SourceFile:250)
    at aln.a(SourceFile:321)
    at amg.q(SourceFile:458)
    at amg.C(SourceFile:774)
    at ua.c(SourceFile:116)
    at ua.a(SourceFile:69)
    at oe.c(SourceFile:483)
    at net.minecraft.server.MinecraftServer.main(SourceFile:646)
    "

    And sometimes this, "

    2015-08-26 03:04:40,664 ERROR Error processing element Queue: CLASS_NOT_FOUND
    2015-08-26 03:04:48,358 ERROR Unable to locate appender ServerGuiConsole for logger
    #
    # A fatal error has been detected by the Java Runtime Environment:"

    Then I dont get to the rest of that because my ssh server crashes before I can, but I imagine its a similar error to the first one. Any help is appreciated!

    ReplyDelete
  34. This comment has been removed by the author.

    ReplyDelete
  35. when i try to connect to the server it tells me
    Internal Exception: java.lang.NullPointerException

    ReplyDelete
  36. I have a probleme too, when i type "chmod + x start.sh" , the pi say "bash: ./start.sh: Permission denied" . Need help here !

    ReplyDelete
    Replies
    1. There is no space between + and x.

      So chmod +x start.sh. Do you see any errors when running this command to make the script eXecutable?

      Delete
    2. This comment has been removed by the author.

      Delete
    3. i writ ./start.sh and the pi say Error: Unable to access jarfile minecraft_serveur 1.8.8.jar ( i install the 1.8.8 version) (sorry for my bad english)

      Delete
    4. Is it spelt correctly in start.sh? including capital letters? Is it in the same directory as your start.sh. Type ls to see a directory listing. check the file is there.

      Delete
  37. In my folder "MinecraftServer" i have only start.sh

    ReplyDelete
    Replies
    1. Then you failed to download the minecraft server jar. If you want 1.8.8 you need to use the command

      https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/minecraft_server.1.8.8.jar

      Delete
  38. How would I upload a custom map into the RaPi 2 and the server?

    ReplyDelete
  39. NoSpawnChunks doesn't work I repeat NoSpawnChunks DOES NOT WORK. It's all a placebo. This plugins only loads up and pretends to unload chunks but the memory still fills up with time until it uses up all the swap and crashes the server.

    You can try it yourself by removing the plugin and comparing the perfromance, it will be identical.

    Install htop:

    sudo apt-get install htop

    That way you can monitor closely the memory and cpu usage.

    ReplyDelete
    Replies
    1. I also found out that spigot has a memory leak for quite a while now that devs still need to fix.

      Delete
  40. i get "bad login" when i try to login

    ReplyDelete
    Replies
    1. Do you have an official paid for Minecraft Login? The server will check you are 'allowed' before logging you in.

      Delete

Note: only a member of this blog may post a comment.