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 add subnet #3639

Open
qiaoenxin opened this issue Jul 2, 2024 · 5 comments
Open

failed to add subnet #3639

qiaoenxin opened this issue Jul 2, 2024 · 5 comments

Comments

@qiaoenxin
Copy link

qiaoenxin commented Jul 2, 2024

Describe the bug
A clear and concise description of what the bug is.
Telepresence connect failed.

telepresence_logs.zip

2024-07-02 18:46:34.8275 info    ---
2024-07-02 18:46:34.8275 info    Telepresence daemon v2.18.0 (api v3) starting...
2024-07-02 18:46:34.8280 info    PID is 132328
2024-07-02 18:46:34.8280 info    
2024-07-02 18:46:34.9322 info    daemon/server-grpc : gRPC server started
2024-07-02 18:46:43.4480 info    daemon/session : -- Starting new session
2024-07-02 18:46:43.6156 info    daemon/session : Connected to OSS Traffic Manager v2.18.0
2024-07-02 18:46:43.6156 info    daemon/session : Connected to Manager 2.18.0
2024-07-02 18:46:43.6185 info    daemon/session : also-proxy subnets []
2024-07-02 18:46:43.6185 info    daemon/session : never-proxy subnets [170.18.9.17/32]
2024-07-02 18:46:43.6185 info    daemon/session : allow-conflicting subnets []
2024-07-02 18:46:43.6195 info    daemon/session : Configuration reloaded
2024-07-02 18:46:43.6225 info    daemon/session/network : also-proxy subnets []
2024-07-02 18:46:43.6225 info    daemon/session/network : never-proxy subnets [170.18.9.17/32]
2024-07-02 18:46:43.6225 info    daemon/session/network : allow-conflicting subnets []
2024-07-02 18:46:44.1227 info    daemon/session/network : Adding service subnet 241.254.0.0/16
2024-07-02 18:46:44.1232 info    daemon/session/network : Adding pod subnet 241.255.0.0/24
2024-07-02 18:46:44.1371 info    daemon/session/network : Creating interface tel0
2024-07-02 18:46:44.2365 info    stdlog : Using existing driver 0.14
2024-07-02 18:46:44.2432 info    stdlog : Creating adapter
2024-07-02 18:46:44.6652 info    daemon/session/network : Setting cluster DNS to 241.255.0.17
2024-07-02 18:46:44.6652 info    daemon/session/network : Setting cluster domain to "cluster.local."
2024-07-02 18:46:44.6652 info    daemon/session/network : Dropping never-proxy "170.18.9.17/32" because it is not routed
2024-07-02 18:46:44.6671 info    daemon/session/network : Starting Endpoint
2024-07-02 18:46:46.6563 error   daemon/session/network : failed to add subnet 241.254.0.0/16: The parameter is incorrect.
2024-07-02 18:46:46.6563 error   daemon/session/network : failed to add subnet 241.255.0.0/24: The parameter is incorrect.
2024-07-02 18:47:06.7869 error   daemon/session/dns/SearchPaths : DNS doesn't seem to work properly

To Reproduce
Steps to reproduce the behavior:
The kubernetes service subnet is 241.254.0.0/16.
The kubernetes pod subnet is 241.255.0.0/16.

Expected behavior
A clear and concise description of what you expected to happen.

Versions (please complete the following information):

  • Output of telepresence version
OSS Client     : v2.18.0
OSS Root Daemon: v2.18.0
OSS User Daemon: v2.18.0
Traffic Manager: not connected
  • Operating system of workstation running telepresence commands
OS: Windows 10 家庭中文版
Version: 22H2
  • Kubernetes environment and Version [e.g. Minikube, bare metal, Google Kubernetes Engine]
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.6", GitCommit:"8a62859e515889f07e3e3be6a1080413f17cf2c3", GitTreeState:"clean", BuildDate:"2021-04-15T03:28:42Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.6", GitCommit:"8a62859e515889f07e3e3be6a1080413f17cf2c3", GitTreeState:"clean", BuildDate:"2021-04-15T03:19:55Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
@cindymullins-dw
Copy link
Collaborator

Hi @qiaoenxin , can you check your IP table (netstat -rn) to see if Telepresence added subnets / routes. If it added the routes it will add your pod subnets and your service subnets in your cluster, so we'd like to check that first.

Can you also share the output of ‘telepresence connect’?

@cindymullins-dw
Copy link
Collaborator

We would also recommend trying telepresence quit -s, which you might have to do multiple times to remove old root daemon processes. If that doesn't help, try checking for any old Telepresence processes and manually killing them.

@thallgren
Copy link
Member

Hey @qiaoenxin , can you please try setting the loglevel to debug in your %APPDATA%\telepresence\config.yml then do a telepresence quit followed by a telepresence connect and provide logs again?

