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

Failed to run the control channel and the data channel #100

Closed
ArchGuyWu opened this issue Jan 13, 2022 · 6 comments
Closed

Failed to run the control channel and the data channel #100

ArchGuyWu opened this issue Jan 13, 2022 · 6 comments

Comments

@ArchGuyWu
Copy link

`Jan 13 12:18:01.913 ERROR new{service=my_ssh}: rathole::client: Failed to run the control channel

Caused by:
0: Failed to read control cmd
1: early eof

Retry in 1s...
Jan 13 12:18:01.939 ERROR new{service=my_ssh}:run: rathole::client: Failed to run the data channel

Caused by:
0: Failed to read data cmd
1: early eof`
This was happening all the time since the client started,I don't know why it happened,but it didn't affect the connection actually,I could still ssh to the computer behind NAT.

@rapiz1
Copy link
Owner

rapiz1 commented Jan 13, 2022

Hi. Thanks for reporting. However, further information is needed to investigate the issue

Please provide:

  • Output of ./rathole --version
  • Full configuration, with sensitive information (IP etc.) masked
  • Full log of the server and the client

@rapiz1
Copy link
Owner

rapiz1 commented Jan 13, 2022

BTW, Failed to run the data channel indicates unstable network, and is not fatal. Failed to run the control channel is fatal and causes the forwarding unusable. These two errors can happen when the server or the client restarts, or network interrupts.

@ArchGuyWu
Copy link
Author

ArchGuyWu commented Jan 13, 2022

The server runs on mobile data.

rathole
Build Timestamp: 2022-01-08T11:48:49.677820900+00:00
Build Version: 0.3.4
Commit SHA: Some("1240dd8df93d966e6c357ac67ffcecb6fcf0b1c4")
Commit Date: Some("2022-01-08T11:39:52+00:00")
Commit Branch: Some("detached HEAD")
cargo Target Triple: x86_64-pc-windows-msvc
cargo Profile: release
cargo Features: base64,client,default,hot_reload,noise,notify,server,snowstorm,tls,tokio_native_tls

clent-side configuration:
[client]
remote_addr = "archguy-rathole-server.xyz:2333"
[client.transport]
type = "noise"
[client.transport.noise]
remote_public_key = "Sh/DMjEyzCzd7CTqZlQbK9+aS6RGhlMVZnJSfwBTrU8="
[client.services.my_ssh]
type = "tcp"
token = "WuBo2929470442"
local_addr = "127.0.0.1:22"

server-side configuration:
[server]
bind_addr = "[::]:2333" # 2333 specifies the port that rathole listens for clients

[server.transport]
type = "noise"
[server.transport.noise]
local_private_key = "vB4TDHu41He1X7Up/SbmMJiiyZSN6UqMHBRyuFGxPOw="
[server.services.my_ssh]
type = "tcp"
token = "WuBo2929470442"
bind_addr = "[::]:5202"

I'm sorry,I just forgot to bring the server log:
`Jan 13 04:51:11.932 INFO handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8315}: rathole::server: Try to handshake a control channel

Jan 13 04:51:12.033 WARN handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8315}: rathole::server: Dropping previous control channel for service my_ssh

Jan 13 04:51:12.033 INFO handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8315}: rathole::server: Control channel established service=my_ssh

Jan 13 04:51:12.034 INFO handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8305}:new{service=my_ssh}:run{service=my_ssh}: rathole::server: Control channel shutdown

Jan 13 04:51:12.035 INFO handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8305}:new{service=my_ssh}:run_tcp_connection_pool: rathole::server: TCPListener shutdown

Jan 13 04:51:12.036 INFO handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8305}:new{service=my_ssh}:run_tcp_connection_pool: rathole::server: Shutdown

Jan 13 04:51:12.036 INFO handle_connection{addr=[2001:da8:c802:232:a44c:d47e:4f6d:1ce1]:8315}:new{service=my_ssh}:run_tcp_connection_pool: rathole::server: Listening at [::]:5202`
It seems that the the errors Failed to run the control channel and Failed to run the data channel caused by the failure to handshake in the server-side.

@rapiz1
Copy link
Owner

rapiz1 commented Jan 13, 2022

It's possibly due to unstable network or short TCP keepalive interval since you're using mobile data.

I will expose TCP_KEEPALIVE setting in the next version and set it a smaller value could solve your issue.

@ArchGuyWu
Copy link
Author

Thank you a lot,I'll test that again in the next version.

@rapiz1
Copy link
Owner

rapiz1 commented Jan 14, 2022

v0.3.7 is released

You may adjust the following parameters to decrease the downtime

keepalive_secs = 10 # Optional. Specify `tcp_keepalive_time` in `tcp(7)`, if applicable. Default: 10 seconds
keepalive_interval = 5 # Optional. Specify `tcp_keepalive_intvl` in `tcp(7)`, if applicable. Default: 5 seconds

@rapiz1 rapiz1 closed this as completed Jan 14, 2022
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