alibaba / kt-connect

A toolkit for Integrating with your kubernetes dev environment more efficiently
https://alibaba.github.io/kt-connect/#/
GNU General Public License v3.0
1.48k stars 231 forks source link

connect过程中提示"context deadline exceeded" #394

Open chxj1992 opened 1 year ago

chxj1992 commented 1 year ago

Describe the bug connect过程中提示"context deadline exceeded", 但是看不出具体原因。

Log 2:36PM INF Using cluster context xx@local (local) 2:36PM INF KtConnect 0.3.7 start at 59448 (darwin arm64) 2:36PM INF Fetching cluster time ... 2:37PM INF Using tun2socks mode 2:37PM INF Successful create config map kt-connect-shadow-gmeen 2:37PM INF Deploying shadow pod kt-connect-shadow-gmeen in namespace xxx-dev 2:37PM INF Waiting for pod kt-connect-shadow-gmeen ... E0113 14:37:19.519293 59448 request.go:1085] Unexpected error when reading response body: context deadline exceeded 2:37PM INF Pod kt-connect-shadow-gmeen is ready 2:37PM INF Port forward local:34623 -> pod kt-connect-shadow-gmeen:22 established 2:37PM INF Socks proxy established 2:37PM INF Tun device utun6 is ready E0113 14:37:37.312954 59448 request.go:1085] Unexpected error when reading response body: context deadline exceeded 2:37PM WRN Failed to fetch service ips error="unexpected error when reading response body. Please retry. Original error: context deadline exceeded" 2:37PM WRN Failed to fetch pod ips error="Get \"https://x.x.x.x:32681/api/v1/namespaces/xxx-dev/pods?limit=1000&timeout=5s&timeoutSeconds=5\": context deadline exceeded" 2:37PM WRN all routes failed to setup error="no route available" 2:37PM ERR Exit: all routes failed to setup 2:37PM INF Removed pid file /Users/xxx/.kt/pid/connect-59448.pid 2:37PM INF Pid file was removed 2:37PM INF Removed key file /Users/xxx/.kt/key/kt-connect-shadow-gmeen.key 2:37PM INF Cleaning configmap kt-connect-shadow-gmeen 2:37PM INF Cleaning shadow pod kt-connect-shadow-gmeen

Environment (please complete the following information):

Additional context Add any other context about the problem here.

chxj1992 commented 1 year ago
Screenshot 2023-01-13 at 16 29 43

用 kubectl 访问k8s看起来是正常的。

chxj1992 commented 1 year ago

想请教下这个问题可以这么排查呢?

chxj1992 commented 1 year ago

似乎是网络问题,我发现如果我反复connect,多试几次就能成功一次