• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

rmi and firewall

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I haven't never studied protocol details of RMI and i don't have time for it now, so i hope that someone could help me..

I have RMI server (or is it register..) in remote host. There is two firewall between client&server. If i take telnet from client to server in RMI port, it accept connection, so connection work in that way, but client firewall don't accept incoming connections. What can i do?

I can use RMI fine in other machine, where there isn't any firewalls between this server host and client host.

I will use one RMI method, which i will call in client, and method will return byte array.

Why RMI works this way? If client create socket to server, and it is bidirectional TCP socket, why cannot RMI read inputstream, or does it work other way? is RMI ?

Thanks already!

- Artsi
[ April 08, 2005: Message edited by: Nathan Pruett ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is that RMI will use a variety of ports to 'talk' between the client and server after the initial connection is established. Here is a tutorial on using a custom socket factory to fix this. You could also implement RMI-HTTP Tunneling. Firewall issues in general are covered in the RMI FAQ on Sun's site under the heading 'Firewall Issues'.

However, if you just have one method and it returns a byte array, why not just use a direct socket connection?
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Artsi,
If it is possible to open a port in the firewall, for RMI communication, then your "server" object (which probably extends UnicastRemoteObject) should override the "UnicastRemoteObject(int)" constructor. See the javadocs for more details.

Good Luck,
Avi.
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic