JSLEE Discussions
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
remote connection to rhino jmx service via jmanage fails
Forum Index » Rhino SLEE Discussions
Author Message
r.bock


Joined: 17/11/2008 12:16:38
Messages: 40
Offline

jmanage server is installed remotely and wants to connect to rhino I added the following entries:

config-variables:
RHINO_HOME=/usr/local/rhino
RHINO_BASE=/usr/local/rhino
RHINO_WORK_DIR=/usr/local/rhino/work
JAVA_HOME=/usr/local/jdk1.6.0_10
JVM_ARCH=32
FILE_URL=file:
MANAGEMENT_DATABASE_NAME=rhino
MANAGEMENT_DATABASE_HOST=localhost
MANAGEMENT_DATABASE_PORT=5432
MANAGEMENT_DATABASE_USER=postgres
MANAGEMENT_DATABASE_PASSWORD=sally
PSQL_CLIENT=/usr/local/pgsql/bin/psql
RMI_MBEAN_REGISTRY_PORT=1199
JMX_SERVICE_PORT=1202
SNAPSHOT_BASEPORT=42000
HEAP_SIZE=512m
RHINO_PUBLIC_STORE_PASS=changeit
RHINO_PRIVATE_STORE_PASS=changeit
RHINO_PUBLIC_KEY_PASS=changeit
RHINO_PRIVATE_KEY_PASS=changeit
WEB_CONSOLE_HTTP_PORT=8066
WEB_CONSOLE_HTTPS_PORT=8443
WEB_CONSOLE_KEY_PASS=changeit
WEB_CONSOLE_STORE_PASS=changeit
WEB_CONSOLE_HOSTNAME=SDF-SEE-VM.localdomain
RHINO_PASSWORD=password
RHINO_USERNAME=admin
LOCALIPS=*
RHINO_WATCHDOG_STUCK_INTERVAL=45000
RHINO_WATCHDOG_THREADS_THRESHOLD=50
SAVANNA_CLUSTER_ID=100
SAVANNA_CLUSTER_ADDR=224.0.50.1
SAVANNA_MCAST_START=224.0.50.1
SAVANNA_MCAST_END=224.0.50.8
RHINO_WATCHDOG_THREADS_THRESHOLD=50
NODE_ID=101
RHINO_BASE=/usr/local/rhino
RHINO_HOME=/usr/local/rhino/node-101
RHINO_WORK_DIR=/usr/local/rhino/node-101/work
RHINO_WATCHDOG_DUMPTHREADS=/usr/local/rhino/node-101/dumpthreads.sh

read-config-variables:
OPTIONS="$OPTIONS -Djava.rmi.server.hostname=192.168.242.130"
OPTIONS="$OPTIONS -Djavax.net.ssl.keyStore=${RHINO_BASE}/rhino-private.keystore -Djavax.net.ssl.keyStorePassword=${RHINO_PRIVATE_STORE_PASS}"
OPTIONS="$OPTIONS -Djavax.net.ssl.trustStore=${RHINO_BASE}/rhino-private.keystore -Djavax.net.ssl.trustStorePassword=${RHINO_PRIVATE_KEY_PASS}"

jmanage script:
set RHINO_CLASSPATH=client/lib/slee.jar;client/lib/rhino-client.jar;client/lib/log4j.jar
set JMANAGE_CLASSPATH=%JMANAGE_CLASSPATH%%RHINO_CLASSPATH%
echo %JMANAGE_CLASSPATH%

set RHINO=-Drmissl.jmxr-adaptor=file:client/etc/client.properties

"%JAVA_HOME%/bin/java" -ea -classpath "%JMANAGE_CLASSPATH%" %DEBUG_OPTIONS% %RHINO% -Djava.util.logging.config.file=%JMANAGE_HOME%/config/logging.properties -Djmanage.root=%JMANAGE_HOME% -Djava.security.auth.login.config=%JMANAGE_HOME%/config/jmanage-auth.conf -Dorg.jmanage.core.management.data.formatConfig=%JMANAGE_HOME%/config/html-data-format.properties org.jmanage.webui.Startup %*

Error:

24.11.2008 13:53:09 org.jmanage.core.management.ServerConnector getServerConnection
INFO: Failed to connect. error=Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root excep
on is java.rmi.ConnectException: Connection refused to host: 192.168.242.130; nested exception is:
java.net.ConnectException: Connection refused: connect]
bsd

[Avatar]

Joined: 22/03/2008 00:37:15
Messages: 355
Location: Cambridge, UK
Offline

Hi Richard,

"Connection refused: connect" usually means that the machine is unreachable or the socket is not open (eg, the node was not running or was running in a different port)...

Do not forget also to give permissions to the remote host to access your Rhino node (rhino/node-10x/config/permachine-mlet.conf).

Bruno Duarte
Technical Consultant
OpenCloud
[Email] [WWW]
perrin


Joined: 25/01/2008 16:11:18
Messages: 225
Location: Wellington, New Zealand
Offline

I've successfully used jManage to connect to Rhino in the past. It should work out of the box with no changes to jManage's scripts/classpaths/etc long as you:

