Further investigations.
Setting org.apache.karaf.management.cfg with:
rmiRegistryPort = 1100
rmiServerPort = 44445
rmiRegistryHost = ${default.interface}
rmiServerHost = ${default.interface}
serviceUrl =
service:jmx:rmi://${default.interface}:${rmiServerPort}/jndi/rmi://${default.interface}:${rmiRegistryPort}/karaf-${karaf.name}
Gives the following ports:
tcp 0 0 172.28.129.166:1100 0.0.0.0:*
LISTEN 14502/java
tcp 0 0 127.0.0.1:51601 0.0.0.0:*
LISTEN 14502/java
tcp 0 0 0.0.0.0:44445 0.0.0.0:*
LISTEN 14502/java
tcp 0 0 0.0.0.0:33183 0.0.0.0:*
LISTEN 14502/java
tcp 0 0 172.28.129.166:8102 0.0.0.0:*
LISTEN 14502/java
So the rmiRegistryHost seems to be working, but the rmiServerHost doesn't.
Looking at the trunk patch for KARAF-2291 I'm not surprised it doesn't do much:
http://svn.apache.org/viewvc/karaf/trunk/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java?view=markup&pathrev=1476706
Declares a private member variable, but then never does anything with it.
Should KARAF-2291 be reopened for v3.0.1?
Jim
-----Original Message-----
From: Jim Talbut
Sent: 16 May 2014 10:40
To: [email protected]
Subject: Creating instances on dedicated IP addresses rather than varying the
ports
Continuing this:
http://mail-archives.apache.org/mod_mbox/karaf-user/201402.mbox/browser
Setting up an instance ("olt") using karaf 3.0.1 and configuring a
default.interface as follows:
etc/org.apache.karaf.shell.cfg:sshHost = ${default.interface}
instances/olt/etc/custom.properties:default.interface=172.28.129.166
instances/olt/etc/org.apache.karaf.management.cfg:serviceUrl
=service:jmx:rmi://${default.interface}:${rmiServerPort}/jndi/rmi://${default.interface}:${rmiRegistryPort}/karaf-${karaf.name}
instances/olt/etc/org.apache.karaf.shell.cfg:sshHost = ${default.interface}
Results in:
[root@srv-lon-ss1 apache-karaf]# netstat -anpt | grep 23728
tcp 0 0 :::1100 :::* LISTEN 23728/java
tcp 0 0 :::57334 :::* LISTEN 23728/java
tcp 0 0 ::ffff:127.0.0.1:45751 :::* LISTEN 23728/java
tcp 0 0 :::44445 :::* LISTEN 23728/java
tcp 0 0 ::ffff:172.28.129.166:8102:::* LISTEN 23728/java
So the ssh port is working correctly, but the JMX ports are not.
This is in the bundle config for JMX:
instances/olt/data/cache/bundle10/data/config/org/apache/karaf/management.config:serviceUrl="service:jmx:rmi://172.28.129.166:44445/jndi/rmi://172.28.129.166:1100/karaf-olt"
The 45751 is listed in instances/olt/data/port, but I can't find any reference
to the 57334.
If these are managed internally and I don't need to connect to them then I
guess I don't care what they are.
So, how can I get the JMX ports to work on a single address?
Thanks.
Jim
Jim