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

"deadline has elapsed". Can't connect to remote server #732

Closed
giou opened this issue Jun 8, 2022 · 35 comments
Closed

"deadline has elapsed". Can't connect to remote server #732

giou opened this issue Jun 8, 2022 · 35 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@giou
Copy link

giou commented Jun 8, 2022

Describe the bug you encountered:

It does not connect to RustDesk instances that are on different network

How did you install RustDesk?

Github release 1.1.9. Tested multiple computers, Windows and Linux. The PC's I want to connect to are all Windows machines.

log/connect

[2022-06-08 14:12:55.164546 +02:00] INFO [src\common.rs:69] clipboard update found on client
[2022-06-08 14:12:55.164875 +02:00] INFO [src\client.rs:146] rendezvous server:server.com:21116
[2022-06-08 14:12:55.255551 +02:00] INFO [src\client.rs:160] #1 punch attempt with local-ip:65097, id: 48xxxxx
[2022-06-08 14:12:57.148292 +02:00] INFO [src\client.rs:201] Hole Punched 48xxxxx = ip:55411
[2022-06-08 14:12:57.148329 +02:00] INFO [src\client.rs:232] 1892 ms used to punch hole, relay_server: server.com, nat_type: ASYMMETRIC
[2022-06-08 14:12:57.148464 +02:00] INFO [src\client.rs:307] peer address: ip:55411, timeout: 18000
[2022-06-08 14:12:58.175640 +02:00] INFO [src\client.rs:341] 1.0271696s used to establish connection
[2022-06-08 14:13:16.221571 +02:00] INFO [src\client.rs:1181] Video decoder loop exits
[2022-06-08 14:13:16.221571 +02:00] INFO [src\client.rs:1200] Audio decoder loop exits
[2022-06-08 14:13:16.539706 +02:00] DEBUG [src\ui\remote.rs:1477] Exit clipboard service of client

I've tried with the default relay public servers and also with the selfhost server, same results. Only working for computers in the same network.

I've tried adding an allow rule in windows advanced firewall.

While connecting if flashes an error for about 0.5s that says: "deadline has elapsed".

deadline

@giou giou added the bug Something isn't working label Jun 8, 2022
@rustdesk
Copy link
Owner

rustdesk commented Jun 8, 2022

honestly, i have no clue for now before i can reproduce.

@rustdesk rustdesk added the help wanted Extra attention is needed label Jun 8, 2022
@acseven
Copy link

acseven commented Jun 21, 2022

End user here with seeing similar issue.

@rustdesk, is there something you recommend we can do to troubleshoot this?

thank you

@rustdesk
Copy link
Owner

rustdesk commented Jun 21, 2022

End user here with seeing similar issue.

I have no clue either before I can reproduce. Help wanted, looking for contributors.

@rustdesk rustdesk added the good first issue Good for newcomers label Jun 21, 2022
@acseven
Copy link

acseven commented Jun 21, 2022

One additional information: this is apparently an issue with the Windows client. I've successfully connected to a linux box on. a different network using a Mac.

@anshibanov
Copy link

anshibanov commented Jun 22, 2022

Have same issue when connecting from windows (10) to linux client (Linux mint)

@GivenChaos
Copy link

I had the same issue after a couple days of use with no issues, but what fixed it for me was a simple Uninstall and Reinstall. I'm also running Windows 10.

@skrzacikus
Copy link

I had the same issue on Windows 11. I uninstalled client, then installed again and everything works fine.

@acseven
Copy link

acseven commented Jun 28, 2022

One additional information: this is apparently an issue with the Windows client. I've successfully connected to a linux box on. a different network using a Mac.

Reinstalled as well but no go.

@skrzacikus
Copy link

skrzacikus commented Jun 28, 2022

Reinstalled as well but no go.

Reinstalling without uninstalling first, doesn't help.
I had to uninstall rustdesk and install it again to make it work again.

@acseven
Copy link

acseven commented Jul 13, 2022

I've deployed the server again, uninstalled rustdesk and issue remains unfortunately. Using the Web functionality also returns the same behavior. Trying to be clearer:

  • Network 1
    • Hosts server
    • Hosts offending Windows client, same LAN, client cannot reach the server.
  • Network 2
    • Some Windows/Linux servers and Windows machines, all work fine in the LAN, all reach the server on Network 1
    • Can't reach machines on Network 1

