On Tue, Apr 9, 2013 at 10:15 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Neven,
>
> On 4/7/13 3:15 PM, Neven Cvetkovic wrote:
> > Mark,
> >
> > When connecting to local jmx, connection is not over the network
> > interface but through local Java process that you need to have
> > access to. So I doubt that is Jakub's problem here.
> >
> > I've had issues when jdks didn't match and when different users
> > were used to start JVM process.
>
> This might be the issue: if the JVM versions of the target process
> (e.g. Tomcat) and the connecting process (e.g. jvisualvm) are not the
> same, then the Attach API (local only) probably will fail.
>
> On the other hand, using "remote JMX" access, two different JVMs ought
> to be able to communicate because they are just using RMI to trade
> objects that are fairly well-defined and stable.


Chris,

That was exactly the issue and explains why system worked when going over
REMOTE JMX ports, and not for local connections.

Tomcat startup used JRE (that comes with windows, since
%SystemRoot%\system32 was defined in path before %JAVA_HOME%\bin) and
JConsole and JVisualVM used JDK (only defined in %JAVA_HOME%\bin) and those
were different versions and that caused the local connection failure.

However, when JMX REMOTE ports were defined and attached to JVM, JConsole
(of different JVM version) was able to connect to REMOTE JVM using well
defined JMX API.

:)

Reply via email to