Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

Routing problem with RMI Registry

Thread view: 
acamposr@gmail.com - 14 May 2006 21:35 GMT
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?

Thanks!
Domagoj Klepac - 15 May 2006 11:11 GMT
>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

Signature

Ouroboros ltd. - http://www.ouroboros.hr 
Antispam: to reply, remove extra monkey from reply-to address.

acamposr@gmail.com - 15 May 2006 15:19 GMT
>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
[quoted text clipped - 5 lines]
>SslRMIClientSocketFactory(), new SslRMIServerSocketFactory(null, null,
>true));

Actually I do this:

Registry registry = LocateRegistry.createRegistry(1099);
Domagoj Klepac - 16 May 2006 09:32 GMT
>Actually I do this:
>
>Registry registry = LocateRegistry.createRegistry(1099);

Check the firewalls, router configuration, etc. How many IPs does your
server have? On which of them is RMI registry listening? Maybe there
is something else already binding to the 1099 on the server's network
IP.

Have you set security manager before creating registry?

               Domchi

Signature

Ouroboros ltd. - http://www.ouroboros.hr 
Antispam: to reply, remove extra monkey from reply-to address.

dimitar - 16 May 2006 23:16 GMT
This is a limitation by design (it's somewhere in the javadoc). Sun
recommends to use LDAP, Jini Registrar or SLP for network-wide service
location.

That speaking, it's not that hard to create your own implementation of
the NamingService and export it manually (I think I have the code
somewhere, let me know if you need it.)

Dimitar
EJP - 17 May 2006 08:06 GMT
> This is a limitation by design (it's somewhere in the javadoc). Sun
> recommends to use LDAP, Jini Registrar or SLP for network-wide service
> location.

No, that's the limitation where you can only bind to a local registry.
The OP's problem is that *nobody* can *connect* to the registry.

OP: can you ping the Registry host from all the relevant machines? Can
you telnet to port 1099 or port 7 on the Registry host from those
machines? This is sounding like a network topology/configuration problem.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.