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

wsl2下 Cluster IP或服务域名无法访问,其他的一切正常 #400

Open KongZouXiang opened 1 year ago

KongZouXiang commented 1 year ago

Describe the bug Cluster IP或服务域名无法访问

  1. pod可以正常访问,
  2. NodePort可以正常访问
  3. Cluster IP或服务域名可以ping通

Log image

4:27AM DBG Task netsh.exe with args [netsh interface ipv4 set address KtConnectTunnel static 10.96.0.0 255.255.255.0] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add route 10.96.0.0/24 KtConnectTunnel 10.96.0.0] 4:27AM INF Adding route to 10.109.25.202/32 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add address KtConnectTunnel 10.109.25.202 255.255.255.255] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add route 10.109.25.202/32 KtConnectTunnel 10.109.25.202] 4:27AM INF Adding route to 10.107.171.93/32 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add address KtConnectTunnel 10.107.171.93 255.255.255.255] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add route 10.107.171.93/32 KtConnectTunnel 10.107.171.93] 4:27AM INF Adding route to 10.1.0.0/24 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add address KtConnectTunnel 10.1.0.0 255.255.255.0] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add route 10.1.0.0/24 KtConnectTunnel 10.1.0.0] 4:27AM INF Adding route to 192.168.65.4/32 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add address KtConnectTunnel 192.168.65.4 255.255.255.255] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 add route 192.168.65.4/32 KtConnectTunnel 192.168.65.4] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 show interfaces] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 show route store=persistent] 4:27AM INF Route to tun device completed 4:27AM INF Setting up dns in local mode 4:27AM DBG Service found: kubernetes.default 10.96.0.1 4:27AM DBG Service found: mysql.default 10.109.25.202 4:27AM DBG Service found: tomcat.default 10.107.171.93 4:27AM DBG Dump hosts successful 4:27AM DBG Service kubernetes added 4:27AM DBG Service mysql added 4:27AM DBG Service tomcat added 4:27AM DBG Using port 60495 4:27AM DBG Request port forward pod:53 -> local:60495 via https://kubernetes.docker.internal:6443 4:27AM INF Port forward local:60495 -> pod kt-connect-shadow-idcxq:53 established 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 show dnsservers] 4:27AM INF Setup local DNS with upstream [tcp:127.0.0.1:60495 udp:4.2.2.1:53] 4:27AM INF Creating udp dns on port 53 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 set interface KtConnectTunnel metric=2] 4:27AM DBG Task netsh.exe with args [netsh interface ipv4 set dnsservers name=KtConnectTunnel source=static address=127.0.0.1] 4:27AM DBG Found domain www.microsoft.com. (6) in dns (4.2.2.1:53) 4:27AM INF --------------------------------------------------------------- 4:27AM INF All looks good, now you can access to resources in the kubernetes cluster 4:27AM INF --------------------------------------------------------------- 4:27AM DBG Pod kt-connect-shadow-mgnvn deleted 4:27AM WRN Failed to lookup www.baidu.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57688->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup www.baidu.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57689->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain www.baidu.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.baidu.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.baidu.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain www.baidu.com. (5) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup www.baidu.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57690->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain www.baidu.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup www.baidu.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57692->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain www.baidu.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup www.a.shifen.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57695->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain www.a.shifen.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.a.shifen.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain www.a.shifen.com. (5) in dns (127.0.0.1:60495) 4:27AM WRN Failed to lookup www.wshifen.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57698->127.0.0.1:60495: i/o timeout" 4:27AM DBG Empty answer for domain lookup www.wshifen.com. (5) 4:27AM DBG Found domain www.wshifen.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Empty answer for domain lookup www.wshifen.com. (5) 4:27AM WRN Failed to lookup ipv6.msftconnecttest.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57699->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup www.msftconnecttest.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57701->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup ipv6.msftconnecttest.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57700->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup www.msftconnecttest.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57702->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain ipv6.msftconnecttest.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain ipv6.msftconnecttest.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain ipv6.msftconnecttest.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain www.msftconnecttest.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.msftconnecttest.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain ipv6.msftconnecttest.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain ipv6.msftconnecttest.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.msftconnecttest.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.msftconnecttest.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.msftconnecttest.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup ipv6.msftconnecttest.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57706->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup www.msftconnecttest.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57708->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain ipv6.msftconnecttest.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.msftconnecttest.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup www.wshifen.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57715->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain www.wshifen.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain www.wshifen.com. (1) in dns (127.0.0.1:60495) 4:27AM DBG Found domain www.wshifen.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup v6ncsi.msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57721->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup ncsi-geo.trafficmanager.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57722->127.0.0.1:60495: i/o timeout" 4:27AM DBG Pod kt-rectifier-llwue deleted 4:27AM DBG Found domain v6ncsi.msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain ncsi-geo.trafficmanager.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain v6ncsi.msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain ncsi-geo.trafficmanager.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain ncsi-geo.trafficmanager.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain v6ncsi.msedge.net. (5) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup cn.bing.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57725->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup cn.bing.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57726->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain cn.bing.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain cn.bing.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain cn.bing.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain cn.bing.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain cn.bing.com. (5) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup cn.bing.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57730->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain cn.bing.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup v4ncsi.msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57735->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup ncsi.6-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57734->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain v4ncsi.msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain v4ncsi.msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain ncsi.6-c-0003.c-msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain ncsi.6-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain v4ncsi.msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain ncsi.6-c-0003.c-msedge.net. (5) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup cn-bing-com.cn.a-0001.a-msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57739->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain cn-bing-com.cn.a-0001.a-msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain cn-bing-com.cn.a-0001.a-msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain cn-bing-com.cn.a-0001.a-msedge.net. (5) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup ncsi.4-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57748->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup 6-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57749->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain ncsi.4-c-0003.c-msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Empty answer for domain lookup 6-c-0003.c-msedge.net. (5) 4:27AM DBG Found domain ncsi.4-c-0003.c-msedge.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Empty answer for domain lookup 6-c-0003.c-msedge.net. (5) 4:27AM DBG Found domain ncsi.4-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain 6-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM WRN Failed to lookup a-0001.a-msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57752->127.0.0.1:60495: i/o timeout" 4:27AM DBG Empty answer for domain lookup a-0001.a-msedge.net. (5) 4:27AM DBG Found domain a-0001.a-msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Empty answer for domain lookup a-0001.a-msedge.net. (5) 4:27AM WRN Failed to lookup 6-c-0003.c-msedge.net. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57759->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup 4-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57758->127.0.0.1:60495: i/o timeout" 4:27AM DBG Empty answer for domain lookup 6-c-0003.c-msedge.net. (1) 4:27AM DBG Empty answer for domain lookup 4-c-0003.c-msedge.net. (5) 4:27AM DBG Found domain ipv6.msftconnecttest.com. (1) in cache 4:27AM DBG Found domain 4-c-0003.c-msedge.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Empty answer for domain lookup 4-c-0003.c-msedge.net. (5) 4:27AM DBG Empty answer for domain lookup 6-c-0003.c-msedge.net. (1) 4:27AM DBG Empty answer for domain lookup 6-c-0003.c-msedge.net. (1) 4:27AM WRN Failed to lookup a-0001.a-msedge.net. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57761->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain a-0001.a-msedge.net. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain a-0001.a-msedge.net. (1) in dns (127.0.0.1:60495) 4:27AM DBG Found domain a-0001.a-msedge.net. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup github.githubassets.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57768->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup github.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57767->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup github.githubassets.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57769->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup github.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57770->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup 4-c-0003.c-msedge.net. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57771->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain github.githubassets.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain github.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Empty answer for domain lookup github.com. (5) 4:27AM DBG Found domain github.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Empty answer for domain lookup github.githubassets.com. (5) 4:27AM DBG Found domain github.com. (1) in dns (127.0.0.1:60495) 4:27AM DBG Found domain github.githubassets.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain github.githubassets.com. (1) in dns (127.0.0.1:60495) 4:27AM DBG Found domain github.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain 4-c-0003.c-msedge.net. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain 4-c-0003.c-msedge.net. (1) in dns (127.0.0.1:60495) 4:27AM DBG Found domain github.githubassets.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Empty answer for domain lookup github.githubassets.com. (5) 4:27AM DBG Empty answer for domain lookup github.com. (5) 4:27AM DBG Found domain 4-c-0003.c-msedge.net. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup functional.events.data.microsoft.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57795->127.0.0.1:60495: i/o timeout" 4:27AM WRN Failed to lookup functional.events.data.microsoft.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57796->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain functional.events.data.microsoft.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain functional.events.data.microsoft.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain functional.events.data.microsoft.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain functional.events.data.microsoft.com. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain functional.events.data.microsoft.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup functional.events.data.microsoft.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57797->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain functional.events.data.microsoft.com. (1) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup global.asimov.events.data.trafficmanager.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57802->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain global.asimov.events.data.trafficmanager.net. (5) in dns (4.2.2.1:53) 4:27AM DBG Found domain global.asimov.events.data.trafficmanager.net. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain global.asimov.events.data.trafficmanager.net. (5) in dns (4.2.2.1:53) 4:27AM WRN Failed to lookup onedscolprdwus10.westus.cloudapp.azure.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57806->127.0.0.1:60495: i/o timeout" 4:27AM DBG Empty answer for domain lookup onedscolprdwus10.westus.cloudapp.azure.com. (5) 4:27AM DBG Empty answer for domain lookup onedscolprdwus10.westus.cloudapp.azure.com. (5) 4:27AM DBG Found domain onedscolprdwus10.westus.cloudapp.azure.com. (5) in dns (127.0.0.1:60495) 4:27AM DBG Found domain ipv6.msftconnecttest.com. (1) in cache 4:27AM DBG Found domain www.msftconnecttest.com. (1) in cache 4:27AM WRN Failed to lookup onedscolprdwus10.westus.cloudapp.azure.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57809->127.0.0.1:60495: i/o timeout" 4:27AM DBG Found domain onedscolprdwus10.westus.cloudapp.azure.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Found domain onedscolprdwus10.westus.cloudapp.azure.com. (1) in dns (127.0.0.1:60495) 4:27AM DBG Found domain onedscolprdwus10.westus.cloudapp.azure.com. (1) in dns (4.2.2.1:53) 4:27AM DBG Heartbeat port forward 8356 ticked at 2023-02-14 04:27:58 4:28AM DBG Heartbeat socks proxy ticked at 2023-02-14 04:28:03 4:28AM WRN Failed to lookup activity.windows.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57819->127.0.0.1:60495: i/o timeout" 4:28AM WRN Failed to lookup activity.windows.com. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57820->127.0.0.1:60495: i/o timeout" 4:28AM DBG Found domain activity.windows.com. (1) in dns (4.2.2.1:53) 4:28AM DBG Found domain activity.windows.com. (5) in dns (4.2.2.1:53) 4:28AM DBG Found domain activity.windows.com. (5) in dns (127.0.0.1:60495) 4:28AM DBG Found domain activity.windows.com. (5) in dns (4.2.2.1:53) 4:28AM DBG Found domain activity.windows.com. (1) in dns (4.2.2.1:53) 4:28AM WRN Failed to lookup activity.windows.com. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57821->127.0.0.1:60495: i/o timeout" 4:28AM DBG Found domain activity.windows.com. (1) in dns (4.2.2.1:53) 4:28AM DBG Heartbeat port forward 60495 ticked at 2023-02-14 04:28:08 4:28AM WRN Failed to lookup activity-geo.trafficmanager.net. (5) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57826->127.0.0.1:60495: i/o timeout" 4:28AM DBG Empty answer for domain lookup activity-geo.trafficmanager.net. (5) 4:28AM DBG Found domain activity-geo.trafficmanager.net. (5) in dns (127.0.0.1:60495) 4:28AM DBG Empty answer for domain lookup activity-geo.trafficmanager.net. (5) 4:28AM WRN Failed to lookup activity-geo.trafficmanager.net. (1) in dns (127.0.0.1:60495) error="read tcp 127.0.0.1:57830->127.0.0.1:60495: i/o timeout" 4:28AM DBG Found domain activity-geo.trafficmanager.net. (1) in dns (4.2.2.1:53) 4:28AM DBG Found domain activity-geo.trafficmanager.net. (1) in dns (127.0.0.1:60495) 4:28AM DBG Found domain activity-geo.trafficmanager.net. (1) in dns (4.2.2.1:53) 4:28AM DBG Found domain www.baidu.com. (1) in cache

Environment (please complete the following information):

Additional context Add any other context about the problem here.