Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Issues getting RMI stubs

11 views
Skip to first unread message

Martin Skarsaune

unread,
Oct 2, 2023, 9:25:11 AM10/2/23
to Cryostat Development List
Hi!

I just tried running cryostat-sample to see whether I could get it to connect to some JVM pods in a namespace, however I get the error below.

Any known workaround for this?

Cheers!

Martin

java.util.concurrent.CompletionException: org.openjdk.jmc.rjmx.ConnectionException caused by java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ConfigurationException [Root exception is java.rmi.UnknownHostException: Unknown host: petclinic-5cfdf55b9f-n9hmh; nested exception is: 

java.net.UnknownHostException: petclinic-5cfdf55b9f-n9hmh]

at io.cryostat.net.TargetConnectionManager.lambda$executeConnectedTaskAsync$2(TargetConnectionManager.java:138)

at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)

at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)

at java.base/java.lang.Thread.run(Thread.java:833)

Andrew Azores

unread,
Oct 3, 2023, 10:16:48 AM10/3/23
to cryostat-d...@googlegroups.com
Hi Martin,

On 2023-10-02 09:25, Martin Skarsaune wrote:
> Hi!
>
> I just tried running cryostat-sample to see whether I could get it to
> connect to some JVM pods in a namespace, however I get the error below.
>
> Any known workaround for this?
>
> Cheers!
>
> Martin
>
> java.util.concurrent.CompletionException:
> org.openjdk.jmc.rjmx.ConnectionException caused by java.io.IOException:
> Failed to retrieve RMIServer stub: javax.naming.ConfigurationException
> [Root exception is java.rmi.UnknownHostException: Unknown host:
> petclinic-5cfdf55b9f-n9hmh; nested exception is:
>

Just for a sanity check, could you confirm whether your petclinic Pod
actually matches that hostname? It could be a bug where Cryostat is
discovering the hostname incorrectly, or it could be some other cluster
networking issue where that hostname does exist but is not DNS
resolvable by Cryostat.

Potential workarounds would include:
1. using the Cryostat Agent, but from your other mail thread, you're
also having problems there ( :( )
2. manually adding the target application. Go to the Cryostat UI
Topology view and click the "Book +" icon near the top left. You can
define a custom JMX Service URL to point to your application's Pod or
Service using typical k8s nomenclature [0]. This step would need to be
repeated each time your workload application is scaled up/down or
restarted, or when you add new deployments.

Which version of Cryostat are you running and what kind of k8s cluster
is it deployed on?

[0] https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/

--
Andrew Azores
Principal Software Engineer, Java Monitoring
Red Hat Canada

Reply all
Reply to author
Forward
0 new messages