HI,

I started the container using bare 4.3.0 image pulled from Docker hub:

docker run -p 1099:1099 -p 44444:44444 apache/karaf:4.3.0

This is output from Docker ps command:

e5492ba6143a        apache/karaf:4.3.0
"karaf run"              15 seconds ago      Up 13 seconds
8101/tcp, 0.0.0.0:1099->1099/tcp, 0.0.0.0:44444->44444/tcp, 8181/tcp
blissful_mahavira

When I try to connect from Visual VM, there are errors logged:

14:55:56.962 WARN  [RMI TCP Accept-44444] RMI TCP Accept-44444: accept loop
for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=44444] throws
java.io.IOException: Only connections from clients running on the host
where the RMI remote objects have been exported are accepted.
at
org.apache.karaf.management.ConnectorServerFactory.checkLocal(ConnectorServerFactory.java:900)
at
org.apache.karaf.management.ConnectorServerFactory.access$000(ConnectorServerFactory.java:67)
at
org.apache.karaf.management.ConnectorServerFactory$LocalOnlyServerSocket.accept(ConnectorServerFactory.java:646)
at
java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unknown
Source)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown
Source)
at java.base/java.lang.Thread.run(Unknown Source)

I gave the JConsole a try, it fails to connect as well. Every time I try to
connect, the above exception is logged.

Regards

wt., 9 lut 2021 o 14:15 Jean-Baptiste Onofre <[email protected]> napisał(a):

> And you set both registry and transport ports ?
>
> It’s seems that the 44444 is not bound.
>
> What’s the service URL you have in etc/org.apache.karaf.management.cfg ?
>
> Regards
> JB
>
> Le 9 févr. 2021 à 14:01, Daniel Las <[email protected]> a écrit :
>
> Hi,
>
> Yes, I did.
>
> Regards
>
> wt., 9 lut 2021 o 13:59 Jean-Baptiste Onofre <[email protected]> napisał(a):
>
>> Hi,
>>
>> Did you bind the JMX ports on docker ? (Like docker run -p 1099:1099 -p
>> 44444:44444 …)
>>
>> Regards
>> JB
>>
>> Le 9 févr. 2021 à 13:27, Daniel Las <[email protected]> a écrit :
>>
>> Hi,
>>
>> I'm running a custom distribution based on Karaf 4.2.9 in docker. How
>> should I configure it to allow JMX access?
>>
>> I tried to set host IP in rmiRegistryHost and rmiServerHost
>> in org.apache.karaf.management.cfg but I can't connect to it from JMX
>> client. Without it I see errors in log when JMX client attempts to connect:
>>
>> 2021-02-09T12:12:17,275 | WARN  | RMI TCP Accept-44444 | tcp
>>                  | 3 - org.ops4j.pax.logging.pax-logging-api - 1.11.7 | RMI
>> TCP Accept-44444: accept loop for ServerSocket[addr=
>> 0.0.0.0/0.0.0.0,localport=44444] throws
>> java.io.IOException: Only connections from clients running on the host
>> where the RMI remote objects have been exported are accepted.
>> at
>> org.apache.karaf.management.ConnectorServerFactory.checkLocal(ConnectorServerFactory.java:900)
>> ~[?:?]
>> at
>> org.apache.karaf.management.ConnectorServerFactory.access$000(ConnectorServerFactory.java:67)
>> ~[?:?]
>> at
>> org.apache.karaf.management.ConnectorServerFactory$LocalOnlyServerSocket.accept(ConnectorServerFactory.java:646)
>> ~[?:?]
>> at
>> sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unknown
>> Source) [?:?]
>> at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source) [?:?]
>> at java.lang.Thread.run(Unknown Source) [?:?]
>>
>> Best regards
>> --
>> Daniel Łaś
>> CTO at Empirica S.A.
>> +48 695 616181
>>
>>
>>
>
> --
> Daniel Łaś
> CTO at Empirica S.A.
> +48 695 616181
>
>
>

-- 
Daniel Łaś
CTO at Empirica S.A.
+48 695 616181

Reply via email to