m0g
Posts: 2
Joined: Tue Jun 18, 2013 3:36 am

Re: Minecraft server - How To

Tue Jun 18, 2013 3:35 pm

AlexOlney wrote:I'm having terrible difficulty getting the server to be at a playable level, it can take nearly three seconds for a destroyed block to actually vanish and yield its item. I've run a few Minecraft servers before, but never on a Pi, so this is all very new to me.

I'm running 1.5.2 on a model B without using the GUI. I don't know if it makes a difference at all, but I'm using BerryBoot to launch Raspbian (latest version).

Any tips of help anyone could give would be enormously appreciated.

Thanks.
How long have you left your server running while seeing these results? When I first start up the world and try mining, I get the same results, however over about 3 minutes at the start of logging onto the server, this behavior went away. Try playing for a bit!

It also sounds like other people have had similar experiences (poor block behavior on initial login/server boot), so this is worth a try if you haven't tried waiting a bit yet!

Cowang4
Posts: 5
Joined: Tue Mar 12, 2013 5:57 pm

Re: Minecraft server - How To

Sat Jun 22, 2013 3:12 pm

m0g wrote: Is it at all possible for me to start the server in an SSH session and disconnect that session while the server still runs? I am aware that this likely would be tricky due to the way terminal sessions are run on linux, but I would prefer to be able to start the server and leave it running without ever needing to remote desktop into the raspberry pi or leaving an SSH session connected. I was hoping there would be a CLI option to run the process as detached and that that would work, but I couldn't find any information on it.
Yeah, look above a few posts for the link to a thread that describes how to use Screen. Its a terminal multiplexer, which basically means it does exactly what you want it to "disconnect the ssh session and still have the server run"

heres that link: http://www.raspberrypi.org/phpBB3/viewt ... 86#p329986

noob
Posts: 218
Joined: Sat Dec 08, 2012 3:58 pm

Re: Minecraft server - How To

Mon Jul 01, 2013 1:15 pm

i just downloaded java with apt-get, but now i don't know how to open it

bretth
Posts: 1
Joined: Sun Jul 07, 2013 9:22 pm

Re: Minecraft server - How To

Sun Jul 07, 2013 11:22 pm

I have tried this tutorial countless times and troubleshooted in every way I can think, but every time I get caught when I execute the command:

Code: Select all

sudo /opt/jdk1.8.0/bin/java -version
I receive the error:

Code: Select all

sudo: unable to execute /opt/jdk1.8.0/bin/java: No such file or directory
I would really appreciate if someone could help me with this.

Anon10W1z
Posts: 3
Joined: Wed Jul 17, 2013 12:14 am

Re: Minecraft server - How To

Wed Jul 17, 2013 12:21 am

11) Unfortunately, we can't wget the official Java VM package from Oracle, so you will need to download the package to your computer and send it via SSH (use WinSCP for Windows) to /home/pi. Download link: http://jdk8.java.net/fxarmpreview/index.html
Actually, you can use the following command on the Pi without an SFTP client:

Code: Select all

wget http://download.java.net/jdk8/archive/b98/binaries/jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz?q=download/jdk8/archive/b98/binaries/jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz -O jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz
You can change the name of the downloaded archive by changing the text after the -O option

Anon10W1z
Posts: 3
Joined: Wed Jul 17, 2013 12:14 am

Re: Minecraft server - How To

Wed Jul 17, 2013 4:45 pm

bretth wrote:I have tried this tutorial countless times and troubleshooted in every way I can think, but every time I get caught when I execute the command:

Code: Select all

sudo /opt/jdk1.8.0/bin/java -version
I receive the error:

Code: Select all

sudo: unable to execute /opt/jdk1.8.0/bin/java: No such file or directory
I would really appreciate if someone could help me with this.
Are you sure you followed the steps correctly? Let me simplify them a little.

1. ssh into the pi (optional)
2. type in

Code: Select all

sudo raspi-config
set overclock to 900 mhz (for performance)
3. go to advanced options -> memory split and set it to 16
4. select finish, restart the pi
5. set up the static ip
6. open port 25565 on the router
7. type in the following commands (copy and paste them if using ssh)

Code: Select all

sudo su
cd /home/pi
wget http://download.java.net/jdk8/archive/b98/binaries/jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz?q=download/jdk8/archive/b98/binaries/jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz -O java.tar.gz
mkdir -p /opt
tar zxvf java.tar.gz -C /opt
rm java.tar.gz
update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1
update-alternatives --set java /opt/jdk1.8.0/bin/java
java -version
8. Go here to get the download link for your minecraft server version: http://www.mod-minecraft.org/minecraft-jar-download/
9. Download it via the following command

Code: Select all

wget -O minecraft_server.jar linkToJAR
10. Run it via the following command:

Code: Select all

sudo java -Xms128M -Xmx256M -jar /home/pi/minecraft_server.jar nogui
Long but simple.

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Thu Aug 15, 2013 4:27 pm