Issue persists even with OpenVPN connection between networks.

@haranobuhardo
Copy link

Just tried RustDesk today and encountered the same issue between three computer (all using free online server; 2xWin10 & 1xWin11). But when I tried to connect all from RustDesk on Android (and vice versa), it worked like a charm. Looks like there's an issue on Windows OS
Screenshot (2)

Screenshot (1)

@rustdesk
Copy link
Owner

Interesting

@cozdil
Copy link

cozdil commented Aug 9, 2022

I am experiencing same issue with two computers. One is Windows 7 and another is Windows 10.

If I try to reach any of these computers from Windows client, keep getting "deadline has elapsed" message with

[2022-08-09 21:53:55.693582 +03:00] INFO [src\client.rs:341] 26.0081ms used to establish connection
[2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1200] Audio decoder loop exits
[2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1181] Video decoder loop exits

logs, but I can successfully connect either of these machines from web client (web.rustdesk.com).

If there is any way I can help please let me know.

@rustdesk
Copy link
Owner

web

@21pages similar to 10054 problem

@21pages
Copy link
Collaborator

21pages commented Aug 10, 2022

I am experiencing same issue with two computers. One is Windows 7 and another is Windows 10.

If I try to reach any of these computers from Windows client, keep getting "deadline has elapsed" message with

[2022-08-09 21:53:55.693582 +03:00] INFO [src\client.rs:341] 26.0081ms used to establish connection [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1200] Audio decoder loop exits [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1181] Video decoder loop exits

logs, but I can successfully connect either of these machines from web client (web.rustdesk.com).

If there is any way I can help please let me know.

Can I connect to your computer for diagnose? password is not needed, just check the connection initialization process.

@cozdil
Copy link

cozdil commented Aug 10, 2022

I am experiencing same issue with two computers. One is Windows 7 and another is Windows 10.
If I try to reach any of these computers from Windows client, keep getting "deadline has elapsed" message with
[2022-08-09 21:53:55.693582 +03:00] INFO [src\client.rs:341] 26.0081ms used to establish connection [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1200] Audio decoder loop exits [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1181] Video decoder loop exits
logs, but I can successfully connect either of these machines from web client (web.rustdesk.com).
If there is any way I can help please let me know.

Can I connect to your computer for diagnose? password is not needed, just check the connection initialization process.

Sure, it's running our selfhosted server but i can share needed info with you, could you share an email address with me?

@21pages
Copy link
Collaborator

21pages commented Aug 10, 2022

I am experiencing same issue with two computers. One is Windows 7 and another is Windows 10.
If I try to reach any of these computers from Windows client, keep getting "deadline has elapsed" message with
[2022-08-09 21:53:55.693582 +03:00] INFO [src\client.rs:341] 26.0081ms used to establish connection [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1200] Audio decoder loop exits [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1181] Video decoder loop exits
logs, but I can successfully connect either of these machines from web client (web.rustdesk.com).
If there is any way I can help please let me know.

Can I connect to your computer for diagnose? password is not needed, just check the connection initialization process.

Sure, it's running our selfhosted server but i can share needed info with you, could you share an email address with me?

My email is pages21@163.com . Your help will be important to us.

@cozdil
Copy link

cozdil commented Aug 10, 2022

I am experiencing same issue with two computers. One is Windows 7 and another is Windows 10.
If I try to reach any of these computers from Windows client, keep getting "deadline has elapsed" message with
[2022-08-09 21:53:55.693582 +03:00] INFO [src\client.rs:341] 26.0081ms used to establish connection [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1200] Audio decoder loop exits [2022-08-09 21:54:13.740507 +03:00] INFO [src\client.rs:1181] Video decoder loop exits
logs, but I can successfully connect either of these machines from web client (web.rustdesk.com).
If there is any way I can help please let me know.

Can I connect to your computer for diagnose? password is not needed, just check the connection initialization process.

Sure, it's running our selfhosted server but i can share needed info with you, could you share an email address with me?

My email is pages21@163.com . Your help will be important to us.

Sent connection info to your mail address.

