-
I'm trying to connect JDK Mission Control to a Java app (using microsoft/openjdk) running on AKS v1.27.9.
kubectl port-forward -n testing pod/<pod_name> 9010:jmx
Forwarding from 127.0.0.1:9010 -> 9010
Forwarding from [::1]:9010 -> 9010
Handling connection for 9010
E0403 14:12:45.950407 2290 portforward.go:409] an error occurred forwarding 9010 -> 9010:
error forwarding port 9010 to pod 693cfe5a67379a549c62b23e8b78414e41f9443d9da89225b39e9e7c7891d142, uid :
failed to execute portforward in network namespace "/var/run/netns/cni-687066f0-fd88-0d91-3af7-2dea8495bb13":
failed to connect to localhost:9010 inside namespace "693cfe5a67379a549c62b23e8b78414e41f9443d9da89225b39e9e7c7891d142",
IPv4: dial tcp4 127.0.0.1:9010: connect: connection refused IPv6 dial tcp6: address localhost: no suitable address found
error: lost connection to pod
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@dkirrane Apologies for missing this Q! I've got some generic K8S advice that you can try, but if that doesn't help resolve the issue I'll put you in touch with the AKS team. To debug and resolve the connection issue you are experiencing when attempting to connect Java Mission Control (JMC) to your JVM running in an Azure Kubernetes Service (AKS) environment, you can follow these troubleshooting steps. These steps are designed to identify common issues related to network configuration, service exposure, and pod accessibility: 1. Validate Pod Status and LogsFirst, ensure that your JVM pod is running and healthy:
2. Confirm Port Exposure and Service ConfigurationEnsure that the correct port (9010 in your case) is exposed and configured properly in your Kubernetes deployment or service:
3. Firewall and Network PoliciesCheck if there are any network policies or firewalls that might be blocking the connection:
4. Check IP Address and ConnectivitySince the error indicates issues connecting to
5. Reconfigure and Retry Port ForwardingSometimes, specifying the IP explicitly can resolve connection issues:
6. Inspect Kubernetes EventsKubernetes events can provide clues about what might be going wrong:
7. Use
|
Beta Was this translation helpful? Give feedback.
@dkirrane Apologies for missing this Q! I've got some generic K8S advice that you can try, but if that doesn't help resolve the issue I'll put you in touch with the AKS team.
To debug and resolve the connection issue you are experiencing when attempting to connect Java Mission Control (JMC) to your JVM running in an Azure Kubernetes Service (AKS) environment, you can follow these troubleshooting steps. These steps are designed to identify common issues related to network configuration, service exposure, and pod accessibility:
1. Validate Pod Status and Logs
First, ensure that your JVM pod is running and healthy:
Check Pod Status:
Replace
<namespace>
with …