rustdesk / rustdesk-server

RustDesk Server Program

Home Page:https://rustdesk.com/server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problems with the last update V1.1.10-2 "HBBS Container"

Joselito1980 opened this issue · comments

Describe the bug

in the latest update of today, "V.1.1.10-2". "HBBS" container does not start and the following error appears in the log

image

Describe the environment
its installed in docker in a Synology DS 720+ with DSM 7.2.1-69057 Update 4.

i am using this docker compose:

version: '3.9'

services:
hbbs:
container_name: Rustdesk_HBBS
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21118:21118
image: rustdesk/rustdesk-server:latest
command: hbbs -r *.:21117
volumes:
- /volume1/docker/rustdesk/rustdeskhbbs:/root:rw
network_mode: "bridge"
depends_on:
- hbbr
restart: always

hbbr:
container_name: Rustdesk_HBBR
ports:
- 21117:21117
- 21119:21119
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- /volume1/docker/rustdesk/rustdeskhbbr:/root:rw
network_mode: "bridge"
restart: always

How to Reproduce the bug
when i start the proyect appears this error:
image
image
image

thanks!!!!!!!

Agreed. New update is broken. Same issue on every version.

Today's build added a check for correct size of the secret key, which is causing the error in this case.

The secret key file should NOT have a trailing newline; if there's a newline, with previous release the key is ignored and hbbs is accepting unencrypted connections also.

Now you know that you have to remove such newline at the end of the file. (I think you can use the text editor you have in synology dsm); then restart the container.

With love, this should have been in the Changelog, if it's intended behavior!!
Also shouldn't it be possible to snip the possible newline?

La compilación de hoy agregó una verificación del tamaño correcto de la clave secreta, lo que está causando el error en este caso.

El archivo de clave secreta NO debe tener una nueva línea al final; si hay una nueva línea, con la versión anterior la clave se ignora y hbbs también acepta conexiones no cifradas.

Ahora sabes que debes eliminar esa nueva línea al final del archivo. (Creo que puedes usar el editor de texto que tienes en Synology dsm); luego reinicie el contenedor.

hello!!! in this file? i'm only one line with the token id, or it's other file?
image

you have to look at id_ed25519 (without .pub).

Please do it using a more advanced editor, capable of distinguish the different kind of newlines (LF or CR+LF). Something like Notepad++ in windows.

you have to look at id_ed25519 (without .pub).

Please do it using a more advanced editor, capable of distinguish the different kind of newlines (LF or CR+LF). Something like Notepad++ in windows.

The docker image seems to be bugged since I can replicate the issue on a fresh installation.

you have to look at id_ed25519 (without .pub).

Please do it using a more advanced editor, capable of distinguish the different kind of newlines (LF or CR+LF). Something like Notepad++ in windows.

hello, in the file i only have a 1 line with the token, any idea?
image

wrong file.

id_ed25519.pub contains the PUBLIC KEY.
id_ed25519 contains the SECRET KEY. You have to look at this file.

(because the public key can be derived from the secret key)

expected file size should be:
44 bytes for id_ed25519.pub
88 bytes for id_ed25519

wrong file.

id_ed25519.pub contains the PUBLIC KEY. id_ed25519 contains the SECRET KEY. You have to look at this file.

(because the public key can be derived from the secret key)

expected file size should be: 44 bytes for id_ed25519.pub 88 bytes for id_ed25519

ok thanks.. but in this file its same.. only have a 1 line...
image

The issue is the latest Rustdesk docker image it's bugged from the beginning. No key file is saved in any folder on a fresh installation because of the malformed key error message. using version :1.1.9 will solve your issue @Joselito1980

Change:

image: rustdesk/rustdesk-server

with

image: rustdesk/rustdesk-server:1.1.9

in both images then redeploy the stack Until the dev solve the issue

The issue is the latest Rustdesk docker image it's bugged from the beginning. No key file is saved in any folder on a fresh installation because of the malformed key error message. using version :1.1.9 will solve your issue @Joselito1980

Change:

image: rustdesk/rustdesk-server

with

image: rustdesk/rustdesk-server:1.1.9

in both images then redeploy the stack Until the dev solve the issue

thanks a lot!!! now it's working with the last version, i'm whait to new version! best regards!!!

The issue is the latest Rustdesk docker image it's bugged from the beginning. No key file is saved in any folder on a fresh installation because of the malformed key error message. using version :1.1.9 will solve your issue @Joselito1980
Change:
image: rustdesk/rustdesk-server
with
image: rustdesk/rustdesk-server:1.1.9
in both images then redeploy the stack Until the dev solve the issue

thanks a lot!!! now it's working with the last version, i'm whait to new version! best regards!!!

with version 1.1.9 it works but not with version 1.1.10 so the latest version is the 1.1.10 version but currently bugged.

With love, this should have been in the Changelog, if it's intended behavior!!

This was meant to be a quick and dirty fix for a problem affecting a small number of users.
If the key file is not correct (exactly 88 bytes), hbbs can be used without encryption.
The only modification is an error indicating the incorrect key with subsequent program stop.

Also shouldn't it be possible to snip the possible newline?

This can lead to difficult debug: imagine having an extra space at the beginning of the file, the program will have to complain because of a wrong key that looks perfectly normal to anyone looking at the contents.

With love, this should have been in the Changelog, if it's intended behavior!!

This was meant to be a quick and dirty fix for a problem affecting a small number of users. If the key file is not correct (exactly 88 bytes), hbbs can be used without encryption. The only modification is an error indicating the incorrect key with subsequent program stop.

Also shouldn't it be possible to snip the possible newline?

This can lead to difficult debug: imagine having an extra space at the beginning of the file, the program will have to complain because of a wrong key that looks perfectly normal to anyone looking at the contents.

@paspo You can't even write to the folder from the beginning with a fresh RustDesk server installation. No issue with version 1.1.9 the issue appear almost instantly on version 1.1.10 - The affected user are both (old installation and new installation).

Agreed. The key that rustdesk generates on 1.1.10 even after you blow it away, doesnt appear to pass this check. So clearly the key generation code needs to match this check

Edit: Rolling back works, using the local windows version run locally also doesnt work on latest.

Can also confirm that rolling back to 1.1.9 fixes the issue.

· The latest container will not generate new Ed25519 keys when the container is restarted or recreated.
· Generating new keys with 1.1.9 and then moving to latest does not fix the issue either.

same problem here (ubuntu server with precompiled packages .deb), I don't have any space/return on my file but the resulting size is 89B
this was auto-generated by rustdesk in a previous version.
the .pub is 44B

vi id_ed25519 ->

IO+n+dV2L????????????????????????????????????????????????????????????????????????KP46g==
~
~
~
......
"id_ed25519" 1L, 89B

so i made a new clean installation and there is the same problem, the service hbbs does not start (EXIT / FAILED) with malformed private key but there is no key generated inside /var/lib/rustdesk-server

should be fixed by #361
lets just wait for @rustdesk to test it and merge if ok

So even a
echo -n $(tr -d "\n" < id_ed25519) > id_ed25519
and afterwards the file size is exact 88 Byte hbbs still fails with "Malformed private key"
Seems the check is broken.

I can confirm that the 1.1.10-3 release ( pr #361 ) fixed this issue for me.

Thanks to @paspo and the @rustdesk team for resolving this quickly! :)

it's working in the last update! thanks!!!!

confirmed. Latest release is working. Thank you @paspo

HI,

the docker images does not seem to have been updated: https://hub.docker.com/r/rustdesk/rustdesk-server/tags

Could you please push the update? @rustdesk