Giter Club home page Giter Club logo

pz-server-tools's People

Contributors

quarantin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pz-server-tools's Issues

Maxmen reset to default every restart

I have increased the maxmem from default 8g to 13g but every restart of the server, it simply reset back to default again.

According to the official, the json shouldn't reset to default unless the server update or check for new version

Cron error for pzserver1

This is a clean install on a fresh ubuntu vps and yes, there are some errors.

I noticed that the cron for pzserver1 is not installed so I took the luxury to input manually myself but when during daily restart, this error pop up and then removed the crons job that I have added.

OK
cp: cannot stat '/home/pzstadmin/pz-server-tools/cron/pzserver': Permission denied
cat: '/home/pzserver1/.pzst/crontabs/*': No such file or directory
find: The argument to -user should not be empty
OK

Evidently, it cannot access pzstadmin's home dir which make sense because the permission is "pzstadmin:pzstadmin" w/ 750 and not "pzstadmin:pzst"

Mods not loaded if you only use WorkshopItems=

I've copied and pasted a friends config and made sure that Mods= was empty, as that's not in the manual.
I've kept the WorkshopItems= line as per his config and fired up the server. He has a line of "Mods: Ravencreekd, Authentic-z-Current and 35 more.." but my server didn't show that. I was also missing options like Extra Traits mod i put in the WorkshopItems= line.

After i copied his Mods= line everything started to work for me.

To clarify:

I used

pzserver config

To add the ID's to WorkshopItems=
After that, ran

pzserver checkmods

and it saw a few mods (i don't think all of them for some reason?)
Only after using the line Mods= with the names in them, they seemed to start working

Two server instances

Sometimes when the server restart, it will boot up with two instances, I am not sure why.

ProjectZomboid64.json and crontab are resetting to factory settings on planned restarts

After moving servers and reinstalling pz-server-tool on the new one, we noticed that other jobs we add to the pzserver1 crontab AND ProjectZomboid64.json are being reset frequently to factory settings. (EDIT Jul 5: it happens on the planned restarts defined at /etc/pzst/config.json).

This is causing Xmx to reset to 8 GB (we have 128 GB, I'm using 96 GB) and server ends up crashing after a restart.

Daily auto restart doesn't seem to be working

I checked crontab, it seems to be there
* * * * * pzupdate

I checked the /etc/pzst/config.json on both pzstadmin and pzserver1 too
Also used pzst checkconfig command.
{ "daily-restarts": [ "03:00", "09:00", "15:00", "21:00" ], "editor": "nano", "max-backups": 5, "pzservers": [ "pzserver1" ], "restart-sequence": [ 10, 5, 2, 1 ], "user": "pzstadmin", "install": "/home/pzstadmin/pz-server-tools" }

What am I missing?
Some kind of permissions?

Changing restart text

I'm not sure if this is an issue but I wanted to edit the restart sequence text to "10 minutes" instead of the original "10:00 minutes" as some players got confused about it.

The only file I found about this is in pz-server-tools/pzserver/pzrestartjob.

Apparently this file does nothing (maybe a source code).

Question: is there a way to edit the warning text?

Auto restart not working

I just installed pzst tools on a new server. Everything is working except the auto restart schedule in the config.json isn't taking effect. I'm been having to manually restart the server.

Command pzserver checkmods returns error

pzserver1@mix74p3:~$ pzserver checkmods
Traceback (most recent call last):
File "/usr/local/bin/pzcheckmods", line 125, in
PZModMonitor(config, restart=restart, update_cache=update_cache)
File "/usr/local/bin/pzcheckmods", line 28, in init
new_cache = self.get_new_cache(mods)
File "/usr/local/bin/pzcheckmods", line 65, in get_new_cache
return get_mod_updates(mods)
File "/etc/pzst/env/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/etc/pzst/env/lib/python3.8/site-packages/retry/api.py", line 73, in retry_decorator
return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
File "/etc/pzst/env/lib/python3.8/site-packages/retry/api.py", line 33, in __retry_internal
return f()
File "/etc/pzst/env/lib/python3.8/site-packages/pypzst/init.py", line 60, in get_mod_updates
for workshop_item in jsondata['response']['publishedfiledetails']:
KeyError: 'response'

Backup not following symlinks

On pzbackupsave, line 26:

tar cf - "${PZSERVERSAVE}" | lz4 > "${ZOMBOID}/Saves.$(date +%Y%m%d-%H%M%S)${UNSAFEBACKUP}.tar.lz4"

The line above will miss following symlinks if, for example, Saves is in a ramdisk.

Is that ok to replace it with the following which adds 'h' to tar options? It seems to address the problem.

tar chf - "${PZSERVERSAVE}" | lz4 > "${ZOMBOID}/Saves.$(date +%Y%m%d-%H%M%S)${UNSAFEBACKUP}.tar.lz4"

Permission denied

Hello i have problem when i run this
pzserver install

Redirecting stderr to '/home/pzserver/Steam/logs/stderr.txt'
Logging directory: '/home/pzserver/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1702079268
-- type 'quit' to exit --
Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
OK

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x5) verifying install, progress: 5.37 (284945507 / 5303283844)
 Update state (0x5) verifying install, progress: 15.51 (822687599 / 5303283844)
 Update state (0x5) verifying install, progress: 29.75 (1577634859 / 5303283844)
 Update state (0x5) verifying install, progress: 40.59 (2152735235 / 5303283844)
 Update state (0x5) verifying install, progress: 51.58 (2735358915 / 5303283844)
 Update state (0x5) verifying install, progress: 62.38 (3308450803 / 5303283844)
 Update state (0x5) verifying install, progress: 71.22 (3776807203 / 5303283844)
 Update state (0x5) verifying install, progress: 80.88 (4289355100 / 5303283844)
 Update state (0x5) verifying install, progress: 93.32 (4949226864 / 5303283844)
 Update state (0x61) downloading, progress: 0.00 (0 / 3053)
Success! App '380870' fully installed.
cp: cannot create regular file '/etc/pzst/config.json': Permission denied
OK

PZ Restart Script Bugged

Hey, sorry to bother you again but I posted a bug under my former issue topic and I'm not sure you are able to see it as you closed it.

So the bug is:

"LOG : General , 1683314201099> 1,395,088,542> command entered via server console (System.in): "servermsg "Restarting server in 1 minutes""
LOG : General , 1683314201121> 1,395,088,563> Message sent.
LOG : General , 1683314501434> 1,395,388,877> command entered via server console (System.in): "servermsg "Restarting server in 5 minutes. Find a safe place to hide for restart!""
LOG : General , 1683314501503> 1,395,388,946> Message sent.
LOG : General , 1683314681642> 1,395,569,085> command entered via server console (System.in): "servermsg "Restarting server in 2 minutes. Find a safe place to hide for restart!""
LOG : General , 1683314681706> 1,395,569,148> Message sent.
LOG : General , 1683314741710> 1,395,629,153> command entered via server console (System.in): "servermsg "Restarting server in 1 minute. Find a safe place to hide for restart!""
LOG : General , 1683314741806> 1,395,629,248> Message sent."

There is a zero missing from the first warning.

Additional question: can you make me specific mods, ideas for a PZ mutiplayer server (not for free of course)?

Thanks for your work!

Don't run this command as root

Firstly,
The cron jobs for pzst isn't installed, I believe because pzst isn't a user. In any case, I manually added those cron jobs.

This line is returning an error, not allowing to run as root so what am I suppose to run it as?
*/10 * * * * root /usr/local/bin/pzstclearbackups

Restarts are hanging

pzstartloop seems to be hanging on the daily restart and mod updates.

It's a fresh install from a few days ago. Until June 12th it was working flawlessly (I've been using pz-server-tools since March) but with the last commits it seems unstable.

