0

I try configure jmx according this instruction: http://activemq.apache.org/jmx.html On localhost all works well. But when i try connect to FreeBSD server over VPN jconsole can't establish connection.

I use such settings for ACTIVEMQ_SUNJMX_START variable:

ACTIVEMQ_SUNJMX_START=" -Dcom.sun.management.jmxremote.port=1616

-Dcom.sun.management.jmxremote.ssl=false

-Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password

-Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access

-Djava.rmi.server.hostname=vpn_id_address

-Dcom.sun.management.jmxremote.local.only=false"

What i do wrong?

Hayate
  • 653
  • 1
  • 9
  • 25
  • Possible dupe http://stackoverflow.com/questions/1263991/connecting-remote-tomcat-jmx-instance-using-jconsole or http://stackoverflow.com/questions/151238/has-anyone-ever-got-a-remote-jmx-jconsole-to-work . – dave_thompson_085 Mar 30 '16 at 23:28

2 Answers2

0
  1. Confirm the port is listening, using netstat or other tool.

netstat -na | grep 1616
... should show an entry as LISTENING

  1. Try to telnet to the port and send garbage. The server will disconnect you

$ telnet localhost 1099

Trying ::1...

Connected to localhost.

Escape character is '^]'.

garbage

Connection closed by foreign host.

  1. There are a million other reasons why it may not be working. Firewall settings on the server, VPN port mapping, etc.. etc.. Until #1 and #2 are confirmed there isn't anything else to go on.
Community
  • 1
  • 1
Matt Pavlovich
  • 4,087
  • 1
  • 9
  • 17
  • Note JMX uses **two** ports, `.jmxremote.port` default 1099 for the RMIregistry and `.jmxremote.rmi.port` default transient for the data, and both must be listening and reachable. But over VPN (unlike public/NAT access) I wouldn't expect a net-level problem. – dave_thompson_085 Mar 30 '16 at 23:29
0

open command prompt/terminal then type: jconsole

then your jconsole will open and connect to activemq from it

service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

RB7
  • 435
  • 7
  • 9