Skip to main content
added 1 character in body
Source Link
Venryx
  • 346
  • 2
  • 9

The answer by @yoshpe (relating to Hyper-V) is one potential cause of the issue.

However, the issue was different for me. In my case, it's because Windows started with its "dynamic ports" configured to start at port 1025 and end at port 5000. Because of this, when Docker Desktop started up, it would reserve its ports within the 1025-5000 port range, which was (sometimes!) conflicting with the ports that my own programs were configured to reserve/use. (for port-forwarding from my local Kubernetes cluster to localhost)

To see if your dynamic-ports is set incorrectly, you can run:

netsh int ipv4 show dynamicport tcp

If you see Start Port: 1025, then the dynamic-ports range is misconfigured. To fix it, you'll need to set it to a more sensible range -- avoiding the <10k ports. (which is typically where devs place their own apps)

To set it to the recommended range: (if your issue is with ipv6, then adjust the command accordinglyreplace ipv4 with ipv6 iirc)

netsh int ipv4 set dynamic tcp start=49152 num=16384

For more info, see here: https://stackoverflow.com/a/62359555/2441655

The answer by @yoshpe (relating to Hyper-V) is one potential cause of the issue.

However, the issue was different for me. In my case, it's because Windows started with its "dynamic ports" configured to start at port 1025 and end at port 5000. Because of this, when Docker Desktop started up, it would reserve its ports within the 1025-5000 port range, which was (sometimes!) conflicting with the ports that my own programs were configured to reserve/use. (for port-forwarding from my local Kubernetes cluster to localhost)

To see if your dynamic-ports is set incorrectly, you can run:

netsh int ipv4 show dynamicport tcp

If you see Start Port: 1025, then the dynamic-ports range is misconfigured. To fix it, you'll need to set it to a more sensible range -- avoiding the <10k ports. (which is typically where devs place their own apps)

To set it to the recommended range: (if your issue is with ipv6, then adjust the command accordingly)

netsh int ipv4 set dynamic tcp start=49152 num=16384

For more info, see here: https://stackoverflow.com/a/62359555/2441655

The answer by @yoshpe (relating to Hyper-V) is one potential cause of the issue.

However, the issue was different for me. In my case, it's because Windows started with its "dynamic ports" configured to start at port 1025 and end at port 5000. Because of this, when Docker Desktop started up, it would reserve its ports within the 1025-5000 port range, which was (sometimes!) conflicting with the ports that my own programs were configured to reserve/use. (for port-forwarding from my local Kubernetes cluster to localhost)

To see if your dynamic-ports is set incorrectly, you can run:

netsh int ipv4 show dynamicport tcp

If you see Start Port: 1025, then the dynamic-ports range is misconfigured. To fix it, you'll need to set it to a more sensible range -- avoiding the <10k ports. (which is typically where devs place their own apps)

To set it to the recommended range: (if your issue is with ipv6, then replace ipv4 with ipv6 iirc)

netsh int ipv4 set dynamic tcp start=49152 num=16384

For more info, see here: https://stackoverflow.com/a/62359555/2441655

Source Link
Venryx
  • 346
  • 2
  • 9

The answer by @yoshpe (relating to Hyper-V) is one potential cause of the issue.

However, the issue was different for me. In my case, it's because Windows started with its "dynamic ports" configured to start at port 1025 and end at port 5000. Because of this, when Docker Desktop started up, it would reserve its ports within the 1025-5000 port range, which was (sometimes!) conflicting with the ports that my own programs were configured to reserve/use. (for port-forwarding from my local Kubernetes cluster to localhost)

To see if your dynamic-ports is set incorrectly, you can run:

netsh int ipv4 show dynamicport tcp

If you see Start Port: 1025, then the dynamic-ports range is misconfigured. To fix it, you'll need to set it to a more sensible range -- avoiding the <10k ports. (which is typically where devs place their own apps)

To set it to the recommended range: (if your issue is with ipv6, then adjust the command accordingly)

netsh int ipv4 set dynamic tcp start=49152 num=16384

For more info, see here: https://stackoverflow.com/a/62359555/2441655