The entry should look like this:

logLevels:
  userDaemon: debug
  rootDaemon: debug

@qiaoenxin
Copy link
Author

qiaoenxin commented Jul 25, 2024

Hi @qiaoenxin , can you check your IP table (netstat -rn) to see if Telepresence added subnets / routes. If it added the routes it will add your pod subnets and your service subnets in your cluster, so we'd like to check that first.

Can you also share the output of ‘telepresence connect’?

@cindymullins-dw @thallgren

I try to do that. The subnets / routes do not exist.

          0.0.0.0          0.0.0.0   192.168.31.254    192.168.30.54     35
        127.0.0.0        255.0.0.0            在链路上         127.0.0.1    331
        127.0.0.1  255.255.255.255            在链路上         127.0.0.1    331
  127.255.255.255  255.255.255.255            在链路上         127.0.0.1    331
      169.254.0.0      255.255.0.0            在链路上     169.254.97.92    261
    169.254.97.92  255.255.255.255            在链路上     169.254.97.92    261
  169.254.255.255  255.255.255.255            在链路上     169.254.97.92    261
     192.168.11.0    255.255.255.0            在链路上      192.168.11.1    291
     192.168.11.1  255.255.255.255            在链路上      192.168.11.1    291
   192.168.11.255  255.255.255.255            在链路上      192.168.11.1    291
     192.168.30.0    255.255.254.0            在链路上     192.168.30.54    291
    192.168.30.54  255.255.255.255            在链路上     192.168.30.54    291
   192.168.31.255  255.255.255.255            在链路上     192.168.30.54    291
     192.168.56.0    255.255.255.0            在链路上      192.168.56.1    291
     192.168.56.1  255.255.255.255            在链路上      192.168.56.1    291
   192.168.56.255  255.255.255.255            在链路上      192.168.56.1    291
        224.0.0.0        240.0.0.0            在链路上         127.0.0.1    331
        224.0.0.0        240.0.0.0            在链路上      192.168.56.1    291
        224.0.0.0        240.0.0.0            在链路上      192.168.11.1    291
        224.0.0.0        240.0.0.0            在链路上     192.168.30.54    291
        224.0.0.0        240.0.0.0            在链路上     169.254.97.92    261
  255.255.255.255  255.255.255.255            在链路上         127.0.0.1    331
  255.255.255.255  255.255.255.255            在链路上      192.168.56.1    291
  255.255.255.255  255.255.255.255            在链路上      192.168.11.1    291
  255.255.255.255  255.255.255.255            在链路上     192.168.30.54    291
  255.255.255.255  255.255.255.255            在链路上     169.254.97.92    261


C:\Users\qiaoenxin>telepresence connect
Launching Telepresence User Daemon
Launching Telepresence Root Daemon
telepresence connect: error: connector.Connect: failed to connect to root daemon: rpc error: code = DeadlineExceeded desc = context deadline exceeded

See logs for details (2 errors found): "C:\\Users\\qiaoenxin\\AppData\\Local\\telepresence\\logs\\daemon.log"
If you think you have encountered a bug, please run `telepresence gather-logs` and attach the telepresence_logs.zip to your github issue or create a new one: https://github.com/telepresenceio/telepresence/issues/new?template=Bug_report.md .

C:\\Users\\qiaoenxin\\AppData\\Local\\telepresence\\logs\\daemon.log

