rustdesk-server-pro icon indicating copy to clipboard operation
rustdesk-server-pro copied to clipboard

ISSUE: Created Token not showing up

Open SchmidtMax-staips opened this issue 1 year ago • 4 comments

Hello,

I created a token in the web console for API usage about 1 hour ago. The token name and creation timestamp then was shown in the list under section "Token List".

After doing some docker stop / start operations on the machine to configure my backup software and freeze/thaw scripts, the token is no longer visible in the list. I can still use it as before, but now I could think, that there is no token existing, nor I am able to revoke it.

Screenshot 14 12 2024 um 22 32 56 PM

Version: RustDesk Server Pro 1.4.6 on Ubuntu / Docker Freshly installed on 2024-12-14

SchmidtMax-staips avatar Dec 14 '24 21:12 SchmidtMax-staips

@21pages follow it up

I can not reproduce this, there must be something unexpected.

rustdesk avatar Dec 15 '24 02:12 rustdesk

  1. Did you install container with https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/installscript/docker/ ?

  2. Only the token is missing, Other informations are still the same?

  3. Could you run the following commands to see whether the token is stored in the database?

cd <Mount Directory>
sudo apt install sqlite3
sqlite3 db.sqlite3
select * from session;
.exit

Don't paste the sqlite output, just see whether the token is still in the database. Or you can send me a email, "c3VuYm9lYXN5QGdtYWlsLmNvbQo=", base64.

  1. Can you reproduce this with docker restart?

21pages avatar Dec 15 '24 06:12 21pages

Hi @21pages,

I just restarted the VPS and now the entry is shown again correctly.

Screenshot 15 12 2024 um 10 50 12 AM

To your questions: Everything else (address book, custom clients, ...) were still there.

I installed it with the commands mentioned by you:

sudo docker image pull rustdesk/rustdesk-server-pro
sudo docker run --name hbbs -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server-pro hbbs
sudo docker run --name hbbr -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server-pro hbbr

But I did not follow the second instructions mentioned there:

macaddrhbbs=$(echo -n A0-62-2F; dd bs=1 count=3 if=/dev/random 2>/dev/null |hexdump -v -e '/1 "-%02X"')
sudo docker image pull rustdesk/rustdesk-server-pro
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v ./data:/root -td --mac-address="$macaddrhbbs" --restart unless-stopped rustdesk/rustdesk-server-pro hbbs
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v ./data:/root -td --restart unless-stopped rustdesk/rustdesk-server-pro hbbr

Should I do this afterwards now?


Contents of the sql query:

ubuntu@rdesk:~/data$ sqlite3 db.sqlite3
SQLite version 3.45.1 2024-01-30 16:01:20
Enter ".help" for usage hints.
sqlite> select * from session;
|{"ip":"::ffff:<REMOVED>","device_uuid":"<REMOVED>","os":"macos","type":"client","name":"<REMOVED>"}|2025-01-13 09:56:08|2024-12-14 09:56:08
|{"ip":"::ffff:127.0.0.1","device_uuid":"<REMOVED>","os":"macos","type":"client","name":"<REMOVED>"}|2025-01-13 21:29:14|2024-12-14 10:34:49
|{"ip":"::ffff:127.0.0.1","device_uuid":"<REMOVED>","os":"macos","type":"browser","name":"Chrome - 131.0.0.0"}|2025-01-14 09:48:59|2024-12-14 10:33:44
|{"ip":"::ffff:127.0.0.1","device_uuid":"<REMOVED>","os":"windows","type":"client","name":"pve-win-max-vio"}|2025-01-13 12:43:25|2024-12-14 12:43:25
|{"token":{"name":"Devices-Script","perms":{"devices":"rw"},"desc":"Script für automatische Löschung von alten Devices"}}|2034-12-12 19:49:11|2024-12-14 19:49:11
sqlite> .exit

I use nginx proxy for the web console for usage of Let's encrypt SSL.

Thank you and have a nice sunday!

SchmidtMax-staips avatar Dec 15 '24 09:12 SchmidtMax-staips

Should I do this afterwards now?

No.

Recommend to use script to install it on the host. There may be data synchronization problems for some users when using sqlite in docker, but we are not sure.

21pages avatar Dec 15 '24 10:12 21pages