Jump to content
Connall

Buying & Running a Linux Project Zomboid Server

Recommended Posts

oke, so i reinstalled the os and started from scratch but i still get the same issue "permission denied" on trying to run the server . 

 

Alsow my serverside steam doesnt have /steamapps/common

 

i am not sure if the serverfile is suposed to be inside the project zomboid folder?

or in the indicated Zomboid folder as indicated in the tutorial, with the server.hs and the db folder.

 

about that db folder, i dont get it "Now reconnect WinSCP and go download this empty db file: https://dl.dropboxus...553835/world.db "

 

oke i did that but, its not explained where to extract this file , so ive put it inside the zomboid folder that contains the server sh.. 

 

 

( i have tried pasting the server.sh file in to the steam gamefolder, where the rest of the game files are and i still get the permission denied thing, nomatter where i run it from ) 

 

i hope i explained myself well, and thanks in advance. 

 

 

maybe this will help to detect my mistakes:

aqa3.png

Share this post


Link to post
Share on other sites

 

 

I am trying to run this server on a RedHat 64bit system and I am getting the same RakNet error that milchshake was getting. My version of glibc is 2.12. Is there a way to get this working without having to update the glibc version?

No, you *have* to have glibc version 2.15 or greater.

hi all, so i am trying this too. and i ve ran in to some trouble . 

 

when i try to run  ./projectzomboid-dedi-server.sh i get the following error 

 

"-bash: ./projectzomboid-dedi-server.sh: Permission denied"

 

 

i am logged in as root, i dont know why i get permission denied.. 

 

I am kind off new to all this, id really like to learn so please help me out here. 

 

thnx in advance.

Can you run:

ls -l projectzomboid-dedi-server.sh
on the sh file, and let us know what it returns please?

 

 

yes offcourse, here is the result. I am thinking of reinstalling it all since it is not in the root home folder, its kinda hidden. This shouldnt be a problem?

 

Anyway, here is there result 

 

"root@zomboid:/home/steam/steamcmd/home/steam/projectzomboid# ls -l projectzomboid-dedi-server.sh

-rw-r--r-- 1 root root 850 Mar  3 22:58 projectzomboid-dedi-server.sh

root@zomboid:/home/steam/steamcmd/home/steam/projectzomboid#

"

 

 

It looks like you've installed it as the root user! Here's some commands to fix that

Run:

chown -R steam:steam /home/steam/chmod 755 /home/steam/steamcmd/home/steam/projectzomboid/projectzomboid-dedi-server.sh

then try running again, as the 'steam' user :)

Share this post


Link to post
Share on other sites

 

 

 

I am trying to run this server on a RedHat 64bit system and I am getting the same RakNet error that milchshake was getting. My version of glibc is 2.12. Is there a way to get this working without having to update the glibc version?

No, you *have* to have glibc version 2.15 or greater.

hi all, so i am trying this too. and i ve ran in to some trouble . 

 

when i try to run  ./projectzomboid-dedi-server.sh i get the following error 

 

"-bash: ./projectzomboid-dedi-server.sh: Permission denied"

 

 

i am logged in as root, i dont know why i get permission denied.. 

 

I am kind off new to all this, id really like to learn so please help me out here. 

 

thnx in advance.

Can you run:

ls -l projectzomboid-dedi-server.sh
on the sh file, and let us know what it returns please?

 

 

yes offcourse, here is the result. I am thinking of reinstalling it all since it is not in the root home folder, its kinda hidden. This shouldnt be a problem?

 

Anyway, here is there result 

 

"root@zomboid:/home/steam/steamcmd/home/steam/projectzomboid# ls -l projectzomboid-dedi-server.sh

-rw-r--r-- 1 root root 850 Mar  3 22:58 projectzomboid-dedi-server.sh

root@zomboid:/home/steam/steamcmd/home/steam/projectzomboid#

"

 

 