2024-07-25 14:11:33.6587 info    ---
2024-07-25 14:11:33.6587 info    Telepresence daemon v2.18.0 (api v3) starting...
2024-07-25 14:11:33.6587 info    PID is 15240
2024-07-25 14:11:33.6587 info    
2024-07-25 14:11:33.6603 debug   Listener opened
2024-07-25 14:11:33.7337 info    daemon/server-grpc : gRPC server started
2024-07-25 14:11:37.8230 debug   daemon/server-grpc/conn=4 : Received gRPC Connect
2024-07-25 14:11:37.8230 info    daemon/session : -- Starting new session
2024-07-25 14:11:37.8251 debug   daemon/session : k8sPortForwardDialer.Dial(ctx, "svc/traffic-manager.ambassador:api")
2024-07-25 14:11:37.8507 debug   daemon/session : k8sPortForwardDialer.dial(ctx, Pod./traffic-manager-7474bbb694-tgdd6.ambassador, 8081)
2024-07-25 14:11:37.8512 debug   daemon/session : k8sPortForwardDialer.spdyDial(ctx, Pod./traffic-manager-7474bbb694-tgdd6.ambassador)
2024-07-25 14:11:37.9466 info    daemon/session : Connected to OSS Traffic Manager v2.18.0
2024-07-25 14:11:37.9466 info    daemon/session : Connected to Manager 2.18.0
2024-07-25 14:11:37.9503 debug   daemon/session : Creating session with id session_id:"a67ab01b-1289-4bfa-bd44-a07adb5fb471"  cluster_id:"589f450c-a912-448d-b27e-b7434fb20b30"  install_id:"6c73228c-81c1-4b9b-b212-bef06c778195"
2024-07-25 14:11:37.9503 info    daemon/session : also-proxy subnets []
2024-07-25 14:11:37.9503 info    daemon/session : never-proxy subnets [170.18.9.17/32]
2024-07-25 14:11:37.9503 info    daemon/session : allow-conflicting subnets []
2024-07-25 14:11:37.9514 info    daemon/session : Configuration reloaded
2024-07-25 14:11:37.9514 debug   daemon/session : Returning session from new session session_id:"a67ab01b-1289-4bfa-bd44-a07adb5fb471"  cluster_id:"589f450c-a912-448d-b27e-b7434fb20b30"  install_id:"6c73228c-81c1-4b9b-b212-bef06c778195"
2024-07-25 14:11:37.9556 info    daemon/session/network : also-proxy subnets []
2024-07-25 14:11:37.9556 info    daemon/session/network : never-proxy subnets [170.18.9.17/32]
2024-07-25 14:11:37.9556 info    daemon/session/network : allow-conflicting subnets []
2024-07-25 14:11:37.9556 debug   daemon/session/network : Performing pod connectivity check on IP 241.255.0.164 with timeout 500ms
2024-07-25 14:11:37.9576 debug   daemon/session/agentPods : WatchAgentPods starting
2024-07-25 14:11:38.4711 debug   daemon/session/network : Will proxy pods (context deadline exceeded)
2024-07-25 14:11:38.4711 debug   daemon/session/network : Performing service connectivity check on https://241.254.79.250:443/healthz with Host agent-injector.ambassador and timeout 500ms
2024-07-25 14:11:38.4717 debug   daemon/session/network : Will proxy services (Get "https://241.254.79.250:443/healthz": dial tcp 241.254.79.250:443: connectex: A socket operation was attempted to an unreachable network.)
2024-07-25 14:11:38.4717 debug   daemon/session/network : WatchClusterInfo update
2024-07-25 14:11:38.4717 info    daemon/session/network : Adding service subnet 241.254.0.0/16
2024-07-25 14:11:38.4717 info    daemon/session/network : Adding pod subnet 241.255.0.0/24
2024-07-25 14:11:38.4863 info    daemon/session/network : Creating interface tel0
2024-07-25 14:11:38.5774 info    stdlog : Using existing driver 0.14
2024-07-25 14:11:38.5871 info    stdlog : Creating adapter
2024-07-25 14:11:39.1399 info    daemon/session/network : Setting cluster DNS to 241.255.0.164
2024-07-25 14:11:39.1399 info    daemon/session/network : Setting cluster domain to "cluster.local."
2024-07-25 14:11:39.1410 info    daemon/session/network : Dropping never-proxy "170.18.9.17/32" because it is not routed
2024-07-25 14:11:39.1449 info    daemon/session/network : Starting Endpoint
2024-07-25 14:11:39.1981 info    stdlog : Removed orphaned adapter "tel0 1"
2024-07-25 14:11:41.0442 error   daemon/session/network : failed to add subnet 241.254.0.0/16: The parameter is incorrect.
2024-07-25 14:11:41.0442 error   daemon/session/network : failed to add subnet 241.255.0.0/24: The parameter is incorrect.
2024-07-25 14:11:41.0442 debug   daemon/session/dns/Server : SetDNS clusterDomain: "cluster.local.", server: 241.255.0.164, searchList: [tel2-search]
2024-07-25 14:11:41.0453 debug   daemon/session/dns/Server : setting registry value System\CurrentControlSet\Services\Tcpip\Parameters\SearchList to tel2-search
2024-07-25 14:11:41.0649 debug   daemon/session/dns/Server : SetDNS done
2024-07-25 14:11:41.0649 debug   daemon/session/dns/SearchPaths : Performing initial recursion check with tel2-recursion-check.tel2-search
2024-07-25 14:12:01.2935 error   daemon/session/dns/SearchPaths : DNS doesn't seem to work properly
2024-07-25 14:12:01.2935 debug   daemon/session/dns/SearchPaths : Recursion check finished

@thallgren
Copy link
Member

I would suggest you do the following:

  1. Uninstall the current Telepresence client
  2. Ensure that you don't have a wintun.dll anywhere on your path. If you do, delete it
  3. Install the OSS Telepresence 2.19.1 client
  4. Try connecting again

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

3 participants