@barajasfernando
Copy link

Hi! Newbie to Rustdesk. I'm having the same problems connecting 2 computers using Windows 10. When I try to connect to the remote computer from Rustdesk WEB, it works perfectly, but when I try to connect from my windows computer, I get the mentioned error (deadline has elapsed).

Where can I check the logs? What can I try to fix it? I'll try to reinstall.

@rustdesk
Copy link
Owner

insight

Go to discord please, there may be some one can help you.

@daykx
Copy link

daykx commented Nov 2, 2022

Had a struggle too, with self host and clients in same LAN - there is some confusion with LAN and WAN addresses.
First, "failed to connect via relay server", after changing server IP to domain name it "failed to connect via rendezvous server" when connecting to LAN clients, or "deadline has elapsed" when connecting from LAN clients.
Eventually problem solved after setting NAT Loopback (aka Hairpin) rules in LAN router!

@rustdesk
Copy link
Owner

rustdesk commented Nov 2, 2022

Had a struggle too, with self host and clients in same LAN - there is some confusion with LAN and WAN addresses. First, "failed to connect via relay server", after changing server IP to domain name it "failed to connect via rendezvous server" when connecting to LAN clients, or "deadline has elapsed" when connecting from LAN clients. Eventually problem solved after setting NAT Loopback (aka Hairpin) rules in LAN router!

good try

@severach
Copy link

Didn't work for me either. LAN to same LAN connections worked most of the time but Internet connections rarely connected. Got rendezvous, offline, and deadline errors. All working and fast when I finally got my own server running over gig fiber.

The recent Anydesk debacle has RustDesk servers overloaded. Run your own server or don't bother. The current instructions are too sparse for all but the Internet mavens to get working. Own server will get easier when more people get it working and write better guides.

@acseven
Copy link

acseven commented Nov 16, 2022

The issue occurs with self hosted servers.

@giou
Copy link
Author

giou commented Nov 16, 2022

The issue occurs with self hosted servers.

Like I said in the post, at least in 1.1.9. The issue occurs also in public servers.

@rustdesk
Copy link
Owner

From discord:

Setup a NAT rule in your firewall that allows your internal clients to “speak directly” to your external IP address. Assuming you haven’t done this already as this was my hold up.

The following article should help if you’re behind a Cisco firewall. (Note; the instructions are essentially the same for FMC and FTD)

https://integratingit.wordpress.com/2021/07/11/ftd-nat-reflection/

@Aerasyn
Copy link

Aerasyn commented Nov 18, 2022

I get the deadline has elapsed message on one out of 6 computers while self hosting. It doesnt happen on that connection if its inside the LAN but when I attempt the same connection ouitside the LAN it doesn't connect and gives that message.

@severach
Copy link

severach commented Nov 21, 2022

After adding more peers and more testing I ended up with a few pairs on different LAN that wouldn't connect. Error is "deadline has elapsed." Seems to be routers specific as all pairs behind the same two LAN cannot connect yet I have other pairs on one same and one different LAN that do connect. No home peer connects to any peer at office 2. Any home peer connects to every peer at office 1 and 3. Office 2 connects to office 1 but not office 3 or home. Office 1 hosts the server and connects to all. Office 3 connects to office 1 or home but not office 2.

So far as I can tell connections always work between peers in same LAN.

Home: Cable Fortigate 60D
Office 1: Fiber Fortigate 60E Static IP hbbr hbbs server 1.1.6 host not on default ports
Office 2: Cable Fortigate 60E
Office 3: Cable Technicolor DPC3941

