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

无法连接,提示没有注册relayserver #9

Open
Jamesun921 opened this issue Dec 2, 2023 · 10 comments
Open

无法连接,提示没有注册relayserver #9

Jamesun921 opened this issue Dec 2, 2023 · 10 comments

Comments

@Jamesun921
Copy link

这是一个很棒的项目,go做服务短小精悍!
但我出现问题
参照模板配置:
{
"whiteList": false,
"ipList": [
],
"must_key": true,
"debug": true,
"reg_server":"m.abc.com:21118",
"relay_name":"go_rust_desk_relay",
"server_port": 21116,
"relay_port":21117,
"reg_port": 21118
}

正常启动,端口看起来也正常:
OrbStack 88778 james 49u IPv4 0xc733ab5481767f27 0t0 TCP *:21116 (LISTEN)
OrbStack 88778 james 50u IPv4 0xc733ab5482074187 0t0 TCP *:21117 (LISTEN)
OrbStack 88778 james 51u IPv4 0xc733ab54817712e7 0t0 TCP *:21115 (LISTEN)
OrbStack 88778 james 52u IPv6 0xc733ab594c3390ff 0t0 TCP *:21116 (LISTEN)
OrbStack 88778 james 53u IPv6 0xc733ab594c32e0ff 0t0 TCP *:21117 (LISTEN)
OrbStack 88778 james 54u IPv6 0xc733ab594c32f0ff 0t0 TCP *:21115 (LISTEN)
rustdesk 97350 james 13u IPv6 0xc733ab594d48b0ff 0t0 TCP *:21118 (LISTEN)
rust远程界面设置了enable direct ip access,端口为21118 (不太确定这个项目的reg_port是不是这个?)
远程和客户端都配置好中继为m.abc.com
两边也都能看到连接正常,远程上线(绿色)
但是客户端连接远程的时候,长时间连接,直到出现超时,中继端出现错误:
2023-12-02 20:56:21 [ERR]: server.go:63 NoRegisteredRelayServer

另外当前版本debug参数没用,都是debug输出。

@Jamesun921
Copy link
Author

我的问题查到原因了,composer 文件需要调整21120端口映射为21118
现在日志里能显示relay注册成功
但是出现这个issue的问题了#5

@danbai225
Copy link
Owner

根据你的配置 id服务器填21116端口
中继服务器填21117

当然这是默认端口如果你外部映射到也是这个可以不用填写端口号。

@Jamesun921
Copy link
Author

2023-12-02 21:24:23 [INFO]: sync.go:80 new relay go_rust_desk_relay 192.168.228.1:43944
2023-12-02 21:24:23 [INFO]: relay.go:144 注册成功

这个ip是不是获取的不对

@danbai225
Copy link
Owner

这个地址是根据请求来的,你在配置里填的内网注册地址就会走内网去请求。拿到的就是内网ip。

@Jamesun921
Copy link
Author

"reg_server":"m.abc.com:21118",
但我这里是个公网ip,家宽的ipv4 公网,ddns的

@danbai225
Copy link
Owner

你注册服务器和中继是跑在一个内网,可能会出现这种情况,后续我看看把中继ip改为可指定配置的

@Jamesun921
Copy link
Author

是,rustdesk gui+docker+gorustdeskserver 都在一台mac上
期待有好的解决方法

@Jamesun921
Copy link
Author

更新了昨天的代码,貌似还是不行

{
"whiteList": false,
"ipList": [
],
"must_key": true,
"debug": true,
"reg_server":"m.abc.com:21118",
"relay_name":"go_rust_desk_relay",
"server_port": 21116,
"relay_port":21117,
"reg_port": 21118,
"relay_ip": "127.0.0.1"
}

image

sever所在内网ip 192.168.1.180

日志:

2023-12-06 21:15:16 [INFO]: key.go:46 key= N/exxxxxxxxxxxxxxxxxxx
2023-12-06 21:15:20 [DEBG]: handler.go:55 udp 192.168.228.1:44610 *model_proto.RendezvousMessage_RegisterPeer
2023-12-06 21:15:20 [DEBG]: handler.go:55 udp 192.168.228.1:44610 *model_proto.RendezvousMessage_RegisterPk
2023-12-06 21:15:22 [DEBG]: handler.go:55 tcp 192.168.228.1:41116 *model_proto.RendezvousMessage_OnlineRequest
2023-12-06 21:15:33 [DEBG]: handler.go:55 udp 192.168.228.1:44610 *model_proto.RendezvousMessage_RegisterPeer

@Jamesun921
Copy link
Author

是不是这个问题,目前好像还无解 rustdesk/rustdesk-server#102 (comment)

@danbai225
Copy link
Owner

relay_ip应该填你中继服务器所在的公网ip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants