Local port forwarding failing
See original GitHub issueDescribe the issue:
I’m consistently getting “kubectl port forward failed” from port_forward_service
using the standard KubeCluster
class to create an ad hoc cluster. When this happens the port forward is successfully setup and I can connect via the port that is opened, but the is_comm_open
check returns false. sock.connect_ex((ip, port))
is always returning code 22 which is essentially “invalid input”. If I change the is_comm_open
check to:
if await is_comm_open("", local_port, retries=100): # pass an empty string instead of localhost
it began to temporarily work, but after about 30 minutes that also began to fail.
Minimal Complete Verifiable Example:
I’m seeing this on a very basic setup (environment posted below):
pod_spec = make_pod_spec(image='ghcr.io/dask/dask:latest',
memory_limit='4G', memory_request='4G',
cpu_limit=1, cpu_request=1)
n_workers = 4
with KubeCluster(
pod_template=pod_spec,
name="test",
n_workers=3
) as cluster:
Environment:
- Dask version: 2022.9.1
- Dask-kubernetes version: 2022.7.0
- Python version: 3.8
- Operating System: MacOS 12.6
- Install method (conda, pip, source): conda
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
What to do if port forwarding does not work - Keenetic
1. When setting up port forwarding, it is necessary to have a public IP address on the router's WAN interface through which it...
Read more >Why Is Port Forwarding Not Working? Here's How To Fix
How To Fix Port Forwarding Not Working · Check for Errors in the Configuration Settings · Restart Your Router · Examine Internet Connection...
Read more >Why port forwarding feature is not working on my Wi-Fi router ...
Step 1: Make sure the server is accessible from the internal network · Step 2: Check the port forwarding settings in the router....
Read more >How To Troubleshoot Port Forwarding Issues
First, use the default port is working for remote connect (port 8080). Then, test the port you are trying to forward. If some...
Read more >ssh local port forwarding not working [duplicate] - Super User
I have a computer in a location A, let's call it host-A. I have a computer in a location B (host-B) running an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That seems to resolve it for me as well. I’d suggest the following instead of the explicit closure.
Thanks for looking at this @baswelsh I’d love to see a PR with this. Totally agree with @semnooij that a context manager is a nice way to handle this.