-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Marcin,

On 9/11/13 2:29 PM, Marcin Domański wrote:
> Hi there! I am trying to setup a Tomcat instance using only
> specific address for all communications. This is convenient for us
> from the point of IPsec. I was able to succeed in http, https, ajp,
> etc. but for JMX I still cannot get it right. For this example,
> let's assume, my desired address is 127.2.0.1. Currently my
> configuration is as follows:
> 
> - <Listener 
> className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" 
> rmiRegistryPortPlatform="9012" rmiServerPortPlatform="9013" 
> useLocalPorts="true" />
> 
> 
> Which allows to connect to the server at
> "service:jmx:rmi:///jndi/rmi:// 127.2.0.1:9012/jmxrmi but also
> localhost (means I cannot run second instance with different IP)

Hmm. I would have expected "useLocalPorts" to bind only to 127.0.0.1
(i.e. localhost). What does netstat tell you under this configuration?

> On the other hand,when I try following:
> 
> - <Listener 
> className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" 
> rmiRegistryPortPlatform="9012" rmiServerPortPlatform="9013" 
> useLocalPorts="true" rmiBindAddress="127.2.0.1"/>
> 
> On Windows machine I get a network error basically saying there is
> no server configured at localhost in
> JmxRemoteLifecycleListener:304.

You get this on startup? Post the full stack trace, please.

What do you have in /etc/hosts (or the win32 equivalent)?

What happens if you do rmiBindAddress="127.2.0.1" and don't specify
useLocalPorts="true" (I believe the former essentially covers the latter)?

> Here's the code : 
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina-jmx-remote/7.0.42/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java#304
>
> 
According
> to that it seems that both Tomcat RMI server and registry must be 
> accessible on localhost when using JmxRemoteLifecycleListener. Is
> it true?

useLocalPorts="true" means that Tomcat will use "localhost" as the
binding host address. If you don't have "localhost" defined anywhere
(usually /etc/hosts), then the IP lookup will fail.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSMdp3AAoJEBzwKT+lPKRYNl4QAJbbOhlb4Sjj1JN5IfP9GFhj
IWACAiwnpvAnhwft86HJHzLPWP4i2+OLcRmko1txZv3xmP+KtdsFEe2g4dxhPeHd
Ud9U3vXrf4iroBy5GssTdx0yF7NHBIvmI6yM0ec72Mm/OunPHJAfsBJsKTRczM1P
mv+u40WacuyoTqMtAwpb8y3skhQXq1gAS53nrlleWM80xhx7vmdEo27S5JRk00hq
g7hyENYWHfvxnctiIlwmY1e2nnLvp8+donxDBYwuGI4mQj9U8+kcl+zrt1V1d1ZM
la4snyHhZM+VpLCDmF9xu5Qr2BC7Wu9BYZjC6jRv6EfqjkfymJd3KnasnLy62SkL
0pqka6KM1+j5kwXCLDdqnzB210pT2yGzcZN/uki+cSZHaZ1m7d+eBXmtH+FkrULN
SYEPrcd3OCtkBE7wkV5JnAuArso/Pq70My9C4J/2R5cLqgFzq2gdSAKLz9gx3Cm0
tofye1Iceci/wEIXsdvvevMImLtVaqPMFjDH9KhMx8Wa0JFBx6u50JhIlehdrwD+
j/nqwB7pyeCMwz5cN9BTWXLA42qxiRw5hQfhMqsyhwT1vmXhEhzkG2KV+mkqtB7P
FIhFmliRJLS9WXObjmpJQep13idPk/mbdLxXZIIzjpsk85gV0hndIZuszhiZGHe0
p1NjpJjVvbR7t2AHuOFr
=e0yo
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to