Jump to content

Running dedicated server on raspberry pi


capturesteve

Recommended Posts

I've been messing with getting openjk's dedicated server running on my raspberry pi 2 using the raspbian image.

 

So far I'm able to run a dedicated server, and I am not getting any error reports. The logs look completely clean. I can even see that the bots are playing against each other on the server console. But I cannot seem to find my server on the network either locally or on the internet. I believe I have the necessary ports setup correctly. I'm not sure what other issues would be blocking me from seeing my server.

 

My only guess, and maybe this is completely wrong is that jedi academy is looking at the server version. Since the Pi's version string is an ARM version, then maybe Jedi Academy on my desktop is not recognizing it? This seems like an unreasonable explanation but I haven't come up with anything else.

 

Any ideas?

 

P.S. I will post the steps to install this on raspberry pi after I get past this bug. Setting it up on Pi was actually pretty simple.

(edit) Still haven't got past the bug of not being able to see my server locally or over internet. But here are the steps i've used so far to get this setup.

#Download and flash raspbian onto your Raspberry Pi 2 from: http://www.raspberrypi.org/downloads/

# SETUP:
cd ~/
mkdir jka
cd jka
mkdir release # will want to copy your Jedi Academy directory contents to here. 
# Use scp or alternative tool to copy your Jedi Academy install directory’s content to #~/jka/release/ Would be something like scp -r C:/ProgramFiles/.../Jedi Academy/* # pi@192.168.0.0:~/jka/release/

# Building 
sudo apt-get install libjpeg8-dev libpng12-dev zlib1g-dev
sudo apt-get install freeglut3-dev
sudo apt-get install cmake
sudo apt-get install git
# We need to compile SDL2 from source on the pi. 
wget http://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar -xzxf SDL2-2.0.3.tar.gz
cd SDL2-2.0.3
./configure
make
make install
cd ../
git clone https://github.com/JACoders/OpenJK.git openjk
cd openjk
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/jka/release/GameData/
make -j2 # This takes a while so go grab coffee. 
make install
Smoo likes this
Link to comment

A few things I would try.

 

1. Try connecting directly as @'Darth Futuza' mentioned.

2. Make sure you've started the server with the "dedicated" cvar set correctly. Set to 2 to make it visible on the Internet, set to 1 to make it just a LAN server.

3. Ping your computer from the R-Pi

4. Ping R-Pi from your computer

 

If you're testing locally, I wouldn't expect there to be any port issues. Problems only occurs when going into the outside world as you only have 1 "external" IP address, but multiple computers behind that one IP address meaning you could have more than one computer trying to use the same port. Computers in a local network (e.g. computers in a house) all have their own IP address, so there's no conflict.

Link to comment

Hmm. Yes. I have only been testing local. And an able to ping back and forward between the pi and pc. I have also tried the direct connect command and setting the server cvar to dedicated...

 

Really stumped as to what may be going on. Might see if i can get another computer on the network tonight to see if I can see another computer with a normal jka install. If this fails I can be sure its a network problem and not my jka build on the ARM based pi.

Link to comment

Hmm. Yes. I have only been testing local. And an able to ping back and forward between the pi and pc. I have also tried the direct connect command and setting the server cvar to dedicated...

 

Really stumped as to what may be going on. Might see if i can get another computer on the network tonight to see if I can see another computer with a normal jka install. If this fails I can be sure its a network problem and not my jka build on the ARM based pi.

Sometimes antivirus/firewall software gets in the way as well, make sure to disable that on your pc's end (at least when testing locally).  So I'm guessing the direct connect command doesn't work?  Does it just sit on "Awaiting Connection..."?

JKG Developer

Link to comment

Yes it just sits at awaiting connection. Looks like it is not related to my network or router. I was able to startup a dedicated server (built from openjk source the same way I built on my Pi) on my ubuntu desktop and connect to it via my laptop.

 

Using the same steps on the Pi, I cannot find the server or connect via the /connect command.. Hmm.

Link to comment
  • 3 years later...

 

I've been messing with getting openjk's dedicated server running on my raspberry pi 2 using the raspbian image.

 

So far I'm able to run a dedicated server, and I am not getting any error reports. The logs look completely clean. I can even see that the bots are playing against each other on the server console. But I cannot seem to find my server on the network either locally or on the internet. I believe I have the necessary ports setup correctly. I'm not sure what other issues would be blocking me from seeing my server.

 

My only guess, and maybe this is completely wrong is that jedi academy is looking at the server version. Since the Pi's version string is an ARM version, then maybe Jedi Academy on my desktop is not recognizing it? This seems like an unreasonable explanation but I haven't come up with anything else.

 

Any ideas?

 

P.S. I will post the steps to install this on raspberry pi after I get past this bug. Setting it up on Pi was actually pretty simple.

(edit) Still haven't got past the bug of not being able to see my server locally or over internet. But here are the steps i've used so far to get this setup.

#Download and flash raspbian onto your Raspberry Pi 2 from: http://www.raspberrypi.org/downloads/

# SETUP:
cd ~/
mkdir jka
cd jka
mkdir release # will want to copy your Jedi Academy directory contents to here. 
# Use scp or alternative tool to copy your Jedi Academy install directory’s content to #~/jka/release/ Would be something like scp -r C:/ProgramFiles/.../Jedi Academy/* # pi@192.168.0.0:~/jka/release/

# Building 
sudo apt-get install libjpeg8-dev libpng12-dev zlib1g-dev
sudo apt-get install freeglut3-dev
sudo apt-get install cmake
sudo apt-get install git
# We need to compile SDL2 from source on the pi. 
wget http://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar -xzxf SDL2-2.0.3.tar.gz
cd SDL2-2.0.3
./configure
make
make install
cd ../
git clone https://github.com/JACoders/OpenJK.git openjk
cd openjk
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/jka/release/GameData/
make -j2 # This takes a while so go grab coffee. 
make install

 

Hi, altough this is a really old topic i wanted to let you know that i followed your steps and i managed to get a server running on my Raspberry Pi3 model b and i am able to connect from another PC that is not ARM based. Thank you very much for this tutorial!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...