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

Connection reset by peer #499

Closed
Dmitry9292 opened this issue May 10, 2022 · 27 comments
Closed

Connection reset by peer #499

Dmitry9292 opened this issue May 10, 2022 · 27 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Dmitry9292
Copy link

Dmitry9292 commented May 10, 2022

Hi there!
I am testing your program and its working good with mac systems, but windows is not working. It says "Connection reset by peer".
I am using self-hosted server by docker. All ports are open on server-side.
Tried client version: 1.1.8 and 1.1.9
Would be much appreciated if there is any tips or suggestions how I can fix it.
Thanks in advance!

@Dmitry9292 Dmitry9292 added the bug Something isn't working label May 10, 2022
@rustdesk
Copy link
Owner

Hope you can run from source code, and figure out the problem? We had such report before, but still can not reproduce. Really need your help.

@rustdesk
Copy link
Owner

Following below to build and run from source code
https://rustdesk.com/docs/en/dev/build/windows/

@rustdesk rustdesk added the help wanted Extra attention is needed label May 10, 2022
@yyusea
Copy link

yyusea commented May 11, 2022

@rtest12
Copy link

rtest12 commented May 24, 2022

https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst: failed: status code 404

for git clone https://github.com/microsoft/vcpkg cd vcpkg git checkout 2021.12.01

Same error, how to get around it?

@imZack
Copy link

imZack commented May 25, 2022

Same error here too. Not able to run from source code on those machines.
Is there a way that we can export logs and upload to here?

@rustdesk
Copy link
Owner

logs

log explains nothing for this.

@Vogelbusch
Copy link
Sponsor

Vogelbusch commented Jun 15, 2022

We have the same error.
We run a RustDesk server with public IP address in our DMZ. Within our network, connections between clients work fine.
Connections between clients outside our network (Internet) cannot connect to other clients. The error message is in German "zurücksetzen durch gegenstelle".
See picture.
Other clients are not visible.
grafik
he firewall is open and allows all connections

@Vogelbusch
Copy link
Sponsor

SOLVED!
Our hbbs service has missed the parameter -r
hbbs -r relay.server.example -k _

@shayaknyc
Copy link

Hi folks. Found this thread while looking for a solution to the same problem. Currently running hbbs/hbbr in docker containers using docker-compose.

The docker-compose.yml file does contain hbbs -r url.com:21117 -k _ in the Execute section. Have no problems connecting between clients on local LAN, or through VPN. However, when not on the same LAN or VPN, the client constantly cycles between trying to connect and "reset by the peer" until it times-out and I have to click on "OK" or "Retry". I can confirm that the ID/Relay Server section has the correct ID server, relay server, and Key set up - as the destination client is showing "Ready".

Firewall ports are all open (TCP/UDP) on all machines that have RustDesk. Any ideas?

@monosoul
Copy link

Having the same issue. I run rustdesk in a container, connection only works when in the same network

@monosoul
Copy link

OK, figured it out.

@shayaknyc make sure hbbr and hbbs volumes have the same id_ed25519 and id_ed25519.pub.

@rustdesk probably it makes sense to change this line: https://github.com/rustdesk/rustdesk-server/blob/063b4543682815bbd6fa329f3c977c00c6b1475f/docker-compose.yml#L33 to use the same volume for both hbbr and hbbs

@shayaknyc
Copy link

shayaknyc commented Jun 20, 2022

Ah! Let me try it and see if that fixes the issue.

Edit: Yup! That did it. I backed up the id_ed25519 and id_ed25519.pub files in ./hbbr and copied over the same files from ./hbbs. Restarted docker containers, and it seemed to work externally. Excellent! Thanks for troubleshooting. Definitely this should be amended in the docker-compose file in some way.

@Dmitry9292
Copy link
Author

OK, figured it out.

@shayaknyc make sure hbbr and hbbs volumes have the same id_ed25519 and id_ed25519.pub.

@rustdesk probably it makes sense to change this line: https://github.com/rustdesk/rustdesk-server/blob/063b4543682815bbd6fa329f3c977c00c6b1475f/docker-compose.yml#L33 to use the same volume for both hbbr and hbbs

Thank you! With this workaround connection is working as expected. Might need to be mentioned on FAQ or other section.

@ll3N1GmAll
Copy link

I have this same issue; but am not using the docker container. Client connects, then hangs on "waiting for image" for a second, and then i get the "reset by peer" error. This just keeps looping indefinitely until i stop it. All other clients are working fine except this one. This is a linux client; but other linux clients work fine. This client is running PopOS. So, it's possible the GUI is having an issue with RustDesk.

