Hello. I have a RMI registry listening on port 1099, but no one but
localhost can connect to it. I have mapped my router port 1099 to the
IP where the RMI server is running... What may be wrong?
I don't know, but I've found that it's usually more convenient to
start RMI registry from within my program (and shut it down after I'm
done) through LocateRegistry.createRegistry(). I think that running
command-line RMI registry doesn't support SSL, while programatically
you can do something like:
Registry rmiRegistry = LocateRegistry.createRegistry(port, new
SslRMIClientSocketFactory(), new SslRMIServerSocketFactory(null, null,
true));
Also, to avoid registry thread running after your application exists,
don't forget to unexport the RMI registry during shutdown if you're
starting it from your application:
UnicastRemoteObject.unexportObject(rmiRegistry, false);
That's, of course, if you're not exiting with System.exit(0).
Domchi