Replies: 2 comments
-
This is not an answer but a confirmation that the same happens on Rancher Desktop 1.15.1 running on Mac OS Sonoma 14.6.1. |
Beta Was this translation helpful? Give feedback.
-
I'm seeing similar behavior. I have two containers, one I want to be available on my network and the other which I do not. The former works fine. The latter does not, giving me "Connection refused". Running RD 1.16.0. k8s is off. On macOS 14.7.
The exact same scripts work on Linux. Seems like a macOS bug with RD. |
Beta Was this translation helpful? Give feedback.
-
I'm using Rancher Desktop v1.13.1 in a MacBook Pro (m1) running MacOS 14.3.1. I've deployed a Java application in kubernetes and enabled port forwarding via the Rancher Desktop UI.
Trying to connect to the service from a Java client application in the localhost is met with a connection refused message; if I disable port forwarding via UI and enable it via kubectl, it works fine. The output of netstat shows that forwarding via the UI binds the port to ipv6 only, while forwarding via kubectl binds the port to both ipv4 and ipv6.
In version 1.11.1, port forwarding via the UI bound the port to ipv4 only.
Questions:
Thank you in advance for any guidance you may provide,
David
I've provided a simple Java Socket program to illustrate the issue:
SimpleServer.java:
SimpleClient.java
Dockerfile
simple-server.yml
Here are the steps to reproduce and the output:
Build image:
docker build -t test/simple-server:1.0.0 .
Compile client program:
javac SimpleClient.java
Test 1
Run as a simple container:
docker run --rm -p 8000:8000 test/simple-server:1.0.0
Run client:
java SimpleClient
Output:
Received message: success
netstat output:
Test 2
Deploy in kubernetes:
kubectl apply -f simple-server.yml
Enable port forwarding via Rancher Desktop UI
Run client:
java SimpleClient
Output:
Client error: Connection refused
netstat output:
Test 3
Stop port forwarding in the UI, enable port forwarding via kubectl:
kubectl port-forward services/simple-server-service 8000:8000
kubectl output:
Run client:
java SimpleClient
Output:
Received message: success
netstat output:
Downgrading to Rancher Desktop v1.11.1 allows me to enable port forwarding via the UI and connect successfully:
Test 1
Same behavior as in Rancher Desktop v1.13.1
Test 2
Deploy in kubernetes:
kubectl apply -f simple-server.yml
Enable port forwarding via Rancher Desktop UI
Run client:
java SimpleClient
Output:
Received message: success
netstat output:
Test 3
Same behavior as in Rancher Desktop v1.13.1
Beta Was this translation helpful? Give feedback.
All reactions