Looks like all our hard work has been borrowed and used here: http://www.raspberrypi.org/archives/4621 wouldn't care if it hadn't ended up here blahh :(
rapidwhois.uk | jmdawson.co.uk

EdwinJ85
Posts: 271
Joined: Wed Feb 01, 2012 4:44 pm
Contact: Website

Re: Minecraft server - How To

Thu Aug 15, 2013 7:26 pm

I used a guide from the forums I quite clearly referenced....
Hello!

techis
Posts: 7
Joined: Fri Aug 16, 2013 4:30 am

Re: Minecraft server - How To

Mon Aug 19, 2013 6:15 pm

Has anyone tried to use a usb wifi dongle to make a mobile minecraft server?

Thanks,

Techis

Dawn Wolf
Posts: 1
Joined: Sun Aug 18, 2013 10:33 am

Re: Minecraft server - How To

Mon Aug 19, 2013 10:42 pm

I followed these instructions to the letter and only once got it to start the server. I wasn't happy with the amount of lag I was getting, so I tried Craftbukkit. That didn't seem to work, so I wiped the SD card (using SDFormatter) and reinstalled everything and followed the steps on page 1 as I did before.

After it's done starting the server, I get:

Code: Select all

[WARNING] Can't keep up! Did the system time change, or is the server overloaded?
I noticed in the forum that it suggested ignoring this and just going right on ahead and trying to log in and I get the following:

Code: Select all

[WARNING] Can't keep up! Did the system time change, or is the server overloaded?
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:150)
        at java.net.SocketInputStream.read(SocketInputStream.java:121)
        at java.io.FilterInputStream.read(FilterInputStream.java:133)
        at org.bouncycastle.crypto.io.CipherInputStream.nextChunk(Unknown Source)
        at org.bouncycastle.crypto.io.CipherInputStream.read(Unknown Source)
        at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
        at ex.a(SourceFile:178)
        at cn.i(SourceFile:249)
        at cn.c(SourceFile:17)
        at co.run(SourceFile:94)
If I don't attempt to log in immediately, after about a minute I get the following:

Code: Select all

[WARNING] Can't keep up! Did the system time change, or is the server overloaded?
 [INFO] Stopping server
java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
        at java.net.ServerSocket.implAccept(ServerSocket.java:545)
        at java.net.ServerSocket.accept(ServerSocket.java:513)
        at ix.run(SourceFile:61)
I wiped the SD card and tried again, but got similar results. Anyone have any suggestions on how to fix this?

I'm using a Raspberry Pi Model B and a 16GB SD card with Raspbian wheezy.

omonster
Posts: 1
Joined: Tue Aug 20, 2013 9:29 am

mcserver

Tue Aug 20, 2013 9:36 am

EdwinJ85 do you have the compiled version of mcserver for download i want to know to have a simple creative server to run on the pi :D

please reply asap

lazarus78
Posts: 236
Joined: Thu Jul 25, 2013 5:16 pm

Re: Minecraft server - How To

Wed Aug 21, 2013 5:27 pm

randrade wrote:I also get lots of warnings, but I find the server runs fine when I'm on it. Very occasionally, when I go to a place very distant from the spawn area, I get read time out errors and lose connection ( problem downloading map chunks), but this usually goes away after trying again.

In regards to your first post, that means I might have to restart the server. I'll get on it!
This issue can be mitigated if you load the world up in single player and just go around generating chunks. This way the pi won't have to spend time generating which is the bulk of the processing time.

I think there may be applications out there to force generate chunks without you having to be in game.


This is all good news, I was wondering how well the Pi would handle this type of server because i want to run a Starmade server from it myself (Minecraft in space clone, in case you don't know) which isn't as intensive as Minecraft.

Bonestoo3995
Posts: 1
Joined: Sun Aug 11, 2013 10:17 pm

Re: Minecraft server - How To

Wed Aug 28, 2013 2:36 am

Whenever I do the last line to installing java:
sudo /opt/jdk1.8.0/bin/java -version

I get: sudo: /opt/jdk1.8.0/bin/java: command not found :evil:

is there any reason that this is happening?

I am new, so any help would be appreciated.

PS. I am writing this on my PI :D

geohei
Posts: 11
Joined: Tue Aug 27, 2013 2:44 pm

Re: Minecraft server - How To

Fri Aug 30, 2013 3:41 pm

Hi.

Installed Minecraft server as shown on first page.

Hardware: RaspberryPi Bv2
Disto: 2013-07-26-wheezy-raspbian.zip

When starting server and waiting #3 minutes, top still shows 75-80% Java CPU load. As soon as son logs in (so, 1 user) Java goes up to #99%. The world builds up only very slowly on client side. After playing 1 minute or so, server crashes with segmentation fault.

What did I do wrong?
What do you need as additional info from my system/config to help?

Thanks,

lxbatty
Posts: 3
Joined: Sun Jun 23, 2013 4:47 pm

Re: Minecraft server - How To

Sun Sep 08, 2013 10:30 pm

r00x wrote:Nice one! I am preoccupied, alas. Experimenting with GPIO - going to see if I can't convince work to use Raspberry Pi's as nifty little demo boards for our displays :D

I want to pipe some server info (CPU, disk, mem usage - possibly graphs and text) to a small graphic display as a working example. :)
I too would love to see this if/when done. Just finished building my Minecraft Pi server, still working on tweaks to improve performance, but it's working.