@vyncusp
Copy link

vyncusp commented Aug 5, 2022

I have this same issue; but am not using the docker container. Client connects, then hangs on "waiting for image" for a second, and then i get the "reset by peer" error. This just keeps looping indefinitely until i stop it. All other clients are working fine except this one. This is a linux client; but other linux clients work fine. This client is running PopOS. So, it's possible the GUI is having an issue with RustDesk.

Same issue, im using centos os and install itu without using docker.
Rustdesk working fine if the client is LAN.

@shayaknyc
Copy link

Have you tried using the same key for both services? See here: #499 (comment)

While this pertains to using the docker container, the process is the same, make sure that hbbr and hbbs are using the same keypair.

@LESHIY-ODESSA
Copy link

  1. Please explain where exactly to insert files id_ed25519 and id_ed25519.pub?

  2. How do I activate the -k parameter?

  3. How can I check if the encryption works?

P.S. MikroTik container (ARM) + rustdesk/rustdesk-server-s6:latest.

alt text

@ZEV1416
Copy link

ZEV1416 commented Oct 7, 2022

Faced the same problem. Resolved by restarting the daemons. It seems that the config is created by one of the processes, and the second does not pick it up. If you stop both processes and start again when the configs have already been created, everything works correctly.

@behrooz3500
Copy link
Contributor

OK, figured it out.

@shayaknyc make sure hbbr and hbbs volumes have the same id_ed25519 and id_ed25519.pub.

@rustdesk probably it makes sense to change this line: https://github.com/rustdesk/rustdesk-server/blob/063b4543682815bbd6fa329f3c977c00c6b1475f/docker-compose.yml#L33 to use the same volume for both hbbr and hbbs

My problem was solved using the same approach. Thank you very much!

@rustdesk
Copy link
Owner

OK, figured it out.

@shayaknyc make sure hbbr and hbbs volumes have the same id_ed25519 and id_ed25519.pub.

@rustdesk probably it makes sense to change this line: https://github.com/rustdesk/rustdesk-server/blob/063b4543682815bbd6fa329f3c977c00c6b1475f/docker-compose.yml#L33 to use the same volume for both hbbr and hbbs

@paspo

@rustdesk
Copy link
Owner

rustdesk commented Nov 22, 2022

Can you try out nightly build? There is a fix, though not good enough, not sure if it works in your scenario. https://github.com/rustdesk/rustdesk/releases/tag/nightly

@Snuupy
Copy link

Snuupy commented Nov 25, 2022

I have encryption working if hbbs and hbbr use the same mount point to reference the same id_ed25519 and id_ed25519.pub pairs. However encryption stops working if I add -k parameter to hbbs and hbbr in docker-compose.

Edit:

ok I fixed it, it was because I was confused about the documentation.
the -k _ parameter literally means add an understore (-) after the -k, the underscore does not signify to add the key into that line
I added -k _ and that fixed it, now the connection is secure again
this was my mistake, solution above works.

@Sora233
Copy link

Sora233 commented May 10, 2023

OK, figured it out.

@shayaknyc make sure hbbr and hbbs volumes have the same id_ed25519 and id_ed25519.pub.

@rustdesk probably it makes sense to change this line: https://github.com/rustdesk/rustdesk-server/blob/063b4543682815bbd6fa329f3c977c00c6b1475f/docker-compose.yml#L33 to use the same volume for both hbbr and hbbs

great!

@rustdesk
Copy link
Owner

@Sora233 Submit a PR please.

rustdesk referenced this issue in rustdesk/rustdesk-server May 10, 2023
@cocodee
Copy link

cocodee commented May 24, 2023

I have encryption working if hbbs and hbbr use the same mount point to reference the same id_ed25519 and id_ed25519.pub pairs. However encryption stops working if I add -k parameter to hbbs and hbbr in docker-compose.

Edit:

ok I fixed it, it was because I was confused about the documentation. the -k _ parameter literally means add an understore (-) after the -k, the underscore does not signify to add the key into that line I added -k _ and that fixed it, now the connection is secure again this was my mistake, solution above works.

This solved my problme,thank you.

@darkworks
Copy link

@rustdesk can you guide how to apply this fix to non doctor systems. i had installed rust server relay basic version on debian 11 then upgraded to rust server pro version now getting this key mismatch error , although had change public key on client sides too but same issue. so how to apply the @Sora233 patch to non docker system i went to /var/lib/rustdesk-server there found id_ed25519 and id_ed25519.pub files so from where i can get id_ed25519 and id_ed25519.pub files to replace mine one as i do not have hbbs directory

thanks

@rustdesk
Copy link
Owner

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests