kubeshark: Unable to connect at localhost:8899

When I run the command kubeshark tap -A it appears to find my cluster properly and all of the pods. But there are some errors describing issues connecting to proxy. I am unsure how to proceed.

To Reproduce Steps to reproduce the behavior:

  1. Run kubeshark tap -A

Expected behavior Accessing the dashboard with traffic visible at localhost:8899

Logs Upload logs: ➜ ~ kubeshark tap -A --set dump-logs=true 2023-01-10T10:32:53-06:00 INF versionCheck.go:23 > Checking for a newer version… 2023-01-10T10:32:53-06:00 WRN config.go:142 > error=“flag "dump-logs" not found” 2023-01-10T10:32:53-06:00 INF tapRunner.go:45 > Using Docker: registry=docker.io/kubeshark tag=latest 2023-01-10T10:32:53-06:00 INF tapRunner.go:53 > Kubeshark will store the traffic up to a limit (per node). Oldest TCP streams will be removed once the limit is reached. limit=200MB 2023-01-10T10:32:53-06:00 INF common.go:70 > Using kubeconfig: path=/Users/josephtaylor/.kube/config 2023-01-10T10:32:54-06:00 INF tapRunner.go:74 > Targetting pods in: namespaces=[“”] 2023-01-10T10:32:54-06:00 INF tapRunner.go:124 > New pod: application-controller-manager-64446698d9-qbk6b 2023-01-10T10:32:54-06:00 INF tapRunner.go:124 > New pod: application-controller-manager-64446698d9-xqj2l 2023-01-10T10:32:54-06:00 INF tapRunner.go:124 > New pod: cert-manager-677874db78-crn5b 2023-01-10T10:32:54-06:00 INF tapRunner.go:124 > New pod: cert-manager-cainjector-6c5bf7b759-r5ckw 2023-01-10T10:32:54-06:00 INF tapRunner.go:124 > New pod: cert-manager-webhook-5685fdbc4b-ccffg 2023-01-10T10:32:54-06:00 INF tapRunner.go:124 > New pod: analyze-front-cf479bbb5-4ghxb 2023-01-10T10:32:54-06:00 INF tapRunner.go:84 > Waiting for the creation of Kubeshark resources… 2023-01-10T10:32:54-06:00 INF createResources.go:108 > Successfully created a pod. pod=kubeshark-hub 2023-01-10T10:32:55-06:00 INF createResources.go:120 > Successfully created a pod. pod=kubeshark-front 2023-01-10T10:32:55-06:00 INF createResources.go:69 > Successfully created a service. service=kubeshark-hub 2023-01-10T10:32:55-06:00 INF createResources.go:76 > Successfully created a service. service=kubeshark-front 2023-01-10T10:32:55-06:00 INF tapRunner.go:217 > Added pod. pod=kubeshark-hub 2023-01-10T10:32:55-06:00 INF tapRunner.go:297 > Added pod. pod=kubeshark-front 2023-01-10T10:33:00-06:00 INF proxy.go:29 > Starting proxy… namespace=kubeshark service=kubeshark-hub src-port=8898 2023-01-10T10:33:00-06:00 INF proxy.go:29 > Starting proxy… namespace=kubeshark service=kubeshark-front src-port=8899 E0110 10:33:02.027683 88162 proxy_server.go:147] Error while proxying request: context canceled E0110 10:33:03.225715 88162 proxy_server.go:147] Error while proxying request: context canceled E0110 10:33:05.029338 88162 proxy_server.go:147] Error while proxying request: context canceled E0110 10:33:06.227940 88162 proxy_server.go:147] Error while proxying request: context canceled 2023-01-10T10:33:07-06:00 ERR common.go:33 > Couldn’t connect using proxy, stopping proxy and trying to create port-forward… 2023-01-10T10:33:07-06:00 INF proxy.go:117 > Starting proxy using port-forward method… dst-port=80 namespace=kubeshark pod=kubeshark-hub src-port=8899 E0110 10:33:08.031641 88162 proxy_server.go:147] Error while proxying request: context canceled 2023-01-10T10:33:09-06:00 ERR common.go:33 > Couldn’t connect using proxy, stopping proxy and trying to create port-forward… 2023-01-10T10:33:09-06:00 INF proxy.go:117 > Starting proxy using port-forward method… dst-port=8898 namespace=kubeshark pod=kubeshark-hub src-port=8898 E0110 10:33:10.347227 88162 portforward.go:406] an error occurred forwarding 8898 -> 8898: error forwarding port 8898 to pod 2f0ff9cfd9391b4f40dad7b3cc4cbebe3fad5c6767483d3691ab24bc81baf8e9, uid : failed to execute portforward in network namespace “/var/run/netns/cni-86bbad86-840b-0800-0668-25c73a81e893”: failed to connect to localhost:8898 inside namespace “2f0ff9cfd9391b4f40dad7b3cc4cbebe3fad5c6767483d3691ab24bc81baf8e9”, IPv4: dial tcp4 127.0.0.1:8898: connect: connection refused IPv6 dial tcp6 [::1]:8898: connect: cannot assign requested address E0110 10:33:10.347644 88162 portforward.go:234] lost connection to pod 2023-01-10T10:33:10-06:00 ERR common.go:55 > Couldn’t connect to service. error=“Couldn’t reach the URL: http://localhost:8899 after 3 retries!” service=kubeshark-front 2023-01-10T10:33:10-06:00 INF tapRunner.go:444 > Kubeshark is available at: url=http://localhost:8899 2023-01-10T10:33:10-06:00 WRN cleanResources.go:16 > Removing Kubeshark resources… 2023-01-10T10:33:12-06:00 ERR common.go:55 > Couldn’t connect to service. error=“Couldn’t reach the URL: http://localhost:8898 after 3 retries!” service=kubeshark-hub 2023-01-10T10:33:12-06:00 ERR tapRunner.go:432 > Error starting worker syncer error=“failed to get pods in ns: [], context canceled” 2023-01-10T10:33:12-06:00 INF tapRunner.go:437 > Hub is available at: url=http://localhost:8898 ➜ ~

Screenshots N/A

Desktop (please complete the following information):

  • OS: macOS
  • Web Browser: Microsoft Edge

Additional context None

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Actually, I’m getting the same error using the latest version available now (38.5) with EKS and MacOs Ventura. Is anybody having the same behavior in a similar setting?

image

@mertyildiran thanks for pushing this one! there is still an issue with 38.3 and my EKS (macOS 13.1)