kt-connect icon indicating copy to clipboard operation
kt-connect copied to clipboard

在连接被服务器断开后,客户端尝试重新连接,但会失败

Open ystyle opened this issue 1 year ago • 0 comments

Describe the bug

 ✘ ystyle@Archlinux  ~  .j tkh-uat 
kubectl config use-context tkh-uat
Switched to context "tkh-uat".
sudo ktctl --kubeconfig=/home/ystyle/.kube/config connect --dnsMode hosts:default,loki
3:08PM INF Using cluster context tkh-uat (tkh-uat)
3:08PM INF KtConnect 0.3.4 start at 84955 (linux amd64)
3:08PM INF Fetching cluster time ...
3:08PM INF Successful create config map kt-connect-shadow-lrkbj
3:08PM INF Deploying shadow pod kt-connect-shadow-lrkbj in namespace default
3:08PM INF Waiting for pod kt-connect-shadow-lrkbj ...
3:08PM INF Pod kt-connect-shadow-lrkbj is ready
3:08PM INF Port forward local:52853 -> pod kt-connect-shadow-lrkbj:22 established
3:08PM INF Socks proxy established
3:08PM INF Tun device kt0 is ready
3:08PM INF Adding route to 10.43.0.0/16
3:08PM INF Adding route to 10.42.0.0/16
3:08PM INF Route to tun device completed
3:08PM INF Setting up dns in hosts mode
3:08PM INF ---------------------------------------------------------------
3:08PM INF  All looks good, now you can access to resources in the kubernetes cluster
3:08PM INF ---------------------------------------------------------------
3:27PM WRN Failed to update heart beat of pod kt-connect-shadow-lrkbj error="Patch \"https://dae.hofo.co/k8s/clusters/c-m-jvkwsp7l/api/v1/namespaces/default/pods/kt-connect-shadow-lrkbj\": read tcp 192.168.9.152:39872->121.41.46.25:443: read: connection reset by peer"
3:27PM INF Port forward local:52853 -> pod kt-connect-shadow-lrkbj:22 established
3:28PM INF Socks proxy established
^C4:10PM INF Terminal signal is interrupt
4:10PM INF Removed pid file /root/.ktctl/connect-84955.pid
4:10PM INF Pid file was removed
4:10PM INF Removed key file /root/.ktctl/pk/kt-connect-shadow-lrkbj_id_rsa
4:10PM INF Drop hosts successful
4:10PM INF Cleaning configmap kt-connect-shadow-lrkbj
4:10PM INF Tun device tun://kt0 stopped
4:10PM INF Cleaning shadow pod kt-connect-shadow-lrkbj

在最后一行横线下面: 第一行提示连接中断,再下一行提示了连接成功,但 Socks proxy established之后就卡住了, 网络并没有重新连接成功。

Log please add -d to debug log

Environment (please complete the following information):

  • OS: archlinux
  • Kubernetes v1.20.2
  • KT Version 0.3.4

Additional context Add any other context about the problem here.

ystyle avatar Sep 05 '22 08:09 ystyle