rustdesk / rustdesk-server

RustDesk Server Program
https://rustdesk.com/server
GNU Affero General Public License v3.0
6.75k stars 1.46k forks source link

Unable to connect to rustdesk-server #261

Closed yuyuko233 closed 1 year ago

yuyuko233 commented 1 year ago

Describe the bug The client cannot be connected to the server, and the server has always prompted to disconnect the connection. Always remind:

Tcp connection from [::ffff:124.xxx.xxx.226]:52808, ws: false
Tcp connection from [::ffff:124.xxx.xxx.226]:52808 closed

客户端无法连接到服务端, 服务端一直提示断开连接 一直提示:

Tcp connection from [::ffff:124.xxx.xxx.226]:52808, ws: false
Tcp connection from [::ffff:124.xxx.xxx.226]:52808 closed

Describe the environment

How to Reproduce the bug

  1. Execute instructions ./amd64/hbbr and ./amd64/hbbs -r 0.0.0.0
  2. Connect server
  3. Get error

Additional context

Client log:

[2023-06-07 11:23:40.946179 +08:00] INFO [src\server.rs:415] server not started (will try to start): 系统找不到指定的文件。 (os error 2)
[2023-06-07 11:23:40.956542 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:40.957531 +08:00] INFO [src\ipc.rs:271] Started ipc server at path: \\.\pipe\RustDesk\query
[2023-06-07 11:23:40.959320 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk2.toml
[2023-06-07 11:23:40.970456 +08:00] INFO [src\rendezvous_mediator.rs:110] start rendezvous mediator of xxxxx:21116
[2023-06-07 11:23:40.970575 +08:00] INFO [src\common.rs:534] Testing nat ...
[2023-06-07 11:23:41.033959 +08:00] DEBUG [libs\hbb_common\src\udp.rs:35] Receive buf size of udp 0.0.0.0:0: Ok(65536)
[2023-06-07 11:23:41.047537 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk.toml
[2023-06-07 11:23:41.047953 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:41.047986 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk.toml
[2023-06-07 11:23:41.077507 +08:00] DEBUG [src\common.rs:571] Got nat response from xxx:21116: port=53288
[2023-06-07 11:23:41.130078 +08:00] DEBUG [src\common.rs:571] Got nat response from xxx:21115: port=53288
[2023-06-07 11:23:41.130242 +08:00] INFO [src\common.rs:597] Tested nat type: ASYMMETRIC in 159.3304ms
[2023-06-07 11:23:41.187860 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk_local.toml
[2023-06-07 11:23:41.197689 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk_default.toml
[2023-06-07 11:23:43.034657 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:43.761721 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk_hwcodec.toml
[2023-06-07 11:23:43.761891 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk_hwcodec.toml
[2023-06-07 11:23:43.761984 +08:00] DEBUG [libs\hbb_common\src\config.rs:1365] HW_CODEC_CONFIG refreshed successfully
[2023-06-07 11:23:43.762004 +08:00] DEBUG [libs\scrap\src\common\hwcodec.rs:359] Os { code: 5, kind: PermissionDenied, message: "拒绝访问。" }, scrap::common::hwcodec:libs\scrap\src\common\hwcodec.rs:359:21
[2023-06-07 11:23:43.792664 +08:00] INFO [libs\scrap\src\common\hwcodec.rs:362] Check hwcodec config, exit with: exit code: 0
[2023-06-07 11:23:43.792721 +08:00] DEBUG [libs\hbb_common\src\config.rs:427] Configuration path: C:\Users\Yuyuko\AppData\Roaming\RustDesk\config\RustDesk_hwcodec.toml
[2023-06-07 11:23:43.792846 +08:00] DEBUG [libs\hbb_common\src\config.rs:1365] HW_CODEC_CONFIG refreshed successfully
[2023-06-07 11:23:43.959725 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:44.035312 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:45.036122 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:46.960040 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:47.035612 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:49.035330 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:49.959944 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:50.035488 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:51.036142 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:52.959834 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:53.035195 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:54.035777 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:55.036487 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:55.960099 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:57.035649 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:23:58.959825 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:23:59.034855 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:00.035728 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:01.035992 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:01.959186 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:24:03.036058 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:04.036096 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:04.959803 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:24:05.036294 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:07.034844 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:07.959627 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:24:08.035588 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:10.035787 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:10.959458 +08:00] DEBUG [src\platform\windows.rs:1382] update portable executable name to rustdesk-1.2.0-x86_64.exe
[2023-06-07 11:24:10.960165 +08:00] DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-0.11.17\src\connect.rs:429] starting new connection: http://xxxx:21114/
[2023-06-07 11:24:12.036103 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:14.036380 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:16.035053 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:17.035725 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:18.035780 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:20.034573 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed
[2023-06-07 11:24:21.035202 +08:00] INFO [src\rendezvous_mediator.rs:457] register_pk of rsser due to key not confirmed

Server log:

2023-06-07T11:16:40.318843738+08:00 [2023-06-07 03:16:40.318611 +00:00] INFO [src/common.rs:121] Private key comes from id_ed25519

2023-06-07T11:16:40.318978662+08:00 [2023-06-07 03:16:40.318905 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3

2023-06-07T11:16:40.318996779+08:00 [2023-06-07 03:16:40.318929 +00:00] DEBUG [src/database.rs:58] MAX_DATABASE_CONNECTIONS=1

2023-06-07T11:16:40.331221600+08:00 [2023-06-07 03:16:40.331099 +00:00] DEBUG [<unnamed>:0] PRAGMA page_size = 4096; …; rows affected: 0, rows returned: 2, elapsed: 11.026ms

2023-06-07T11:16:40.331250907+08:00 

2023-06-07T11:16:40.331260357+08:00 PRAGMA page_size = 4096;

2023-06-07T11:16:40.331268003+08:00 PRAGMA locking_mode = NORMAL;

2023-06-07T11:16:40.331274993+08:00 PRAGMA journal_mode = WAL;

2023-06-07T11:16:40.331281977+08:00 PRAGMA foreign_keys = ON;

2023-06-07T11:16:40.331289367+08:00 PRAGMA synchronous = FULL;

2023-06-07T11:16:40.331296437+08:00 PRAGMA auto_vacuum = NONE;

2023-06-07T11:16:40.331303014+08:00 

2023-06-07T11:16:40.334484001+08:00 [2023-06-07 03:16:40.334312 +00:00] DEBUG [<unnamed>:0] create table if not …; rows affected: 0, rows returned: 0, elapsed: 2.609ms

2023-06-07T11:16:40.334511207+08:00 

2023-06-07T11:16:40.334520461+08:00 create table if not exists peer (

2023-06-07T11:16:40.334527665+08:00   guid blob primary key not null,

2023-06-07T11:16:40.334534798+08:00   id varchar(100) not null,

2023-06-07T11:16:40.334542175+08:00   uuid blob not null,

2023-06-07T11:16:40.334549652+08:00   pk blob not null,

2023-06-07T11:16:40.334558008+08:00   created_at datetime not null default(current_timestamp),

2023-06-07T11:16:40.334565735+08:00   user blob,

2023-06-07T11:16:40.334572805+08:00   status tinyint,

2023-06-07T11:16:40.334579972+08:00   note varchar(300),

2023-06-07T11:16:40.334586928+08:00   info text not null

2023-06-07T11:16:40.334594108+08:00 ) without rowid;

2023-06-07T11:16:40.334601372+08:00 create unique index if not exists index_peer_id on peer (id);

2023-06-07T11:16:40.334608415+08:00 create index if not exists index_peer_user on peer (user);

2023-06-07T11:16:40.334615892+08:00 create index if not exists index_peer_created_at on peer (created_at);

2023-06-07T11:16:40.334623195+08:00 create index if not exists index_peer_status on peer (status);

2023-06-07T11:16:40.334629845+08:00 

2023-06-07T11:16:40.334636932+08:00 [2023-06-07 03:16:40.334374 +00:00] INFO [src/rendezvous_server.rs:98] serial=0

2023-06-07T11:16:40.334644412+08:00 [2023-06-07 03:16:40.334393 +00:00] INFO [src/common.rs:46] rendezvous-servers=[]

2023-06-07T11:16:40.334651718+08:00 [2023-06-07 03:16:40.334397 +00:00] INFO [src/rendezvous_server.rs:100] Listening on tcp/udp :21116

2023-06-07T11:16:40.334658969+08:00 [2023-06-07 03:16:40.334399 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp :21115, extra port for NAT test

2023-06-07T11:16:40.334666053+08:00 [2023-06-07 03:16:40.334402 +00:00] INFO [src/rendezvous_server.rs:102] Listening on websocket :21118

2023-06-07T11:16:40.334691559+08:00 [2023-06-07 03:16:40.334448 +00:00] INFO [libs/hbb_common/src/udp.rs:35] Receive buf size of udp [::]:21116: Ok(212992)

2023-06-07T11:16:40.334700566+08:00 [2023-06-07 03:16:40.334496 +00:00] DEBUG [src/rendezvous_server.rs:1273] listen on udp Some([::]:21116)

2023-06-07T11:16:40.334707653+08:00 [2023-06-07 03:16:40.334512 +00:00] INFO [src/rendezvous_server.rs:137] mask: None

2023-06-07T11:16:40.334714636+08:00 [2023-06-07 03:16:40.334514 +00:00] INFO [src/rendezvous_server.rs:138] local-ip: ""

2023-06-07T11:16:40.334732836+08:00 [2023-06-07 03:16:40.334645 +00:00] INFO [src/common.rs:46] relay-servers=["localhost:21117"]

2023-06-07T11:16:40.334747866+08:00 [2023-06-07 03:16:40.334697 +00:00] DEBUG [src/rendezvous_server.rs:1285] listen on tcp Ok([::]:21116)

2023-06-07T11:16:40.334796657+08:00 [2023-06-07 03:16:40.334719 +00:00] DEBUG [src/rendezvous_server.rs:1285] listen on tcp Ok([::]:21115)

2023-06-07T11:16:40.334850904+08:00 [2023-06-07 03:16:40.334738 +00:00] DEBUG [src/rendezvous_server.rs:1285] listen on tcp Ok([::]:21118)

2023-06-07T11:16:40.334862294+08:00 [2023-06-07 03:16:40.334746 +00:00] INFO [src/rendezvous_server.rs:154] ALWAYS_USE_RELAY=N

2023-06-07T11:16:40.334877550+08:00 [2023-06-07 03:16:40.334770 +00:00] INFO [src/rendezvous_server.rs:174] Start

2023-06-07T11:16:40.334919740+08:00 [2023-06-07 03:16:40.334823 +00:00] INFO [libs/hbb_common/src/udp.rs:35] Receive buf size of udp [::]:0: Ok(212992)

2023-06-07T11:16:56.084648250+08:00 [2023-06-07 03:16:56.084356 +00:00] DEBUG [src/rendezvous_server.rs:1088] Tcp connection from [::ffff:124.xxx.xxx.226]:52808, ws: false

2023-06-07T11:16:56.084828252+08:00 [2023-06-07 03:16:56.084704 +00:00] DEBUG [src/rendezvous_server.rs:1128] Tcp connection from [::ffff:124.xxx.xxx.226]:52808 closed

2023-06-07T11:16:56.087118672+08:00 [2023-06-07 03:16:56.086954 +00:00] DEBUG [src/rendezvous_server.rs:1088] Tcp connection from [::ffff:124.xxx.xxx.226]:52807, ws: false

2023-06-07T11:16:56.087470164+08:00 [2023-06-07 03:16:56.087316 +00:00] DEBUG [src/rendezvous_server.rs:1128] Tcp connection from [::ffff:124.xxx.xxx.226]:52807 closed
lvmodan commented 1 year ago

how did you solve this issue?

lvmodan commented 1 year ago

@yuyuko233 excuse me, could you tell me the methon to bypass the issue? I meet the same issue, and no idea now. Thanks in advance.

yuyuko233 commented 1 year ago

@yuyuko233 excuse me, could you tell me the methon to bypass the issue? I meet the same issue, and no idea now. Thanks in advance.

k8s? If it is k8s, I am directly using the host port without agent forwarding, hence I believe the issue is with UDP forwarding.

          ports:
            - name: tcp-nat-type
              hostPort: 21115
              containerPort: 21115
              protocol: TCP
            - name: tcp-hole
              hostPort: 21116
              containerPort: 21116
              protocol: TCP
            - name: udp-id-reg
              hostPort: 21116
              containerPort: 21116
              protocol: UDP
graphixillusion commented 1 year ago

@yuyuko233 i'm having the exact same issue on a server with debian 12. Any clue on how to solve? No kubernetes, just a normal docker container

dinger1986 commented 1 year ago

Have you followed these exact docs?

https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/docker/

graphixillusion commented 1 year ago

@dinger1986 yep of course. The strange thing is that it doesn't connect even without docker, using the server binaries. Firewall disabled of course.

dinger1986 commented 1 year ago

What are you hosting on?

graphixillusion commented 1 year ago

@dinger1986 You mean os? Tried debian 11 and 12.

dinger1986 commented 1 year ago

No sorry vps, vm bare metal

graphixillusion commented 1 year ago

@dinger1986 vps. In the client log i have a bunch of register_pk of rsser due to key not confirmed errors. In the server's log i see the incoming connection from the client but the websocket is closed immediately.

dinger1986 commented 1 year ago

Where's the vps hosted?

Don't need to tag me, I get these anyway 👍

graphixillusion commented 1 year ago

hostaris, germany

dinger1986 commented 1 year ago

Ok, never heard of them but sure they are standard vps, what firewall are you using?

I always use hetzner to test the techahold script and it works fine every time

graphixillusion commented 1 year ago

I was using ufw but i made several tries and i've rebuild the vm from scratch and now no firewal is being used. Disabling the firewall was the first thing i did for testing. Outside the vm, in the control panel of the host i don't have any option to manage ports so i suppose everything is open by default. I have other services running and they works great. Actually, around a month ago, i tried rustdesk and it worked good so far. These problems i'm getting appeared yesterday: i was trying the last version and i found out this.

dinger1986 commented 1 year ago

Oh, what version are you using?

graphixillusion commented 1 year ago

Last version: 1.2.2 for the cliend and 1.1.8-2 for the server. Now i'm trying old versions but still nothing

dinger1986 commented 1 year ago

How strange. Does networking work from that server? Not doing anything funky with ports or whatever?

paspo commented 1 year ago

Some providers will give you a "natted" address (amazon, oracle, ...). If this is the case, you also need to setup port forwarding in their networking setup. If unsure, check the IP address by ssh'ing into the VPS: ip -br -c a If you get an IP address that is DIFFERENT from the (expected) external address, then this can be the answer.

graphixillusion commented 1 year ago

@paspo i run the command and the ip address is the same of the external one so no nat is going on. I really don't know what could be the problem

paspo commented 1 year ago

try to start a temporary web server on the rustdesk ports and check if it works. You can test all the tcp works that way.

If you have a php installed, you can just use php -S 0.0.0.0:7777. If you have python, try python3 -m http.server 7777

The last resort is the classic packet dumping.

You must check if connections are making their way to the correct process, to exclude some external interference.

Remember: you can do a quick check for your server with a command like this:

docker run --rm -ti --entrypoint /usr/bin/rustdesk-utils rustdesk/rustdesk-server-s6:latest doctor rustdesk.mydomain.com

(or you can just use the binary from the releases page)

graphixillusion commented 1 year ago

@paspo the python http server works without problems. I've tried random ports and the same ports of rustdesk and it works flawless. this is the doctor's result:

Checking IP address: x.x.x.x
Is IPV4: true
Is IPV6: false
Reverse DNS lookup: DOESN'T MATCH
TCP Port 21114 (API): ERROR
TCP Port 21115 (hbbs extra port for nat test): OK in 0 ms
TCP Port 21116 (hbbs): OK in 0 ms
TCP Port 21117 (hbbr tcp): OK in 0 ms
TCP Port 21118 (hbbs websocket): OK in 0 ms
TCP Port 21119 (hbbr websocket): OK in 0 ms

Server log:

rustdesk-server  | [2023-08-23 20:52:23.897549 +00:00] DEBUG [src/rendezvous_server.rs:1097] Tcp connection from [::ffff:x.x.x.x]:52025, ws: false
rustdesk-server  | [2023-08-23 20:52:23.897871 +00:00] DEBUG [src/rendezvous_server.rs:1137] Tcp connection from [::ffff:x.x.x.x]:52025 closed
rustdesk-server  | [2023-08-23 20:52:56.218287 +00:00] DEBUG [src/rendezvous_server.rs:1097] Tcp connection from [::ffff:x.x.x.x]:32904, ws: false
rustdesk-server  | [2023-08-23 20:52:56.218770 +00:00] DEBUG [src/rendezvous_server.rs:1097] Tcp connection from [::ffff:x.x.x.x]:42626, ws: true
rustdesk-server  | [2023-08-23 20:52:56.219403 +00:00] DEBUG [src/rendezvous_server.rs:1137] Tcp connection from [::ffff:x.x.x.x]:32904 closed
rustdesk-server  | [2023-08-23 20:52:56.219839 +00:00] DEBUG [src/rendezvous_server.rs:1101] WebSocket protocol error: Handshake not finished
rustdesk-server  |
rustdesk-server  |
rustdesk-server  | Caused by:
rustdesk-server  |     Handshake not finished, hbbs::rendezvous_server:src/rendezvous_server.rs:1101:13
rustdesk-server  | [2023-08-23 20:52:56.220179 +00:00] DEBUG [src/relay_server.rs:400] WebSocket protocol error: Handshake not finished
rustdesk-server  |
rustdesk-server  |
rustdesk-server  | Caused by:
rustdesk-server  |     Handshake not finished, hbbr::relay_server:src/relay_server.rs:400:9
rustdesk-server  | [2023-08-23 20:53:24.740143 +00:00] DEBUG [src/rendezvous_server.rs:1097] Tcp connection from [::ffff:x.x.x.x]:52032, ws: false
rustdesk-server  | [2023-08-23 20:53:24.740390 +00:00] DEBUG [src/rendezvous_server.rs:1137] Tcp connection from [::ffff:x.x.x.x]:52032 closed
rustdesk-server  | [2023-08-23 20:54:26.710317 +00:00] DEBUG [src/rendezvous_server.rs:1097] Tcp connection from [::ffff:x.x.x.x]:52040, ws: false
rustdesk-server  | [2023-08-23 20:54:26.710416 +00:00] DEBUG [src/rendezvous_server.rs:1137] Tcp connection from [::ffff:x.x.x.x]:52040 closed

Client log:

[2023-08-23 22:47:39.081132 +02:00] INFO [src\rendezvous_mediator.rs:114] start rendezvous mediator of rustdesk.domain
[2023-08-23 22:47:39.126419 +02:00] DEBUG [libs\hbb_common\src\udp.rs:35] Receive buf size of udp 0.0.0.0:0: Ok(65536)
[2023-08-23 22:47:39.127991 +02:00] INFO [src\rendezvous_mediator.rs:463] register_pk of manage due to key not confirmed
[2023-08-23 22:47:41.128230 +02:00] INFO [src\rendezvous_mediator.rs:463] register_pk of manage due to key not confirmed
[2023-08-23 22:47:42.128680 +02:00] INFO [src\rendezvous_mediator.rs:463] register_pk of manage due to key not confirmed
[2023-08-23 22:47:44.128090 +02:00] INFO [src\rendezvous_mediator.rs:463] register_pk of manage due to key not confirmed
...
...
paspo commented 1 year ago

so, it's not a port problem. Maybe it has something to do with the keys... can you try with an empty database? Just grab a fresh db_v2.sqlite3

graphixillusion commented 1 year ago

Nothing, same error. Could it be a MTU problem?

yuyuko233 commented 1 year ago

I think it's possible that the client can't connect via UDP to the server.

graphixillusion commented 1 year ago

@yuyuko233 how to check this?

yuyuko233 commented 1 year ago

You can try this.

https://www.ibm.com/support/pages/udp-connectivity-testing

The 33001 port in the IBM tutorial needs to be changed to the udp port for hbbs listening, which defaults to 21116 port.

https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/install/#option-2

DevJupyHUB commented 1 year ago

@graphixillusion - hi, There's no need to overcomplicate this, just watch your traffic on the server (Deb12) that rustdesk related...

as he said @paspo "The last resort is the classic packet dumping."

here is your tool for this purpose = https://www.wireshark.org/docs/man-pages/tshark.html (Wireshark CLI for headless Deb server)

graphixillusion commented 1 year ago

It seems there is something wrong with the udp packets. I've contacted the customer care and ask to them. Let's see. Thank you to everyone for the support, i'll update here when i'll have the answers from them.

UPDATE:

I can confirm that it was a UDP connection problem. The customer care saw me that their ddos policy was blocking the udp ports and they allow only a little range. Using the allowed range make it works. I think it should be specified in the faq that if there is something wrong with UDP the connection will fails.

Kbstsn commented 8 months ago

May I ask how it was resolved? I also encountered the same problem

graphixillusion commented 8 months ago

May I ask how it was resolved? I also encountered the same problem

Check the firewall if it's blocking the udp port

Kbstsn commented 8 months ago

请问是怎么解决的呢?我也遇到了同样的问题

检查防火墙是否拦截了udp端口

I have checked and found that the port is open and verified with nmap

yuyuko233 commented 8 months ago

May I ask how it was resolved? I also encountered the same problem

Check the firewall if it's blocking the udp port

I have checked and found that the port is open and verified with nmap

@kerlw 检查下有没有经过流量转发服务,我k8s是因为udp转发有问题,使用hostPort就没事了

Check the traffic proxy service. My K8s has a problem with UDP forwarding.