It looks like you've installed it as the root user! Here's some commands to fix that

Run:

chown -R steam:steam /home/steam/chmod 755 /home/steam/steamcmd/home/steam/projectzomboid/projectzomboid-dedi-server.sh

then try running again, as the 'steam' user :)

 

the first command seems to have worked but when i enter the second one, addapting it to my own url i get the following 

 

steam@zomboid:~/projectzomboid$ chmod 755 /home/steam/steamcmd/home/steam2/projectzomboid/projectzomboid-dedi-server.sh
chmod: changing permissions of `/home/steam/steamcmd/home/steam2/projectzomboid/projectzomboid-dedi-server.sh': Operation not permitted
---
alsow i have put the db folder inside /home/steam/steamcmd/home/steam2/projectzomboid/ manually as it was in the "Zomboid" folder somwhere else... 
should i do the same with the "db" folder? 
--
 
really apreciate the help 

*edit* when i am logged in as root i can run the "chmod 755 /home/steam/steamcmd/home/steam2/projectzomboid/projectzomboid-dedi-server.sh" but it doesnt show any response tho. 

 

BUT when i try to run the server with the "steam" user i get the following errors:

steam@zomboid:~/steamcmd/home/steam2$ ./projectzomboid-dedi-server.sh
./projectzomboid-dedi-server.sh: line 18: java: command not found
 
*edit*edit* :)

Share this post


Link to post
Share on other sites

im redownloading/installing java, the first step, to see if maybe that fixes it . 

 

which let to the following error when running the server;

 

steam@zomboid:~/steamcmd/home/steam2$ ./projectzomboid-dedi-server.sh
Error occurred during initialization of VM
Could not reserve enough space for object heap
 
HURRRAAAA I AJUSTED THE RAM AND IT IS WORKINGGG !!!!! 
 
 
 
for now. 
 
thanks comunity <3 
 
*edit* again.. 
i get a few errors, but it sais the server is running.. 
java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:900)
        at zombie.network.ServerOptions.initOptionsFile(ServerOptions.java:39)
        at zombie.network.ServerOptions.init(ServerOptions.java:34)
        at zombie.network.GameServer.startServer(GameServer.java:384)
        at zombie.network.GameServer.main(GameServer.java:132)
return code: 0
*** SERVER STARTED ****
java.io.FileNotFoundException: /home/steam/Zomboid/Sandbox/servertest/map_t.bin (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
        at zombie.network.ServerMap.preupdate(ServerMap.java:591)
        at zombie.network.GameServer.main(GameServer.java:172)
Exception in thread "main" java.lang.NullPointerException
        at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
        at java.io.DataOutputStream.writeFloat(DataOutputStream.java:242)
        at zombie.GameTime.save(GameTime.java:1484)
        at zombie.network.ServerMap.preupdate(ServerMap.java:599)
        at zombie.network.GameServer.main(GameServer.java:172)
...
 
that bad ? Yeah im kinda stuck there again . 

Share this post


Link to post
Share on other sites

 

im redownloading/installing java, the first step, to see if maybe that fixes it . 

 

which let to the following error when running the server;

 

steam@zomboid:~/steamcmd/home/steam2$ ./projectzomboid-dedi-server.sh
Error occurred during initialization of VM
Could not reserve enough space for object heap
 
HURRRAAAA I AJUSTED THE RAM AND IT IS WORKINGGG !!!!! 
 
 
 
for now. 
 
thanks comunity <3 
 
*edit* again.. 
i get a few errors, but it sais the server is running.. 
java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:900)
        at zombie.network.ServerOptions.initOptionsFile(ServerOptions.java:39)
        at zombie.network.ServerOptions.init(ServerOptions.java:34)
        at zombie.network.GameServer.startServer(GameServer.java:384)
        at zombie.network.GameServer.main(GameServer.java:132)
return code: 0
*** SERVER STARTED ****
java.io.FileNotFoundException: /home/steam/Zomboid/Sandbox/servertest/map_t.bin (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
        at zombie.network.ServerMap.preupdate(ServerMap.java:591)
        at zombie.network.GameServer.main(GameServer.java:172)
Exception in thread "main" java.lang.NullPointerException
        at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
        at java.io.DataOutputStream.writeFloat(DataOutputStream.java:242)
        at zombie.GameTime.save(GameTime.java:1484)
        at zombie.network.ServerMap.preupdate(ServerMap.java:599)
        at zombie.network.GameServer.main(GameServer.java:172)
...
 
that bad ? Yeah im kinda stuck there again . 

 

 

It basically means that it's not able to write to it's Zomboid folder, which it *has* to have, and *has* to be able to write to. This is likely related to you creating it as root.

 

Can you confirm you definitely ran that chown command, as I specified, with no changes?

Share this post


Link to post
Share on other sites

Yes but i may have messed up on the zomboid folder , which it has to have ..where does this folder need to be,mine is in /steam/home ...far away from the serverlaunch file.

Share this post


Link to post
Share on other sites

Yes but i may have messed up on the zomboid folder , which it has to have ..where does this folder need to be,mine is in /steam/home ...far away from the serverlaunch file.

 

That's where it has to be yes. Make sure you're running the project zomboid dedicated server file from the Steam user.

Share this post


Link to post
Share on other sites

Yes but i may have messed up on the zomboid folder , which it has to have ..where does this folder need to be,mine is in /steam/home ...far away from the serverlaunch file.

 

You should run the game as the 'steam' user.

 

The steam user should have a 'Zomboid' folder in it's home directory. You can get to it's home directory, by running this as it:

cd ~/

 

The steam user must be able to write to it's files. Running the 'chown' command I specified as root should make sure it can.

Share this post


Link to post
Share on other sites

 

Yes but i may have messed up on the zomboid folder , which it has to have ..where does this folder need to be,mine is in /steam/home ...far away from the serverlaunch file.

 

You should run the game as the 'steam' user.

 

The steam user should have a 'Zomboid' folder in it's home directory. You can get to it's home directory, by running this as it:

cd ~/

 

The steam user must be able to write to it's files. Running the 'chown' command I specified as root should make sure it can.

 

 

Ok, that helped, i made the Zomboid folder with the steam user. the only error i get now is the following.

"Loading world...

Unknown bind__() error -1.
return code: 5
"
 
getting there.. wouldnt be without your help thnx. 

Share this post


Link to post
Share on other sites

i havent set an admin pass or anything tho, where do i set this ? i cannot find info on this in the faq

 

I mean in order to be able to use the commands in the ingame chat.. i need to login or something right? 

Share this post


Link to post
Share on other sites

i havent set an admin pass or anything tho, where do i set this ? i cannot find info on this in the faq

 

I mean in order to be able to use the commands in the ingame chat.. i need to login or something right? 

 

The admin system won't be coming until the next build, so you don't need to set an admin password or anything.

Share this post


Link to post
Share on other sites

May I add some tidbits about the guide?

 

First

Running the dedicated server while putting in your password will lodge your password into the history (type history in the terminal to see previous commands)

This can be a security problem, even if you consider yourself the only one with access, it would take only a moment to do history > log and grab it.

To prevent that, type in unset HISTFILE previous to that command. It will disable logging temporarily for that session.

 

Second-

 

 

When back home type:

screen

You will be taken to a wall of text, just hit enter until the text goes away and your left with a blank screen except for your user

 

steam@server.co.uk thing.

 

Now what you do here is

cd /home/steam/Steam/SteamApps/common/ProjectZomboid

Then

./projectzomboid-dedi-server.sh

 

Instead of running screen, then changing directory to the .sh, then running ./projectzomboid-dedi-server.sh

why not run

screen -dmS PZServer /home/steam/Steam/SteamApps/common/ProjectZomboid/projectzomboid-dedi-server.sh

And have everything done at once? -dm disconnects the screen automatically and -S gives it a name

Type screen -x PZServer to check in on it.

 

Thirdly-

 

We now need to make a Zomboid folder in the user home folder we’ll be running the server from. In this case for me it’s steam (but depending how you did it, it’ll vary.) So now we’ll do:

cd /home/steam

Then

mkdir Zomboid

Then

cd /home/steam/Zomboid

Then

mkdir db

 

why not do:

 

mkdir -p /home/steam/Zomboid/db

The -p arguement automatically creates directories if they don't exist and you don't need to be in the directory to create it.

_____

 

Sorry if I seem nitpicking, but this will compress the instructions and up security a bit to those unfamiliar to linux :)

Share this post


Link to post
Share on other sites

May I add some tidbits about the guide?

 

First

Running the dedicated server while putting in your password will lodge your password into the history (type history in the terminal to see previous commands)

This can be a security problem, even if you consider yourself the only one with access, it would take only a moment to do history > log and grab it.

To prevent that, type in unset HISTFILE previous to that command. It will disable logging temporarily for that session.

It's not normally an issue. Better would be chucking it in a bash script, or leaving the password off, steam_cmd will then prompt for it. However, mostly, having a single command to run to update when a new build is released is very useful. It might be worth using echo to run the command into a shellscript, and providing the commands to make it run, but it's problematic.

I plan on giving the devs a bash script to automate update of servers, to go into the default game download. but I've quite a few things on my plate atm.

 

Second-

 

When back home type:

screen

You will be taken to a wall of text, just hit enter until the text goes away and your left with a blank screen except for your user

 

steam@server.co.uk thing.

 

Now what you do here is

cd /home/steam/Steam/SteamApps/common/ProjectZomboid

Then

./projectzomboid-dedi-server.sh

 

Instead of running screen, then changing directory to the .sh, then running ./projectzomboid-dedi-server.sh

why not run

screen -dmS PZServer /home/steam/Steam/SteamApps/common/ProjectZomboid/projectzomboid-dedi-server.sh
And have everything done at once? -dm disconnects the screen automatically and -S gives it a name

Type screen -x PZServer to check in on it.

This is too complex for most users, plus, it's better to teach them how to use CLI commands a bit more than just having to copy/paste long complex strings all the time. 

Thirdly-

We now need to make a Zomboid folder in the user home folder we’ll be running the server from. In this case for me it’s steam (but depending how you did it, it’ll vary.) So now we’ll do:

cd /home/steam

Then

mkdir Zomboid

Then

cd /home/steam/Zomboid

Then

mkdir db

 

why not do:

mkdir -p /home/steam/Zomboid/db

The -p arguement automatically creates directories if they don't exist and you don't need to be in the directory to create it.

Yup, that'd be better.

_____

 

Sorry if I seem nitpicking, but this will compress the instructions and up security a bit to those unfamiliar to linux :)

Nitpick away! Just, you're not the only one thinking these instructions in mind of those unfamiliar to linux ;)

To be honest, if someone can read your bash history, you're screwed security wise anyway. Luckily, most people will be covered by steamguard.

What it might be worth doing is adding instructions, for debian machines at least, on getting unattended upgrades running, but I'm not sure if it's worth it.

Share this post


Link to post
Share on other sites

I see what you mean by copying and pasting complex strings of text. Gotta start somewhere.

 

As for updating it... I don't know what the "Default install folder" is, but why not make it a function and place in .bashrc or .bash_aliases? Most people are using Ubuntu/Debian I think

 

Assuming the user is steam and the directory to install in is ~/Zomboid/PZServer and the onlinetest beta installed to .local/share/Steam/SteamApps/common/ProjectZomboid/pzserver for the below command. (Fyi, reads are deleted when exiting a subproccess, --> a=2;(a=5); echo $a -- Cool little trick I learned awhile back.)

updatepz() { (killall projectzomboid-dedi-server.sh; read -p "Enter Steam Username " un && read -sp "Enter Steam Password " pass && ~/Zomboid/PZServer/steamcmd.sh +login $un $pass +force_install_dir ~/Zomboid/PZServer "+app_update 108600 -beta onlinetest" validate +exit); ~/.local/share/Steam/SteamApps/common/ProjectZomboid/pzserver/projectzomboid-dedi-server.sh; }

There's a lot of fragmentation right now. The guide shows steamcmd going into it's own folder, Zomboid/db in it's own (still not .Zomboid), then a entire other folder for the game files.

In theory though, running or crontabing the above command would kill the existing server, update it and restart it.

Share this post


Link to post
Share on other sites

Hi Guys,

 

Im trying to setup my own VPS (following this guide to the letter) to run the zomboid server. After 3 reinstalls and tries, im always seem to get stuck on the same error. I have installed the server without too much hassle. However, whenever a client tries to connect, the server gives the following error:

 

*** SERVER STARTED ****
ID_NEW_INCOMING_CONNECTION
id=0 guid=459367169561008266
Error with packet of type: 2 for null
java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:497)
at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
at zombie.GameWindow.ReadStringUTF(GameWindow.java:1995)
at zombie.GameWindow.ReadString(GameWindow.java:2006)
at zombie.network.GameServer.mainLoopDealWithNetData(GameServer.java:940)
at zombie.network.GameServer.main(GameServer.java:196)
ID_DISCONNECTION_NOTIFICATION

 

Anyone else had this problem? Any idea what this could be?

My server is running Ubuntu 12.04 (Precise) LTS.

Share this post


Link to post
Share on other sites

Hi Guys,

 

Im trying to setup my own VPS (following this guide to the letter) to run the zomboid server. After 3 reinstalls and tries, im always seem to get stuck on the same error. I have installed the server without too much hassle. However, whenever a client tries to connect, the server gives the following error:

 

*** SERVER STARTED ****

ID_NEW_INCOMING_CONNECTION

id=0 guid=459367169561008266

Error with packet of type: 2 for null

java.nio.BufferUnderflowException

at java.nio.Buffer.nextGetIndex(Buffer.java:497)

at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)

at zombie.GameWindow.ReadStringUTF(GameWindow.java:1995)

at zombie.GameWindow.ReadString(GameWindow.java:2006)

at zombie.network.GameServer.mainLoopDealWithNetData(GameServer.java:940)

at zombie.network.GameServer.main(GameServer.java:196)

ID_DISCONNECTION_NOTIFICATION

 

Anyone else had this problem? Any idea what this could be?

My server is running Ubuntu 12.04 (Precise) LTS.

That sounds possibly memory issue. How much ram have you given the server?

Share this post


Link to post
Share on other sites

Hi Kirrus,

 

Thank you for replying. The VPS server has a total of 1Gig at his moment. I have edited the projectzomboid-dedi-server.sh to use 512MB. I have read here that i should not be more then 80% of the total memory. So i took 50%.

 

Edit: i have also tried 768MB yesterday. I still got the same error then however. =(

Share this post


Link to post
Share on other sites

Hi Kirrus,

 

Thank you for replying. The VPS server has a total of 1Gig at his moment. I have edited the projectzomboid-dedi-server.sh to use 512MB. I have read here that i should not be more then 80% of the total memory. So i took 50%.

 

Edit: i have also tried 768MB yesterday. I still got the same error then however. =(

 

1GB is mighty low, you wouldn't be supporting that many player numbers with such little memory. Maybe there is a minimum memory requirement for servers? I don't know, I just don't think 1GB is enough. You're not even using all of it, you're only using 512MB and that just seems way too low. Don't quote me on it.

 

Edit: Fixed for incredibly poor wording.

Share this post


Link to post
Share on other sites

 

Hi Kirrus,

 

Thank you for replying. The VPS server has a total of 1Gig at his moment. I have edited the projectzomboid-dedi-server.sh to use 512MB. I have read here that i should not be more then 80% of the total memory. So i took 50%.

 

Edit: i have also tried 768MB yesterday. I still got the same error then however. =(

 

1GB is mighty low, you wouldn't be supporting that many player numbers with such little memory. Maybe there is a minimum memory requirement for servers? Yet the 1GB is not enough, though don't quote me on that I could be very much wrong.

 

 

Well, that would be a downer. I wont quote you, but do you thing 2Gig (with 1536MB available to Java) is OK then? And i wont be supporting that many players indeed. Maybe max 6 or something at the same time.

Share this post


Link to post
Share on other sites

 

 

Hi Kirrus,

 

Thank you for replying. The VPS server has a total of 1Gig at his moment. I have edited the projectzomboid-dedi-server.sh to use 512MB. I have read here that i should not be more then 80% of the total memory. So i took 50%.

 

Edit: i have also tried 768MB yesterday. I still got the same error then however. =(

 

1GB is mighty low, you wouldn't be supporting that many player numbers with such little memory. Maybe there is a minimum memory requirement for servers? Yet the 1GB is not enough, though don't quote me on that I could be very much wrong.

 

 

Well, that would be a downer. I wont quote you, but do you thing 2Gig (with 1536MB available to Java) is OK then? And i wont be supporting that many players indeed. Maybe max 6 or something at the same time.

 

 

I imagine if you were to get it up to the point where you could dedicate at least 1GB you might get away with it, but getting the machine to 2GB and dedicating 1536MB should do the trick, if that's the issue of course. I don't want to be wasting your money in the event it turns out to not be the issue.

Share this post


Link to post
Share on other sites

Well. Thank you so far. First i'll upgrade my VPS then. See if that fixes it :/ If not. i'll be back ;)

Come back anyway! We have Waffles!

Well, discussions about waffles vs pancakes.. But Waffles!

Share this post


Link to post
Share on other sites

So I know someone else is having this problem too, and I'm pretty much stumped.

ID_NEW_INCOMING_CONNECTIONid=0 guid=558446494616930934Error with packet of type: 2 for nulljava.nio.BufferUnderflowException        at java.nio.Buffer.nextGetIndex(Buffer.java:497)        at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)        at zombie.GameWindow.ReadStringUTF(GameWindow.java:1995)        at zombie.GameWindow.ReadString(GameWindow.java:2006)        at zombie.network.GameServer.mainLoopDealWithNetData(GameServer.java:940)        at zombie.network.GameServer.main(GameServer.java:196)ID_DISCONNECTION_NOTIFICATION

I've already allocated 2GB of the 4GB of RAM, on my VPS. I'm currently running Debian 7 and followed the instructions to a "T", did it three times too!

If anyone has gotten around this, please post!

Share this post


Link to post
Share on other sites

So I know someone else is having this problem too, and I'm pretty much stumped.

ID_NEW_INCOMING_CONNECTIONid=0 guid=558446494616930934Error with packet of type: 2 for nulljava.nio.BufferUnderflowException        at java.nio.Buffer.nextGetIndex(Buffer.java:497)        at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)        at zombie.GameWindow.ReadStringUTF(GameWindow.java:1995)        at zombie.GameWindow.ReadString(GameWindow.java:2006)        at zombie.network.GameServer.mainLoopDealWithNetData(GameServer.java:940)        at zombie.network.GameServer.main(GameServer.java:196)ID_DISCONNECTION_NOTIFICATION

I've already allocated 2GB of the 4GB of RAM, on my VPS. I'm currently running Debian 7 and followed the instructions to a "T", did it three times too!

If anyone has gotten around this, please post!

 

What's the CPU specification? See if we can't nail down what this problem is.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...