1. Allow remote connections in permachine-mlet.conf as Bruno said
2. Disable SSL for the JMX-Remote Adaptor m-let (the last <arg>)
3. Use this URL in jManage: service:jmx:rmi:///jndi/rmi://hostname:port/opencloud/rhino

If you need SSL, then you have to supply a few system properties to jManage so it can find the keystores etc. It's a lot easier to avoid this (or leave it until everything else is working).

Having said that, the particular error you're seeing appears to be something more fundamental, so you should double-check that you're using the right addresses and ports, and that 192.168.242.130 is reachable on both ports 1199 and 1202 from the client host.


Perrin Morrow
Senior Software Engineer
Metaswitch Networks
r.bock


Joined: 17/11/2008 12:16:38
Messages: 40
Offline

I have added LOCALIPS=* so I guess the permission in the mlet is not required right?

How exactly do I have to disable SSL for JMX? There are two mlet files one for machine and one for jmx1.
r.bock


Joined: 17/11/2008 12:16:38
Messages: 40
Offline

Just found it and put it to false. Still the question is JMX1 or the machine file the right one? Also what does local rmi registry port mean? It will not work remotely?

<class>com.opencloud.slee.mlet.jmxr.JMXRAdaptor</class>
<!-- the local rmi registry port -->
<arg>
<type>int</type>
<value>@RMI_MBEAN_REGISTRY_PORT@</value>
</arg>
<!-- the local jmx connector port -->
<arg>
<type>int</type>
<value>@JMX_SERVICE_PORT@</value>
</arg>
<!-- enable ssl -->
<arg>
<type>boolean</type>
<value>false</value>
</arg>
r.bock


Joined: 17/11/2008 12:16:38
Messages: 40
Offline

After changing it to "false" and removing the rhino settings in jmanage I am getting the following error:

25.11.2008 01:47:23 org.jmanage.core.management.ServerConnector getServerConnection
INFO: Failed to connect. error=Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: opencloud/rhino

the URL is specified in jmanage as follows:
service:jmx:rmi:///jndi/rmi://192.168.242.130:1199/opencloud/rhino

Do I need to mention the port 1202 somewhere?
perrin


Joined: 25/01/2008 16:11:18
Messages: 225
Location: Wellington, New Zealand
Offline

I have added LOCALIPS=* so I guess the permission in the mlet is not required right?


I imagine that will probably work, but I'm not sure as I always uncomment the line in *mlet.conf.

Still the question is JMX1 or the machine file the right one?


The jmx1.conf file was included for backwards compatibility with clients written for Rhino 1.4.5. It is not used by default, it requires a few things to be reconfigured before it can be used.

Also what does local rmi registry port mean? It will not work remotely?


It just means the RMI Registry started by Rhino. It will accept remote connections (given sufficient permissions).

25.11.2008 01:47:23 org.jmanage.core.management.ServerConnector getServerConnection
INFO: Failed to connect. error=Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: opencloud/rhino

the URL is specified in jmanage as follows:
service:jmx:rmi:///jndi/rmi://192.168.242.130:1199/opencloud/rhino

Do I need to mention the port 1202 somewhere?


No, the registry is on port 1199, the object server is on port 1202. The registry will give you a stub for an exported object that contains the host and port.

I'm not sure what the problem is here. That exact URL (with different host obviously) works for me. This is using jManage's "JSR160 Application" type, right? And you are using jManage 2.0-RC1?

Have you checked that you can connect remotely with rhino-console? Are there any errors in the Rhino log?

Perrin Morrow
Senior Software Engineer
Metaswitch Networks
r.bock


Joined: 17/11/2008 12:16:38
Messages: 40
Offline

Well,

the rhino console 2.0 is not working thats why I was trying the jmx one as it does not require any rhino libs. I just attached my configuration and the rhino log file may be you can give me a hint what could be wrong with the rhino setup.

 Filename read-config-variables [Disk] Download
 Description
 Filesize 7 Kbytes
 Downloaded:  6 time(s)

 Filename rhino.log [Disk] Download
 Description
 Filesize 25 Kbytes
 Downloaded:  3 time(s)

 Filename permachine-mlet.conf [Disk] Download
 Description
 Filesize 12 Kbytes
 Downloaded:  11 time(s)

perrin


Joined: 25/01/2008 16:11:18
Messages: 225
Location: Wellington, New Zealand
Offline

What do you mean Rhino Console is not working?

It is easier to make sure that the bundled Rhino client apps can connect properly (use the -D switch if they can't) before trying a third party or custom management client, so you can isolate the problem to the client or server configuration.

Perrin Morrow
Senior Software Engineer
Metaswitch Networks
r.bock


Joined: 17/11/2008 12:16:38
Messages: 40
Offline

I just started again today and magic it worked with jmanage. After that more magic it also worked with our Groovy Deployer using the rhino console libraries.

An Explanation I dont have
 
Forum Index » Rhino SLEE Discussions
Go to:   
Powered by JForum 2.1.8 © JForum Team