dcsimg
Problem when starting remote rmiregistry service using ssh
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sean_Wei
Posted On:   Friday, October 5, 2007 05:42 PM

I want to start the rmiregistry on a remote server (assuming its IP is 192.168.1.1) by using the following command: $ ssh 192.168.1.1 "rmiregistry &" But I always get the following exceptions: Exception in thread "main" java.lang.ExceptionInInitializerError at java.lang.Class.initializeClass(libgcj.so.7rh) at gnu.java.rmi.server.UnicastConnectionManager.getInstance(libgcj.so.7rh) at gnu.java.rmi.server.UnicastServerRef. (libgcj.so.7rh) at gnu.java.rmi.registry.RegistryImpl. (libgcj.so.7rh) at java.rmi.registry.LocateRegistry.createRegistry(libgcj.so.7rh) at java.rmi.registry.LocateRegistry.createRegistry(libgcj.so.7rh)    More>>

I want to start the rmiregistry on a remote server (assuming its IP is 192.168.1.1) by using the following command:

$ ssh 192.168.1.1 "rmiregistry &"

But I always get the following exceptions:

			Exception in thread "main" java.lang.ExceptionInInitializerError
			
at java.lang.Class.initializeClass(libgcj.so.7rh)
at gnu.java.rmi.server.UnicastConnectionManager.getInstance(libgcj.so.7rh)
at gnu.java.rmi.server.UnicastServerRef. (libgcj.so.7rh)
at gnu.java.rmi.registry.RegistryImpl. (libgcj.so.7rh)
at java.rmi.registry.LocateRegistry.createRegistry(libgcj.so.7rh)
at java.rmi.registry.LocateRegistry.createRegistry(libgcj.so.7rh)
at gnu.java.rmi.registry.RegistryImpl.main(libgcj.so.7rh)
Caused by: java.lang.NullPointerException
at java.net.InetAddress.getHostAddress(libgcj.so.7rh)
at gnu.java.rmi.server.UnicastConnectionManager. (libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
...6 more


However, If I first login the machine using ssh and then run rmiregistry locally, it starts well.

Anybody know why this happens? Any hint is highly appreciated.

Best, Sean

   <<Less

Re: Problem when starting remote rmiregistry service using ssh

Posted By:   Edward_Harned  
Posted On:   Monday, October 8, 2007 12:09 PM

You cannot run the RMI Registry on a remote machine. Each registry handles only the servers on the machine on which it is running.


This means that you must start the registry on each machine on which you plan to run remote object servers.

About | Sitemap | Contact