rustdesk / rustdesk-server-pro

Some scripts for RustDesk Server Pro are hosted here.
142 stars 73 forks source link

Upgrade from OSS to Pro and adding non-priveleged user causes HBBR service to not start due to HBBS & HBBR still running on previous account #449

Open Groenkaal opened 4 days ago

Groenkaal commented 4 days ago

Bug Description

When first installing OSS I wasn't prompted with the "this can run as a non priveleged user". When upgrading to pro by running the script provided, the HBBR service didnt start. When first installing OS version I ran it as admin1. I ran the upgrade script as root due to an error with using "sudo bash" as admin1. I used svc_user1 as the non-priveleged user.

After trying to uninstall, reinstall and so on I found out that a HBBR service still ran on the active ports 21115:21119 - i killed the HBBR process and it started instantly.

How to Reproduce

  1. Install OS version as admin1
  2. Upgrade from OS as root
  3. Try starting HBBR service

Expected Behavior

systemctl status rustdesk-hbbr.service

This will exit with error code.

Operating system(s) on local side and remote side

Ubuntu 24.04.1 LTS (non-docker)

RustDesk Version(s) on local side and remote side

1.4.5 - only serverside

Screenshots

image

Additional Context

A restart of the server could've possibly solved it, however I didnt try it as a regular update should run without restarts.

rustdesk commented 4 days ago

@21pages

rustdesk commented 4 days ago

Why do you install OSS with admin1, but install Pro with root? I suggest you uninstall OSS version totoally first, please make sure it has been totally removed.https://github.com/rustdesk/rustdesk-server-pro/blob/e478d266b0f36d35980f6bc0f0d75336e0316abe/uninstall.sh#L178

Groenkaal commented 4 days ago

Using "sudo bash <(wget -qO- https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/convertfromos.sh)" threw an error, swapped to root to circumvent the "sudo".

Tried removing with sudo systemctl stop rustdesk-hbbs.service sudo systemctl disable rustdesk-hbbs.service sudo systemctl stop rustdesk-hbbr.service sudo systemctl disable rustdesk-hbbr.service sudo rm /etc/systemd/system/rustdesk-hbbs.service sudo rm etc/systemd/system/rustdesk-hbbr.service sudo rm /usr/bin/hbbs sudo rm /usr/bin/hbbr sudo rm -rf /var/lib/rustdesk-server/

and reinstalling - same issue.

The original issue has been resolved by finding PID of HBBR and killing it, I'm just trying to help you guys finetune.

Edit: Just to clarify, I'm not a Linux superuser, so swapping to root was the easy solution.

21pages commented 4 days ago

How did you install the oss version, docker or install script?

Groenkaal commented 4 days ago

Install script, on a fresh Ubuntu Server used only for rustdesk.

21pages commented 4 days ago

Both updating with same user or updating with root(set as another non-priveleged user) work.

Can you provide more information?

  1. Are admin1 and svc_user1 in the sudo group?
  2. What's the error when updating?
Groenkaal commented 3 days ago

root and admin1 er sudo'ers, svc_user1 is not - pro install stated it could run as non-priveleged user, and it does run right now without issues. No error occured when updating, just HBBR service not starting after update due to being blocked.