rustdesk icon indicating copy to clipboard operation
rustdesk copied to clipboard

Connection not ready on Windows (ipc connection closed: reset by the peer)

Open xionous opened this issue 1 year ago • 26 comments

Bug Description

Hello,

I am wondering if anyone can help me with an issue i am having on a single computer. it is an odd one.

I am able to connect to other computer with no issues but this computer with the issue will not register with the relay server either public or my own self hosted one. Every other computer works fine.

In the log files i am getting this error over and over:

[2023-06-16 13:03:20.853641 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:21.855995 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:22.857924 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:23.859216 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:24.862507 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:25.865029 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:26.867714 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:27.884477 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:28.896725 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:29.899453 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:30.910981 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:31.915839 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer
[2023-06-16 13:03:32.930811 -05:00] ERROR [src\ui_interface.rs:868] ipc connection closed: reset by the peer

I am using the nightly version 1.2.0 Build Date: 2023-06-16 13:43 on windows 11 pro 22H2

How to Reproduce

Open client and it does not connect to relay

Expected Behavior

connect to relay

Operating system(s) on local side and remote side

windows 10 pro 22H2

RustDesk Version(s) on local side and remote side

1.2.0 Build Date: 2023-06-16 13:43

Screenshots

image

Additional Context

No response

xionous avatar Jun 16 '23 19:06 xionous

Looks like the background server process crashes repeatedly.

Please check anything abnormal here. C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\log\server\

rustdesk avatar Jun 17 '23 03:06 rustdesk

[2023-06-16 12:03:19.556850 -05:00] INFO [src\core_main.rs:187] start --server with user SYSTEM
[2023-06-16 12:03:19.606588 -05:00] INFO [src\ipc.rs:275] Started ipc server at path: \\.\pipe\RustDesk\query
[2023-06-16 12:03:19.614767 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk2.toml
[2023-06-16 12:03:19.624478 -05:00] INFO [src\rendezvous_mediator.rs:110] start rendezvous mediator of rust.domain.com
[2023-06-16 12:03:19.624566 -05:00] INFO [src\common.rs:557] Testing nat ...
[2023-06-16 12:03:19.628664 -05:00] INFO [src\lan.rs:30] lan discovery listener started
[2023-06-16 12:03:19.642881 -05:00] DEBUG [src\common.rs:594] Got nat response from rust.domain.com:21116: port=59300
[2023-06-16 12:03:19.645954 -05:00] DEBUG [src\common.rs:594] Got nat response from rust.domain.com:21115: port=59300
[2023-06-16 12:03:19.646027 -05:00] INFO [src\common.rs:620] Tested nat type: ASYMMETRIC in 19.7991ms
[2023-06-16 12:03:19.650916 -05:00] DEBUG [libs\hbb_common\src\udp.rs:35] Receive buf size of udp 0.0.0.0:0: Ok(65536)
[2023-06-16 12:03:19.666931 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk.toml
[2023-06-16 12:03:19.669696 -05:00] DEBUG [src\rendezvous_mediator.rs:166] Latency of rust.domain.com:21116: 2.961ms
[2023-06-16 12:03:22.622428 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk_local.toml
[2023-06-16 12:03:24.951197 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk_hwcodec.toml
[2023-06-16 12:03:24.953690 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk_hwcodec.toml
[2023-06-16 12:03:24.954150 -05:00] DEBUG [libs\hbb_common\src\config.rs:1417] HW_CODEC_CONFIG refreshed successfully
[2023-06-16 12:03:24.954261 -05:00] DEBUG [libs\scrap\src\common\hwcodec.rs:359] Os { code: 5, kind: PermissionDenied, message: "Access is denied." }, scrap::common::hwcodec:libs\scrap\src\common\hwcodec.rs:359:21
[2023-06-16 12:03:24.999109 -05:00] INFO [libs\scrap\src\common\hwcodec.rs:362] Check hwcodec config, exit with: exit code: 0
[2023-06-16 12:03:24.999264 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk_hwcodec.toml
[2023-06-16 12:03:24.999720 -05:00] DEBUG [libs\hbb_common\src\config.rs:1417] HW_CODEC_CONFIG refreshed successfully
[2023-06-16 12:03:49.622967 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:04:22.627137 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:04:52.629557 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:05:25.619188 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:05:58.620695 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:06:28.641947 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:07:01.615131 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:07:31.620763 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:08:04.622719 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:08:37.611765 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:09:07.617327 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:09:37.620373 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:10:07.623564 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:10:40.607398 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:11:02.653878 -05:00] INFO [src\rendezvous_mediator.rs:179] request_pk received from rust.domain.com:21116
[2023-06-16 12:11:02.654041 -05:00] DEBUG [libs\hbb_common\src\config.rs:479] Configuration path: C:\WINDOWS\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk.toml
[2023-06-16 12:11:10.619363 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:11:43.606442 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:12:13.607275 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:12:43.617580 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:13:13.618042 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:13:46.619346 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:14:19.608898 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:14:52.607769 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:15:25.611659 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:15:55.612469 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:16:25.618182 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/
[2023-06-16 12:16:58.607007 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/

[2023-06-16 12:16:58.607007 -05:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://rust.domain.com:21114/ this happens endlessly after that first bit

xionous avatar Jun 17 '23 03:06 xionous

No log around [2023-06-16 13:03:20.853641 -05:00]?

rustdesk avatar Jun 17 '23 03:06 rustdesk

Here is the full log: (it is very long) https://pastebin.com/ER9fxucq

xionous avatar Jun 17 '23 03:06 xionous

Can not see anything special, :(

rustdesk avatar Jun 17 '23 03:06 rustdesk

you can try to restart the service from task manager.

rustdesk avatar Jun 17 '23 04:06 rustdesk

I have done that a few times in the past, but i will try again.

xionous avatar Jun 17 '23 04:06 xionous

I restarted it, still doesn't connect.

Interestingly sometimes when i restart it this happens: image

Then i have to manually kill the process from task manager and start the service again

xionous avatar Jun 17 '23 04:06 xionous

That's Windows, nothing is impossible.

rustdesk avatar Jun 17 '23 04:06 rustdesk

Can try out https://superuser.com/questions/462443/what-are-reasons-for-local-windows-named-pipes-to-fail?

rustdesk avatar Jun 17 '23 14:06 rustdesk

I have double checked that file and printer sharing is enabled and my firewall has no logs for blocking anything. Windows firewall is disabled and i use Checkpoint firewall.

xionous avatar Jun 20 '23 00:06 xionous

I asssume a OS issue. Try follow:

  • uninstall Rustdesk
  • Start command line:
    • sfc /scannow
    • dism /online /cleanup-image /restorehealth
  • reboot
  • install Rustdesk again

It's worth a try.

psflachglas avatar Jun 21 '23 12:06 psflachglas

I asssume a OS issue. Try follow:

* uninstall Rustdesk

* Start command line:
  
  * sfc /scannow
  * dism /online /cleanup-image /restorehealth

* reboot

* install Rustdesk again

It's worth a try.

Tried this, and it did find some issues and fix them, but alas Rustdesk still wont connect. Please let me know if there is anything else i can try.

xionous avatar Jun 21 '23 15:06 xionous

Try to delete the : AppData\RustDesk\ folder.

vmiwouter avatar Jun 26 '23 09:06 vmiwouter

Try to delete the : AppData\RustDesk\ folder.

I have done this every time i reinstalled it.

xionous avatar Jun 26 '23 15:06 xionous

I had the same issue this morning with a PC that was in a domain. I did end up making another A record on the domain controller dns management.

Maybe try to modify the hostfile and point the rust.domain.com directly to the ip of your relay server.

vmiwouter avatar Jun 26 '23 18:06 vmiwouter

this seems strange after my computer out of power incidently, and I cannot connect to the server anymore. even if I take the right keyword, but the server cannot return the correct screen picture, It seems there are some error on rustdesk server. And after I follow the statement under this issue, I found that my rustdesk ID dosen't change even if I have clean up the file I could found on C, It seems that there is some file not cleaned and the server cache seems strange.

ikunpy avatar Jun 29 '23 08:06 ikunpy

ipc connection closed: reset by the peer

  • Disable the current network adapter, try with a USB Network adapter, let windows autoconfigure it.
  • Use Wireshark to isolate the issue.

psflachglas avatar Jun 29 '23 08:06 psflachglas

Hello, thanks everyone. this error I happened may because of the official server. But after all, they are free, so I have no reason to blame them. and I noticed that I cannot connect to the server but I could connect each other in a local area network. it is a kind of Non-encrypted direct connection, just as the rustdesk fostware shown. so I use the cpolar to perform intranet penetration and successfully connect each other, also I encountered another problem. I connected but I cannot use the click and keyboard, even if the rustdesk have the permission as it shown. maybe I opened the Windows option 'Allocate remote connection', and I closed it. and in the latest try, it works. If another problem happens in future, I will feedback here. it is mysterious. I am not a expertise of network, and I never used the Wireshark, but thanks the suggestion. Also, close the network adapter is a good idea, but Windows now provide a more easy option that is Network Reset. In my view, it is Chinese, so it may be a little different as I write here. and now I believe this problem is caused by the server memory management policies, maybe RustDesk needs a more complex and wisely policies on server. And in my opinion, after several days I donnot connect to the server, it may refresh the memory and all things will perform well. So in my opinion, the best way to solve this problem is to take the Rustdesk off several days. RustDesk is the best Remote Desktop Software I have used, and this software helped me a lot ,so I hope they could be better. They provide the best functions free and have the fatest speed, in my used Remote Desktop Software.

ikunpy avatar Jun 29 '23 11:06 ikunpy

in fact it doesn't work until now, it seems like a bug that caused by rustdesk, when using direct connection

ikunpy avatar Jun 29 '23 12:06 ikunpy

it connect well but I cannot use the click, or maybe I changed some settings caused this

ikunpy avatar Jun 29 '23 12:06 ikunpy

the cannot click problem was finished by update the rustdesk on receiver from 1.1.8 to 1.1.9, problem before doesn't related to this. and I find an interesting thing, when I unplug the unattended computer's monitor cable, The connection was quickly disconnected,This may be a coincidence。 at this time, I found I could connect to the official server, but it help less, because after temporaily connect to the srever, I am always waiting to connect. what the fuck, I disconnect and cannot connect again incidently and I locked my windows , after a few times, I revisit and it works. But only several seconds, it disconnected again. Is Rustdesk fixing their server now?

ikunpy avatar Jun 29 '23 14:06 ikunpy

the connect is very unstable, and this may because the rustdesk server, and I dont know why

ikunpy avatar Jun 29 '23 14:06 ikunpy

I think i have finished this problem and I believe so, also I hope it will work tomorrow and in the future

ikunpy avatar Jun 29 '23 14:06 ikunpy

yse,it works now

ikunpy avatar Jun 30 '23 01:06 ikunpy

i have this problem now. i can't connect to my computer in other country. i tried to update my rustdesk to 1.2 still it doesn't connect. noob here image my rustdesk is open on the client side

rhonpaul avatar Jul 04 '23 01:07 rhonpaul

Please forgive me for not speaking English as my native language. Here is the translation I have a Windows computer (PC1) and it prompts that the connection is ready, but when connecting to another computer (PC2), it prompts reset by the peer.

Strangely, I can connect PC2 to PC3 successfully, and PC3 cannot connect to PC1. It indicates that there is a certain problem with PC1, but I am currently unable to troubleshoot it.

Help!

PC1

PC1

zhy960324 avatar Sep 06 '23 04:09 zhy960324

@zhy960324 what about force relay ? 1693973569959

21pages avatar Sep 06 '23 04:09 21pages

@zhy960324 what about force relay ? 1693973569959 It doesn't work, but when I don't fill in the ID server and intermediate server, I can connect successfully

zhy960324 avatar Sep 06 '23 04:09 zhy960324

Very corner case, may be related to specific Windows security poclicy. Almost no way for us.

rustdesk avatar Dec 03 '23 03:12 rustdesk