Jump to content

Can't host server; servertest.db is never modified with new user info.


JohannesMP

Recommended Posts

TL;DR: How do I get around the admin prompt every time I run projectzomboid-dedi-server.sh?

 

 

 

I was running a previous build on my Ubuntu VPN for some friends which worked fine.

 

Now i'm trying out the latest build (26), and every time I start projectzomboid-dedi-server.sh it says that it says:

user database "/root/Zomboid/db/servertest.db"User 'admin' not found, creating it Enter new administrator password: 

The file exists, but when I open it in an sqlite editor I never see any entries, even after connecting to it and using /save, and even after I run /adduser on a few usernames.

 

 

The reason this is a problem is because I'm using supervisor to run my server, which I prefer over something like screen because it's easier for me to administrate; I just pointing it at shell script and it runs it, even after unforeseen server restarts, and it's way easier than trying to set up any weird custom service/daemon to manage it.

 

However because the server seems to require user input -every time- it starts, supervisor gets stuck there, and the server doesn't go live.

 

 

I've even tried logging in with another user, then using the admin account to give that user admin permissions. even after running /save, servertest.db is completely unaffected.

 

I've also tried editing servertest.db manually, adding the admin, but that didn't remove the prompt. I may not know what is required in all the fields, like what the 'world' column should contain.

 

 

What really confuses me is that the 'How to Administrate a Server' topic clearly states: "Admin account is BUGGED right now, if the database exist the admin/admin account will be created, so : NO PROMPT DIALOG FOR ADMIN ACCOUNT !" - So it's saying, if the file exists (it does for me), then it shouldn't do the prompt. So why am I getting the prompt?

 

 

I'm hoping that adding an entry to servertest.db would fix it, but would need to know what a valid entry looks like. Anyone know how I might know of a workaround?

Link to comment
Share on other sites

Do you see any SQL type of errors in the console on the server?

 

None: http://pastebin.com/at1hiWyT

 

That pastebin shows my entire console printout. I logged in with admin, then used /save, and finally /quit.

 

If I then run ./run_server.sh again, I will once again receive the same prompt to enter my admin password, because it thinks no admin account exists.

 

At which point should it be writing to the servertest.db file?

Link to comment
Share on other sites

And here's my servertest.db file from Zomboid/db/, after running the shell script, typing in an admin password, logging in and saving, and repeating that several times : https://copy.com/TDUpppb8Ljn2

 

I even tried completely deleting the Zomboid folder, and it correctly created all the subfolders, etc. So it's not a permission issue that it can't modify the file.

Link to comment
Share on other sites

That database is missing a field called "encryptedPwd" which is odd.  Make sure Steam updated your copy of PZ correctly (verify integrity of game files through Steam).

 

 

Yeah, I had some odd behavior when I tried to update to the IWBMSF beta. It kept saying 0/0 during the update phase, then errored out, but somehow was able to run and connect with my local IWBMSF install.

 

I'll try deleting it and re-downloading it on my server.

Link to comment
Share on other sites

Here's what I tried doing on my VPS server:

 

1. I completely Deleted the SteamApps/common/ProjectZomboid directory and corresponding SteamApps/appmanifest_108600.acf file.

 

2. I logged into steamcmd and ran Steam>app_update 108600 -beta iwillbackupmysave -betapassword iaccepttheconsequences, which correctly downloaded the Project Zomboid folder.

 

3. I made sure to validate the app:

Steam>app_update 108600 validate Initial App state (0x4) installed App state (0x20104) validating, progress: 0.05 (697386 / 1421749350) App state (0x20104) validating, progress: 35.29 (501792825 / 1421749350) App state (0x20104) validating, progress: 83.44 (1186358397 / 1421749350)Success! App '108600' already up to date.

4. I completely deleted my /root/Zomboid folder

 

5. I ran the server with the projectzomboid-dedi-server.sh shellscript, except I changed -Xms4096m and -Xmx4096 to -Xms1536 and -Xmx1536.

 

6. The server output: 

Loading RakNet from: /home/steam/Steam/SteamApps/common/ProjectZomboid/projectzomboidserver name is "servertest"creating server options file "/root/Zomboid/Server/servertest.ini"SVN REVISION 962user database "/root/Zomboid/db/servertest.db"User 'admin' not found, creating it Enter new administrator password: glork123Confirm the password: glork123Administrator 'admin' created, you can now log with it using admin/yourpassword.Initialising Server Systems...

