tilt: Windows10 - Error port-forwarding web (30080 -> 8080): Unable to listen on port 30080

Expected Behavior

Port forwarding should work smoothly in windows machines

Current Behavior

  • Getting the following error when we updated tilt to v0.29 on windows 10 machines. This doesn’t happen on our Mac’s:
Reconnecting... Error port-forwarding...(30080 -> 8080): Unable to listen on port 30080: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp6 [::1]:30080: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.]
  • Potentially related to this ticket 🤔

Steps to Reproduce

  • upgraded to tilt v0.29
  • updated k8s_resources in tiltfile to allow it to handle port forwarding (k8s_resource(workload=‘web’, port_forwards=[‘30080:8080’], labels=‘Front-end’)

Context

tilt doctor Output

Tilt: v0.29.0, built 2022-05-06
System: windows-amd64
---
Docker
- Host: npipe:////./pipe/docker_engine
- Server Version: 20.10.14
- API Version: 1.41
- Builder: 2
- Compose Version: v2.4.1
---
Kubernetes
- Env: docker-desktop
- Context: docker-desktop
- Cluster Name: docker-desktop
- Namespace: default
- Container Runtime: docker
- Version: v1.22.5
- Cluster Local Registry: none

About Your Use Case

  • Our frontend service starts failing to connect to BE and throws network errors; would like to have no failures when using our web service and no issues with port forwarding when on a windows machine
  • Are there any extra setup steps for windows users to get this sorted out?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

I merged #5795 with some updates to the portforwarding code from the k8s client-go upstream but I’m not certain it will eliminate your issue. If you’re able and would like to try with those changes, you can clone tilt and build as mentioned in our CONTRIBUTING guide.

A workaround in the meantime would be to specify 127.0.0.1:30080:8080 in your port forward spec.