You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "kresimir.horvat" <kr...@deegloo.com> on 2019/03/14 08:50:47 UTC

JMX port for Ignite in docker

Hi,

I have problem with connecting VisualVM to Ignite running in docker. I tried
to run it with command 
/docker run -d -p 50000:50000 --rm -e IGNITE_JMX_PORT="50000" -e
CONFIG_URI="https://raw.githubusercontent.com/apache/ignite/master/examples/config/example-cache.xml"
apacheignite/ignite/
telnet to port 50000 is working but I can't connect with VisualVM.

I also tried to run it with additional flags described in link 
How-to-connect-monitor-ignite-server-through-jmx-client
<http://apache-ignite-users.70518.x6.nabble.com/How-to-connect-monitor-ignite-server-through-jmx-client-td5420.html#a5451>  
result was same as above.
/docker run -d --rm -e
CONFIG_URI="https://raw.githubusercontent.com/apache/ignite/master/examples/config/example-cache.xml"
-e "IGNITE_JMX_PORT=50000" -e JVM_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=50000
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false" apacheignite/ignite/

Can someone point me on what I'm doing wrong?

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: JMX port for Ignite in docker

Posted by "kresimir.horvat" <kr...@deegloo.com>.
I tried running Ignite with given flags.
/docker run -d -p 49112:49112 --rm -e
CONFIG_URI="https://raw.githubusercontent.com/apache/ignite/master/examples/config/example-cache.xml"
-e JVM_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=49112
-Dcom.sun.management.jmxremote.rmi.port=49112
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false" apacheignite/ignite/

VisualVM couldn't connect. Java version in docker is openjdk version
"1.8.0_181"


I managed to run Ignite and connect VisualVM with flags I used for tomcat.
And it only works on port 49112 (I tried with ports 50000 and 50002 with no
success)
/docker run -d -p 49112:49112 --rm -e
CONFIG_URI="https://raw.githubusercontent.com/apache/ignite/master/examples/config/example-cache.xml"
-e JVM_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=49112
-Dcom.sun.management.jmxremote.rmi.port=49112
-Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote.ssl=false"
apacheignite/ignite/




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: JMX port for Ignite in docker

Posted by Dave Harvey <dh...@jobcase.com>.
We had found we needed to change this in ignite.sh along these lines, so we
only had to expose one port out of the container.    Otherwise you need to
expose the RMI port also.

# Newer Java versions (1.8.0_121+) allow the RMI port to be the same port.

if [ -n "$JMX_PORT" ]; then
JMX_MON="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=
${JMX_PORT} -Dcom.sun.management.jmxremote.rmi.port=${JMX_PORT} \
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"

On Mon, Mar 18, 2019 at 9:36 AM newigniter <to...@gmail.com>
wrote:

> I also have a problem with this so if someone can help..!
> Tnx
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.

Re: JMX port for Ignite in docker

Posted by newigniter <to...@gmail.com>.
I also have a problem with this so if someone can help..!
Tnx



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/