You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Is the change in behavior intentional? i.e. Rancher Desktop 1.11.1 binding to ipv4 only and 1.13.1 binding to ipv6 only.
Is there any available setting in Rancher Desktop that would allow binding ports to both ipv4 and ipv6 (same as kubectl port-forward)?
Alternatively, is there a setting to allow reverting back to version 1.11.1 behavior?
Thank you in advance for any guidance you may provide,
David
I've provided a simple Java Socket program to illustrate the issue:
# Stage 1: Build the Java application
FROM openjdk:11-jdk-slim AS build
# Set the working directory inside the build container
WORKDIR /app
# Copy the Java source code to the build container
COPY SimpleServer.java /app
# Compile the Java source code
RUN javac SimpleServer.java
# Stage 2: Create the final runtime image
FROM openjdk:11-jre-slim
# Set the working directory inside the runtime container
WORKDIR /app
# Copy the compiled class file from the build container
COPY --from=build /app/SimpleServer.class /app
# Expose port 8000 for the application
EXPOSE 8000
# Run the SimpleServer application
CMD ["java", "SimpleServer"]
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:
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:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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