Assigning an IP address for remote method invocation v7

Note

This option applies to the publication server and the subscription server.

For Linux only:

An alternative method to modifying the /etc/hosts file so that the host name is associated with a non-loopback IP address, as discussed in Network IP addresses, is to specify the network IP address using the java.rmi.server.hostname option.

In the publication server configuration file, set this option to the network IP address of the host running the publication server.

In the subscription server configuration file, set this option to the network IP address of the host running the subscription server.

java.rmi.server.hostname=xxx.xxx.xx.xxx

For example, instead of modifying the /etc/hosts file to look like the following for a publication or subscription server running on host 192.168.2.19:

#127.0.0.1              localhost.localdomain localhost
192.168.2.19             localhost.localdomain localhost

You can set the IP address in the server configuration file as shown by the following:

#On Linux machines, the localhost to real IP may not give correct results. Hence
#users are advised to override the following property with server IP address
java.rmi.server.hostname=192.168.2.19
Note

If you're still facing issues while accessing the publication server and subscription server via the remote method invocation, add -Djava.rmi.server.hostname=<IP address> in runPubServer.sh and runSubServer.sh, respectively, before launching the servers. The <IP address> is the actual IP address where the publication and subscription servers are running.