(loading text removed here)

Loading world...tiledef: loading media/tiledefinitions.tilestiledef: loading media/newtiledefinitions.tilesreturn code: 0*** SERVER STARTED ****server is listening on port 16261

7. I logged into the game from my local Mac IWBUMS installation, using the newly created admin account. Server Output:

ID_NEW_INCOMING_CONNECTIONid=0 guid=1398612497750109Connected new client admin ID # 0 and assigned DL port 16262Shared zombie descriptor packet size is 64KBPlayer connected from 1398612497750109Loading cell: 155, 144 (36, 33)Loading cell: 156, 144 (36, 33)Loading cell: 155, 145 (36, 33)Loading cell: 156, 145 (36, 33)

8. As admin I ran /save, then /quit. The server log showed no errors. The java program closed, returning me to the previous terminal location.

 

9. I ran the server shell script again, and once again received the prompt to add an admin password:

Loading RakNet from: /home/steam/Steam/SteamApps/common/ProjectZomboid/projectzomboidserver name is "servertest"reading server options from "/root/Zomboid/Server/servertest.ini"SVN REVISION 962user database "/root/Zomboid/db/servertest.db"User 'admin' not found, creating it Enter new administrator password: 

I have zipped up and included my entire newly created root/Zomboid directory: https://copy.com/Y4yYMqxsH6eP

 

As you can see, Zomboid/db/servertest.db is once again completely blank, and is still missing the "encryptedPwd" field that you mentioned.

 

 

To summarize, I have started from a blank slate and installed the IWBMSF Beta branch, which validated correctly. I also completely deleted the Zomboid directory, which was generated again upon running the server. The newly created Zomboid directory contained db/servertest.db which is missing the 'encryptedPwd' field.

 

I am therefore assuming that this is a bug with the current IWBMSF build, or at least how it behaves when run on a Ubuntu 12.10 64bit VPS.

 

 

I have also tried manually adding a text field by named encryptedPwd, but the issue persists; No user entry is ever created in the database.

 

 

As it stands, I am unable to run a dedicated server, since the user database fails to save.

Link to comment
Share on other sites

Hmmm, I see servertest.db-journal as well, which I think should be removed after updating the database is complete.

Perhaps the database needs to be flushed/closed properly.  I'll see what I can learn about this.

Could you please try uploading a correctly formatted servertest.db file for me to test? I'm hoping that, while the file may not be generated correctly automatically, it will at least work as expected and save the entry if it has a working db file. That way there is a chance that I might be able to at least run the server in the meantime while you guys are looking into the underlying issue.

Link to comment
Share on other sites

Here's servertest.db with user admin password admin.

 

This worked just as I had hoped! With this file the server no longer requests a password when starting up.

 

Could you try extracting the zombie_network.zip file into ProjectZomboid/zombie/network.

All it does is close the database file when you quit the server with /quit.

 

This did not work:

  1. On my Server's Project Zomboid Installation, I extracted the files into the network folder as instructed, replacing the relevant old files
  2. I deleted all existing Zomboid/db files
  3. I ran the server, which (as expected) prompted me to enter an admin password.
  4. Attempting to log onto the server (with or without admin) resulted in the client hanging on 'Connecting...' indefinitely in the Server selection window.
    1. The server log while connecting, not showing any errors:
    2. *** SERVER STARTED ****server is listening on port 16261ID_NEW_INCOMING_CONNECTIONid=0 guid=1398773760401318User admin is trying to connect.Connected new client admin ID # 0 and assigned DL port 16262Shared zombie descriptor packet size is 64KB
  5. Switching the db files out for the one you sent me that worked before applying the modified network files, I once again get stuck on "Connecting..." on the server list.
  6. Since I was unable to log in, I cannot confirm if running /quit on the server would have closed the database file.

I ended up reverting my project Zomboid installation with Steam>app_update 108600 validate

 

For the time being, I can run my server thanks to the correctly formatted servertest.db file you uploaded for me, and I hope you guys will manage to figure out what is preventing the database from saving in future builds.

Link to comment
Share on other sites

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...