flametail
Posts: 1
Joined: Sat Sep 21, 2013 3:36 am

Re: Minecraft server - How To

Sun Sep 22, 2013 1:41 am

This thread has helped me so much for setting up my server, but I'm having an issue with lag and the game not loading. I am running a Spigot server with NoSpawnChunks, 800mHz overclock, 8gB class 10 SD, and java set to -Xms128M -Xmx400M. The error I eventually get is "Connection Lost Internal exception: Java.net.SocketTimeoutException: Read timed out"

I can post screens of settings if needed.

Lastly, I'm a noob when it comes to Linux (never messed with it until now but thankfully I have Google and awesome forums like this).

Hiradur
Posts: 96
Joined: Fri Mar 01, 2013 10:59 am

Re: Minecraft server - How To

Sat Oct 12, 2013 5:33 pm

That is an error I encountered when I tried to run it on a Synology DS213j NAS. I spent many hours to find out what the problem is but never found a solution...

Hiradur
Posts: 96
Joined: Fri Mar 01, 2013 10:59 am

Re: Minecraft server - How To

Wed Nov 06, 2013 1:30 pm

If anybody wondered if an Odroid-U2 would be a significant upgrade to a Raspberry Pi as a Minecraft server these videos might help you. I do the same benchmark in Minecraft on both of them.

Raspberry Pi: http://www.youtube.com/watch?v=miSRi_HwJxo
Odroid-U2: http://www.youtube.com/watch?v=Xt9izHoiVT4

acra
Posts: 1
Joined: Sun Nov 10, 2013 4:21 pm

Re: Minecraft server - How To

Sun Nov 10, 2013 4:27 pm

Is the class of SD Card important?
I've tried almost every Pi Minecraft Server tutorial out there, most recently the guide on HTG (here: www.howtogeek.com) but no matter what I try my server is unplayably laggy and in many cases corrupt.

Problems I'm experiencing include: crazy amounts of latency, blocks coming back, things flashing in/out of existance and frequent kicks.

I know a lot of people are able to run a server with a couple of people, so it seems strange I can't even host a server locally for one person to be stable on!

I'm running the Pi exactly per the article I linked, running in Turbo overclock.
RAM usage seems to rarely get above 50% and CPU bounces between 90% and 2%, with the average 'general running' of around 25%.

Because of this, I wonder if the SD card is my bottleneck? I'm using a Duracell Class 6, but no idea what read/write speed it is.
Any ideas?

Hiradur
Posts: 96
Joined: Fri Mar 01, 2013 10:59 am

Re: Minecraft server - How To

Sun Nov 17, 2013 9:59 pm

SD card performance matters but in your case I think it might be the Pi generating new terrain or doing other CPU-intesive tasks. Use /timings in Minecraft to see what eats up your CPU.

Kahouse
Posts: 2
Joined: Fri Nov 29, 2013 2:36 am

Re: Minecraft server - How To

Fri Nov 29, 2013 3:07 am

Hi I have set up my server on my pi, and i can connect to it with my internal ip. I have port forward 25565 on my router but i do not know how to find my external ip for my pi and i do not know if i need to open up any more ports. PLEASE HELP!!!

User avatar
maarten2001
Posts: 23
Joined: Tue Mar 05, 2013 5:03 pm

Re: Minecraft server - How To

Tue Dec 10, 2013 9:37 am

Go to whatsmyip.org to see your external ip.

DejectedSyrup8
Posts: 1
Joined: Wed Dec 11, 2013 2:37 am

Re: Minecraft server - How To

Wed Dec 11, 2013 2:41 am

Having a bit of trouble. I can get on my server using the 192.168 internal IP address from my pc. I have port forwarded my raspberry pi with 25565 but the only address that works is the internal. I have tried the external IP many different times and variations. I even tried using hamachi with no luck at all. Please help.

sajochi
Posts: 1
Joined: Wed Dec 11, 2013 9:35 am

Re: Minecraft server - How To

Wed Dec 11, 2013 9:38 am

Hi Guys,

Im new to this sort of stuff.

Anyway... I can't open the tutorial page; http://kraftyhosting.eu/tutorial-raspbe ... er-update/

Or anything on that domain.

My internet browser (safari) tells me the server is not responding.

Thanks :)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27010
Joined: Sat Jul 30, 2011 7:41 pm

Re: Minecraft server - How To

Wed Dec 11, 2013 9:49 am

sajochi wrote:Hi Guys,

Im new to this sort of stuff.

Anyway... I can't open the tutorial page; http://kraftyhosting.eu/tutorial-raspbe ... er-update/

Or anything on that domain.

My internet browser (safari) tells me the server is not responding.

Thanks :)
it appears that the website is broken - You'll have to find instructions elsewhere.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Networking and servers”