tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat JMX connection - Authentication failed.
Date Thu, 13 Jan 2011 13:20:22 GMT
Ziggy wrote:
> Tomcat JMX connection - Authentication failed.
> I am having some problems setting up Tomcat for JMX. I added the following
> properties to CATALINA_OPTS
> -Dcom.sun
> .management.jmxremote.ssl=false"
> And have added the jmxremote.password file in to the conf directory. I wrote
> a client tool that connects to the JMX server running on port 18070. When i
> run the client program i get the following error.
> Exception in thread "main" java.lang.SecurityException: Authentication
> failed! Credentials required
>         at

Ok, so how does your client provide a username and password to the server's JMX interface,

when it connects ?

> If i change the CATALINA_OPTS properties to
> -Dcom.sun
> .management.jmxremote.ssl=false
> Then it works fine.

Of course, since then there is no authentication required.

  I think what i am confused of is what is classed as
> remote access. I am running the client program away from the Tomcat instance
> but both Tomcat and the client tool are on the same machine (i.e. different
> virtual machines but same environemnt). I thought i had to configure the
> remote authentication if i access the JMX server remotely from a different
> machine.
> By remote access do they mean accessing the JMX server from any VM either
> locally on the same machine or remotely from a different machine?
I believe that in this context, "remote" just means "via a TCP/IP connection".
It does not matter if your client is on the same host or not.  If it accesses the "server"

via TCP/IP, then it counts as remote.

There is another way to connect, limited to local processes running on the same host, but

I forget how it is called or how it works.
You can see the distinction pretty clearly by using the "jconsole" application, which is 
included in the JDK.

Note : for the "remote" kind of access, there is another (second) TCP connection used, 
separate from the port which you indicate with the jmxremote.port parameter.
If you are on the same host, it does not matter, but if you really need to connect from 
another host through a firewall or so, it may.
You may want to have a look here for more info :
(see the section :  Monitoring Applications through a Firewall)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message