Systemd services quit on ubuntu 20.04 LTS
fansuregrin opened this issue · comments
Describe the bug
Systemd services quit on ubuntu 20.04 LTS.
Describe the environment
Ubuntu 20.04 LTS
rustdesk-server-hbbs_1.1.8_amd64.deb
rustdesk-server-hbbr_1.1.8_amd64.deb
How to Reproduce the bug
1.Start hbbs service and get errors.
sudo systemctl start rustdesk-hbbs
rustdesk-hbbs.service - Rustdesk Signal Server
Loaded: loaded (/lib/systemd/system/rustdesk-hbbs.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2023-07-22 19:53:56 CST; 5s ago
Process: 581135 ExecStart=/usr/bin/hbbs (code=exited, status=209/STDOUT)
Main PID: 581135 (code=exited, status=209/STDOUT)
2.Start hbbr service and get errors.
sudo systemctl start rustdesk-hbbr
rustdesk-hbbr.service - Rustdesk Relay Server
Loaded: loaded (/lib/systemd/system/rustdesk-hbbr.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2023-07-22 19:57:09 CST; 3s ago
Process: 584421 ExecStart=/usr/bin/hbbr (code=exited, status=209/STDOUT)
Main PID: 584421 (code=exited, status=209/STDOUT)
3.logs
7月 22 19:46:35 ubuntu-Super-Server systemd[1]: Started Rustdesk Signal Server.
7月 22 19:46:35 ubuntu-Super-Server systemd[573745]: rustdesk-hbbs.service: Failed to set up standard output: No such file or directory
7月 22 19:46:35 ubuntu-Super-Server systemd[573745]: rustdesk-hbbs.service: Failed at step STDOUT spawning /usr/bin/hbbs: No such file or directory
7月 22 19:46:35 ubuntu-Super-Server systemd[1]: rustdesk-hbbs.service: Main process exited, code=exited, status=209/STDOUT
7月 22 19:46:35 ubuntu-Super-Server systemd[1]: rustdesk-hbbs.service: Failed with result 'exit-code'.
7月 22 19:46:13 ubuntu-Super-Server systemd[1]: Started Rustdesk Relay Server.
7月 22 19:46:13 ubuntu-Super-Server systemd[573380]: rustdesk-hbbr.service: Failed to set up standard output: No such file or directory
7月 22 19:46:13 ubuntu-Super-Server systemd[573380]: rustdesk-hbbr.service: Failed at step STDOUT spawning /usr/bin/hbbr: No such file or directory
7月 22 19:46:13 ubuntu-Super-Server systemd[1]: rustdesk-hbbr.service: Main process exited, code=exited, status=209/STDOUT
7月 22 19:46:13 ubuntu-Super-Server systemd[1]: rustdesk-hbbr.service: Failed with result 'exit-code'.
Expected behavior
Systemd services start successfully.
Additional context
ls /var/lib/rustdesk-server
db_v2.sqlite3 db_v2.sqlite3-wal id_ed25519 id_ed25519.pub
ls /var/log/rustdesk
the folder is empty...
the rustdesk-hbbs.service
file:
[Unit]
Description=Rustdesk Signal Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/hbbs
WorkingDirectory=/var/lib/rustdesk-server/
User=
Group=
Restart=always
StandardOutput=append:/var/log/rustdesk-server/hbbs.log
StandardError=append:/var/log/rustdesk-server/hbbs.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
the rustdesk-hbbr.service
file:
[Unit]
Description=Rustdesk Relay Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/hbbr
WorkingDirectory=/var/lib/rustdesk-server/
User=
Group=
Restart=always
StandardOutput=append:/var/log/rustdesk-server/hbbr.log
StandardError=append:/var/log/rustdesk-server/hbbr.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
However, use /usr/bin/hbbs
and /usr/bin/hbbr
to start is OK! So, I guess the problem is caused by systemd unit file.
I know the reason! The folder /var/log/rustdesk-server
not exist!!!
Is the folder /var/log/rustdesk-server there?
So the folder wasn't created with the install?
Yes.
yes, a bug there,