The Wayback Machine - https://web.archive.org/web/20210118081605/https://github.com/alibaba/kt-connect/issues/166
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

user-service.default.svc.cluster.local: nodename nor servname provided, or not known #166

Open
zhangam opened this issue Sep 23, 2020 · 0 comments
Assignees
Labels

Comments

@zhangam
Copy link

@zhangam zhangam commented Sep 23, 2020

Describe the bug
用的是socks5 在idea里面启动服务可以,podIp是通的,但是在用openfeign调用其他服务是就无法识别host了:
ERROR UnknownHostException: user-service.default.svc.cluster.local: nodename nor servname provided, or not known (5658ms)
如果用vpn的话是没问题的(kt 0.0.12没问题, kt0.0.13-rc11 vpn的话exchange到本地超时不通,podIp等能访问)。但是windows只能用socks5. 这是属于不能使用dns么?有没有其他解决方案?

9月24更新:
上面那个错误是因为我在bootstrap.yml中设置了spring.cloud.kubernetes.ribbon.mode=service导致的,如果设置mode为pod就不会. 用了 0.0.13-rc11版本后,vpn和socks5都很慢,还有经常不通的情况,换回0.0.12稳定版后就好了

Log
sudo ktctl -d -n default connect --method=socks5 --cidr 10.100.0.0/16 10.96.0.0/16
Password:
3:48PM INF Connect Start At 13384
3:48PM INF private Key generated
3:48PM INF public key generated
3:48PM INF successful create ssh config map kt-connect-public-key-umfci
3:48PM INF Client address 192.168.1.37
3:48PM DBG create shadow with debug mode
3:48PM INF shadow template is prepare ready.
3:48PM INF deploy shadow deployment kt-connect-daemon-umfci in namespace default

3:48PM INF pod label: kt=kt-connect-daemon-umfci
3:48PM INF pod: kt-connect-daemon-umfci-846c578bd4-pmxph is running,but not ready
3:48PM INF pod: kt-connect-daemon-umfci-846c578bd4-pmxph is running,but not ready
3:48PM INF pod: kt-connect-daemon-umfci-846c578bd4-pmxph is running,but not ready
3:48PM INF pod: kt-connect-daemon-umfci-846c578bd4-pmxph is running,but not ready
3:48PM INF Shadow pod: kt-connect-daemon-umfci-846c578bd4-pmxph is ready.
3:48PM DBG Child, os.Args = [ktctl -d -n default connect --method=socks5 --cidr 10.100.0.0/16 10.96.0.0/16]
3:48PM DBG Child, name = port-forward, cmd.Args = [kubectl --kubeconfig=/Users/zhangamin/.kube/config -n default port-forward kt-connect-daemon-umfci-846c578bd4-pmxph 2222:22]
Forwarding from 127.0.0.1:2222 -> 22
Forwarding from [::1]:2222 -> 22
3:48PM INF port-forward start at pid: 13387
3:48PM INF wait(5s) port-forward successful
3:48PM INF ==============================================================
3:48PM INF Start SOCKS5 Proxy Successful: export http_proxy=socks5://127.0.0.1:2223
3:48PM INF ==============================================================
Handling connection for 2222
2020/09/23 15:48:32 [ERR] socks: Unsupported SOCKS version: [67]

Environment (please complete the following information):

  • OS: [mac catelina 10.15.6]
  • Kubernetes [v1.18.6]
  • KT Version [0.0.13-rc11]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.