Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

What is the second TCP port when using RMI?

 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I'm testing a RMI client/server application over the internet and I'm a bit confused about the ports (especially the second port) RMI is using...

I've got the following scenario:

The RMI server is on my root server with a public IP address without NATting. My client is behind a router at home. So far everything is working fine. The RMI registry on the server side is using the desired port i specified by creating the registry with the following command:


At the moment everything is working!!! The problem is that RMI opens up a second TCP port on the server side and this port seems to change anytime the server application is started. And these ports don't seem to be reserved ports for a special application (the last two times i had 2652 and 2317 for example). This is very unsatisfying because i have to change this second port on my firewall each time the server application is restarted

Unfortunately I couldn't find any useful hints on the web what exactly this second port does or is and in particular why it is changing dynamically! Can anyone tell me please what this port is and perhaps how I can specify a fixed number for it!

Thanks in advance!
Marco
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I've managed to figure out the problem by myself...

One TCP port is for the RMI registry and of course another one is needed for the actual RMI communication between server and client

I wasn't able to specify the port for RMI communication because my server implementation extended "UnicastRemoteObject".
Instead by using it's possible now to specify the desired port for RMI calls.

Just in case someone else experiences the same problems...

Marco
[ October 24, 2007: Message edited by: Marco Ehrentreich ]
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic