pz-server-tools icon indicating copy to clipboard operation
pz-server-tools copied to clipboard

Some commands not working

Open pvm opened this issue 1 year ago • 17 comments

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

pvm avatar Jun 01 '23 16:06 pvm

@quarantin here is my kernel info:

Linux HOST 5.4.0 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64 x86_64 x86_64 GNU/Linux

pvm avatar Jun 01 '23 17:06 pvm

Hi, can you install strace (from an account with sudo access, for example pzstadmin): sudo apt install strace

Run the following command as your pzserver user while the pz server is online and accepting players: strace -f pzserver stop 2> /tmp/strace.log

Post the file /tmp/strace.log here.

Also it seems your kernel is not from Ubuntu, because the version should be something like: 5.4.0-148-generic

quarantin avatar Jun 01 '23 17:06 quarantin

I didn't changed the kernel, was the one available from the host installation.

strace.log

pvm avatar Jun 01 '23 17:06 pvm

Thanks I'll investigate. Can you also run pzdebug and post the resulting file here?

quarantin avatar Jun 01 '23 17:06 quarantin

thank you for taking a look!

troubleshoot.log.gz

pvm avatar Jun 01 '23 17:06 pvm

I don't see any problem in the logs, except the permission denied for the call to TIOCSTI IOCTL, which probably means that it's been disabled in your kernel by your hosting provider :/ Who's your hosting provider?

quarantin avatar Jun 01 '23 17:06 quarantin

Strato in Germany

pvm avatar Jun 01 '23 18:06 pvm

Hum, unfortunately I don't read German :sweat_smile: Do they let you install custom OS from an ISO image? If no do they let you install custom kernels?

quarantin avatar Jun 01 '23 18:06 quarantin

I sent them a message now, let's hope that they allow me to install a custom ISO.

I will post the update here as soon as I get it.

pvm avatar Jun 01 '23 18:06 pvm

Perfect. But is it strado or strato? I can't find their website

quarantin avatar Jun 01 '23 18:06 quarantin

https://www.strato.de/

pvm avatar Jun 01 '23 18:06 pvm

Damn, not sure why I read "strado" :joy: Do you have a VPS or dedicated server?

quarantin avatar Jun 01 '23 18:06 quarantin

I wrote it wrong the first time. It's a dedicated server

pvm avatar Jun 01 '23 18:06 pvm

It's a dedicated server

I believe this is good news. Most dedicated server hosting providers let you install an OS from an ISO image .

FYI this is the ISO image I'm using for testing pzst: https://releases.ubuntu.com/focal/ubuntu-20.04.6-live-server-amd64.iso

quarantin avatar Jun 01 '23 19:06 quarantin

Linux HOST 5.4.0 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64 x86_64 x86_64 GNU/Linux

That looks like an Amazon MSK image, an docker service. I don't know how your provider managed to obtain a docker image off a cloud provider to run on their hardware. Or perhaps your provider is reselling a docker and repackaged it as dedicated server which sounds really shady. It is unlikely you can get TIOCSTI on a container as it is considered a security vulnerability, especially you don't own the docker. You should start looking for another provider, not only because it disallow TIOCSTI but shady for potentially running a docker as dedicated server service.

Lu5ck avatar Jun 02 '23 07:06 Lu5ck

It's a VPS actually, not a dedicated server.

pvm avatar Jun 02 '23 11:06 pvm

Any news on this?

quarantin avatar Aug 19 '23 08:08 quarantin