IBM Support

Unable to connect to remote RMI service when using multi-homed interface

Troubleshooting


Problem

When connecting to a multi-homed machine using RMI, the wrong address may be returned by the RMI registry to the client, causing the connection to the RMI server to time out.

Symptom

In the following example, there are two IP addresses on the Maximo application server host. One is 192.168.2.25, used for backups, and the other is 10.1.1.25, used for main communication between client and server software.
The checkmxserver.bat utility is used to check connectivity from a remote client host at 10.1.1.30 which is in the same subnet as the main interface on the application server host so it is expected that the address 10.1.1.25 from the same subnet is returned to the client by the RMI registry to facilitate communication between the client and RMI server.
The log shows a time out occurring, and is trying to connect to the 192.168.2.25 IP address which has no route to the client host.

The command line used was:
checkmxserver.bat -h10.1.1.25:13400 -sMXServer -umaxadmin -pmaxadmin -fc:\checkmxserverlog

The log output shows the following:
Connecting to (10.1.1.25:13400/MXServer)
Username :maxadmin
UNABLE TO CONNECT TO MAXIMO SERVER....
psdi.util.MXSystemException: system#notboundexception
at psdi.util.RMISession.connect(RMISession.java:118)
at psdi.server.CheckMXServer.main(CheckMXServer.java:148)
Caused by: java.rmi.ConnectException: Connection refused to host: 192.168.2.25; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:631)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:214)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:140)
at psdi.server.MXServer_Stub.lookup(Unknown Source)
at psdi.util.RMISession.authenticateUser(RMISession.java:304)
at psdi.util.RMISession.loadUserInfo(RMISession.java:200)
at psdi.util.RMISession.connect(RMISession.java:61)
... 1 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:80)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:369)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:176)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
at java.net.Socket.connect(Socket.java:590)
at java.net.Socket.connect(Socket.java:539)
at java.net.Socket.<init>(Socket.java:436)
at java.net.Socket.<init>(Socket.java:219)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:52)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:158)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:625)
... 8 more
Usage : CheckMXServer -h<hostname> -s<servername> -u<username> -p<password> -t<tenantcode> -f<logfile> -?

Cause

The RMI registry will return the first IP address from the application server host to the client. However, the address returned to the client can be controlled using a generic JVM argument.

Resolving The Problem

Set the JVM property:
-Djava.rmi.server.hostname=

to the IP address you want returned to the client.

To do this, navigate in WebSphere to your server name.
On the right click: Java and Process Management
Then, Process definition
On the next screen on the right side, select "Java Virtual Machine".
In the Generic JVM Arguments field, enter the argument:
-Djava.rmi.server.hostname=10.1.1.25
(Replacing the IP address above with the address your clients can access)

Save and Synchronize your changes, then restart the JVM.

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21998512