When it's a daily restart or mod update, I see the server shuts down correctly but it doesn't come up. Is there any way I can help looking into it?

We're using Ubuntu 20.04.

Unsafe Backup?

I have a lot of unsafe backups created while the server not starting, why?

check_not_running is not reliable

Sometimes when I do "pzserver restart", the server shuts down but then it doesn't boot up because it says "Server is running" when it isn't. I had to reboot the vps to get working again.

Some commands not working

Hey! I was trying for the first time your project and some commands were not working for me, for example:

pzserver@h3010054:~$ pzserver stop
ERROR: ioctl failed: Operation not permitted
pzserver@h3010054:~$ pzserver message
Usage: /usr/local/bin/pzmessage message...
pzserver@h3010054:~$ pzserver message  Test
ERROR: ioctl failed: Operation not permitted
pzserver@h3010054:~$ pzserver command test
ERROR: ioctl failed: Operation not permitted
pzserver@h3010054:~$ pzserver command save
ERROR: ioctl failed: Operation not permitted
pzserver@h3010054:~$ pzserver quit
ERROR: ioctl failed: Operation not permitted

pzserver restart is also not working as well, just give me back an "OK" but no restart.
This is the log:

2023-06-01 18:14:52 PZRestarterJob pzserver: Restart job started (delay: 0, restart_sequence: [5, 2, 1])
2023-06-01 18:14:52 PZRestarterJob pzserver: Sending message: Restarting server in 5 minutes. Find a safe place to hide for restart!
2023-06-01 18:17:52 PZRestarterJob pzserver: Sending message: Restarting server in 2 minutes. Find a safe place to hide for restart!
2023-06-01 18:18:52 PZRestarterJob pzserver: Sending message: Restarting server in 1 minute. Find a safe place to hide for restart!
2023-06-01 18:19:52 PZRestarterJob pzserver: Restarting now!

I was online, but there were no messages nor restart

This is my distro:

NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"

Do I need to do something else or missed something maybe?