Upgrading both peers to 1.2.0 nightly fixed the problem, or at least fixed the problem enough that they can connect. On first connect I get error "Connection reset by peer (os error 104)". Something is written to the Linux saved session ~/.config/rustdesk/peers/*.toml to prevent this error and speed up future connects.

Own server or public server made no difference. Windows 1.1.9 or Linux 1.1.9 have the same connection problem. Moving own server to subnet not accessible by office 1 peers made no difference.

No log entries appear in hbbr server for failed connections.

May be related to #1597

Edit: I moved the laptop from Home to Office 1 where everything connects. It now connects to Office 2 with version 1.1.9.

@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

@KevinL2015
Copy link

KevinL2015 commented Nov 25, 2022

很抱歉这里用中文,英文能看不会写。

我也出现了这个问题,尝试了以下情况,看是否有有用的信息。
1.[A地点]始终无法连接到[B地点]的电脑,提示deadline has elapsed(控制端 win10,被控端win7 win2012)。
[A地点]测试了两台电脑,[B地点]也测试了两台电脑。
2.尝试了将服务器配置为自建云服务器、[A地点]所在网络内的服务器、rustdesk公共服务器都是一样的结果。
3.尝试了1.1.9版本和1.2.0每日构建版本,也一样。

4.尝试了[C地点]的电脑连接[B地点]的电脑,连接成功,连接方式为[加密中转]

另:[A地点]的电脑一直以来连接其他地方的电脑都是没问题。

日志截图
Snipaste_2022-11-25_16-29-10

报错截图
image

2022年11月27日
使用了1.2.0每日构建版本,在[最近访问过]对应的菜单中选中“强制走中继连接”,能够连接,而且连接很快。
image

但是问题是如果没有连接成功过的电脑是无法出现在[最近访问过]的。
我是在AppData\Roaming\RustDesk\config\peers下复制了其他电脑的文件,然后后将文件名改为[deadline has elapsed]电脑的Id,然后在[最近访问过]就能有了

@FatTiger500kg
Copy link

FatTiger500kg commented Dec 15, 2022

很抱歉这里用中文,英文能看不会写。

我也出现了这个问题,尝试了以下情况,看是否有有用的信息。 1.[A地点]始终无法连接到[B地点]的电脑,提示deadline has elapsed(控制端 win10,被控端win7 win2012)。 [A地点]测试了两台电脑,[B地点]也测试了两台电脑。 2.尝试了将服务器配置为自建云服务器、[A地点]所在网络内的服务器、rustdesk公共服务器都是一样的结果。 3.尝试了1.1.9版本和1.2.0每日构建版本,也一样。

4.尝试了[C地点]的电脑连接[B地点]的电脑,连接成功,连接方式为[加密中转]

另:[A地点]的电脑一直以来连接其他地方的电脑都是没问题。

日志截图 Snipaste_2022-11-25_16-29-10

报错截图 image

2022年11月27日 使用了1.2.0每日构建版本,在[最近访问过]对应的菜单中选中“强制走中继连接”,能够连接,而且连接很快。 image

但是问题是如果没有连接成功过的电脑是无法出现在[最近访问过]的。 我是在AppData\Roaming\RustDesk\config\peers下复制了其他电脑的文件,然后后将文件名改为[deadline has elapsed]电脑的Id,然后在[最近访问过]就能有了

Solved the problem in the same way. It looks like it is caused by the client not being able to automatically connect through the transit tunnel.

@nonickz88
Copy link

Hi,

I have the same issue here (self hosted server), multiple sites connected with VPN...SITE A to Site B we got the deadline has elapsed error... Tested on multiple PCs in SiteA without success
But if we disable windows firewall on SITE A PCs we can connect to remote client on SITE B.
tested with version 1.1.9
on Wireshark tests we've noticed that for some reason after TCP Handshake the rst packet is dropped for some reason I think it could be related to a diferent sequence number or something...
if we upgrade to version 1.2.0 it connects very fast and works fine

@giou giou closed this as completed Feb 16, 2023
@rustdesk
Copy link
Owner

rustdesk commented Mar 7, 2023

#1597 (comment)

@LeonCame
Copy link

Settings that work with opnsense:

  • in the “ports forward” rules: select “NAT reflection” = enable
  • in "Firewall" - "Settings" - "Advanced": check "Automatic outbound NAT for Reflection"
  • in the network settings of the Rustdesk client (which is on the same LAN as the Rustdesk Server): put IP:port as if it were an external client. (And not the internal IP of the LAN).

@VitaliyAT
Copy link

VitaliyAT commented May 22, 2024

What ports should be forwarded for normal work? And why it work on Common Servers but not work if it local (under NAT)? Common Servers under the same NAT. And in local net where this server placed - it work OK, but outside of NAT it's not... but it see units. Problem just when I try connect to outside.

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

No branches or pull requests