jbonofre wrote
> in etc/org.apache.karaf.management.cfg, did you try to provide the
> docker interface ?
No. And I also don't quite understand how that should work, as the IP of the
container is not known to the outside world. Anyway, this is what I did...
System props:
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=$DOCKERHOST_HOSTNAME
org.apache.karaf.management.cfg:
rmiRegistryHost = $DOCKER_CONTAINER_IP
rmiServerHost = $DOCKER_CONTAINER_IP
New connection in jconsole: $DOCKERHOST_HOSTNAME:1099
(1099 on the host is forwarded to 1099 in the container)
Result:
Caused by: java.rmi.NotBoundException: jmxrmi
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:166)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at
sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:411)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:272)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:378)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at sun.tools.jconsole.ProxyClient.checkSslConfig(ProxyClient.java:234)
... 3 more
If I change this to
rmiRegistryHost = $DOCKER_HOST_IP
rmiServerHost = $DOCKER_HOST_IP
I get
java.rmi.ConnectIOException: error during JRMP connection establishment;
nested exception is:
java.io.EOFException
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:304)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at sun.tools.jconsole.ProxyClient.checkSslConfig(ProxyClient.java:234)
at sun.tools.jconsole.ProxyClient.<init>(ProxyClient.java:127)
at sun.tools.jconsole.ProxyClient.getProxyClient(ProxyClient.java:483)
at sun.tools.jconsole.JConsole$3.run(JConsole.java:524)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:246)
... 7 more
Ralf
--
View this message in context:
http://karaf.922171.n3.nabble.com/How-to-authorize-remote-JMX-access-tp4049177p4049189.html
Sent from the Karaf - User mailing list archive at Nabble.com.