Update:
using RCON directly I can save/close the server (I'm not sure if you are using the same way with thhe scripts)

Waiting commands for 127.0.0.1:27015 (or type :q to exit)
> save
World saved
> save
World saved
> save
World saved
> quit
Quit

unsafe backup

So my MP server has this unsafe backup and ever since, all other restart is unsafe.......
How do you fix thix?

Error installing Project Zomboid Server Tools

When installing on a Ubuntu server (#31~20.04.1-Ubuntu SMP Fri Jan 14 14:37:50 UTC 2022)

ubuntu@zomboid:~$ sudo useradd --create-home --shell /bin/bash pzstadmin
ubuntu@zomboid:~$ sudo passwd pzstadmin
New password:
Retype new password:
passwd: password updated successfully
ubuntu@zomboid:~$ sudo usermod -aG sudo pzstadmin

The ./pzst/pzst install command outputs a permission denied error after new shell.

ubuntu@zomboid:~$ sudo -i -u pzstadmin
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

pzstadmin@zomboid:~$ git clone https://github.com/quarantin/pz-server-tools
Cloning into 'pz-server-tools'...
remote: Enumerating objects: 1768, done.
remote: Counting objects: 100% (830/830), done.
remote: Compressing objects: 100% (436/436), done.
remote: Total 1768 (delta 562), reused 596 (delta 362), pack-reused 938
Receiving objects: 100% (1768/1768), 224.06 KiB | 8.96 MiB/s, done.
Resolving deltas: 100% (1133/1133), done.
pzstadmin@zomboid:~$ cd pz-server-tools
pzstadmin@zomboid:~/pz-server-tools$ ./pzst/pzst install
[sudo] password for pzstadmin:
[*] Updating package cache
[*] Upgrading packages
Extracting templates from packages: 100%
[*] Installing new package `jq`
[*] Installing new package `python3-venv`
[*] Installing new package `sqlite3`
[*] Installing new package `unzip`
[*] Adding system user: pzst
[*] Creating virtual environment
[*] Installing Project Zomboid Server Tools
mkdir: cannot create directory ‘/home/pzst’: Permission denied
/usr/local/bin/pzst_config: line 19: /home/pzst/.pzst/config.json: No such file or directory
pzstadmin@zomboid:~/pz-server-tools$

Clearing server

Does this have a tool for clearing the server completely? I'm trying to get everything set back to day 1.

MaxPlayers are not used from servertest.ini

Whenever I try to edit MaxPlayers in servertest.ini file or using pzserver config its always 64 slots available after starting the server. Tried to find other solutions but nothing works...
Screenshot_1
Screenshot_2

Can someone please help?

pzserver uninstall works when server is still running

Wanted to try from scratch for attempt xyz to get things to run the way i'd like to :-)
So i did a

pzserver uninstall

While the server was still running, this worked without issues. Though, i could still connect to my server afterwards.

pzserver/.pzst/pzst.log

this file gets so big so fast. it locks up my machine. i have to delete the file every day to be able run my server or anything else on my machine. is there anyway i can stop this from happening?

spawpoints and spawnregions don't work on default install

I've just used this incredible tool to install a PZ server. It feels great and really easy to use. But beside the other issue i just posted about the mods, the spawnpoints and spawnregions command is not working on a default install? I'm completely new to project zomboid servers so, forgive me if i saw anything weird:

pzserveroc@c-vps-01:~$ pzserver spawnregions
Configuration not found
pzserveroc@c-vps-01:~$ pzserver spawnpoints
Configuration not found

restart_delay always zero is causing restarts to take a bit too long

I'm not sure if this is an issue or just a question, but when a mod change is detected and server stops (after the normal countdown) it's taking way longer (maybe close to 10 minutes) than usual for the server to start again. What is the best way to configure restart_delay to, let's say, 1 minute? Thanks!

unlisted mods

i have mods that are unlisted and apparently checkmod is unable to get the details of the unlisted mods
is it possible to fix that or do i hve to make those mods public?

Ability to change server name.

Instead of using this tool to set up a new server I decided to migrate an existing one for better management which I think causes issues with the db even after changing the names of each file (which is also kind of annoying).
After setting everything up and joining the server I was prompted to spawn somewhere new and create a new character which leads me to believe it created a new entry in the db called servertest.

As for fixing this, I feel like it should either be what you name the user that hosts the server, or in the config file something like this:

{
    "pzservers": [
        {
            "pzserver1": "servertest"
        }
    ]
}

Or maybe even just as an argument to pzserver start

pzserver says it's running when it's not

Hi, first of all, thank you greatly for your valuable work! your app is wonderful and solves most needs I had with my server. I'm kinda new to linux and coding, and I ran into a problem that I got me stuck.
I'm running your app to run my server on a gcloud VM with ubuntu 20.04 LTS
I installed the game server following the instructions from pzserver github page.
I set an automatic reset for this morning, but when I woke up the server was down, and no proccess was running on the VM.
I tried to use pzserver start, but it returns that pzserver is already running. When I try restart/stop/quit/kill it says there's none running. I unistalled and installed again, but the problem persists. I ran the debug code you posted previously, and it generated a troubleshooting file that I don't know how to interpret. Do you have any idea what can be happening to my server? :/ please help :(
pzserver-trouble
troubleshoot_20231024_125133.log

update

Hello,

Are you planning to do any updates or the project is abandoned ?????

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.