Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Joselito1980 opened this issue Jan 30, 2024 · 23 comments
Closed

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

Joselito1980 opened this issue Jan 30, 2024 · 23 comments
Labels
bug Something isn't working

Comments

@Joselito1980
Copy link

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!!!!!!!

@Joselito1980 Joselito1980 added the bug Something isn't working label Jan 30, 2024
@GarnetSunset
Copy link

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

@paspo
Copy link
Contributor

paspo commented Jan 30, 2024

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.

@GarnetSunset
Copy link

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?

@Joselito1980
Copy link
Author

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

@paspo
Copy link
Contributor

paspo commented Jan 30, 2024

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.

@mariushosting
Copy link

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.

@Joselito1980
Copy link
Author

Joselito1980 commented Jan 30, 2024

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

@paspo
Copy link
Contributor

paspo commented Jan 30, 2024

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

@Joselito1980
Copy link
Author

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

@mariushosting
Copy link

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

@Joselito1980
Copy link
Author

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!!!

@mariushosting
Copy link

mariushosting commented Jan 30, 2024

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.

@paspo
Copy link
Contributor

paspo commented Jan 30, 2024

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.

@mariushosting
Copy link

mariushosting commented Jan 30, 2024

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).

@GarnetSunset
Copy link

GarnetSunset commented Jan 30, 2024

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.

@th0mcat
Copy link

th0mcat commented Jan 30, 2024

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.

@kiokoman
Copy link

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

@paspo
Copy link
Contributor

paspo commented Jan 30, 2024

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

@ECX-mpoellinger
Copy link

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.

@linuxkidd
Copy link

linuxkidd commented Jan 31, 2024

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! :)

@Joselito1980
Copy link
Author

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

@ECX-mpoellinger
Copy link

confirmed. Latest release is working. Thank you @paspo

@nemiah
Copy link

nemiah commented Feb 14, 2024

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

dr460nf1r3 added a commit to dr460nf1r3/dr460nixed that referenced this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants