I am setting up an rmi peer to peer network, the network discovery has already been sorted.

When the firewall is off it works but when the firewall is up and port 1099 is open it won't work. Is there another port I have missed?

RMI server setup:

RMIFileInterface stub = (RMIFileInterface) UnicastRemoteObject.exportObject(this,0);
Registry reg = LocateRegistry.createRegistry(1099);
reg.rebind("FServer", stub);

And RMi client setup is

Registry reg = LocateRegistry.getRegistry(ip);
fi = (RMIFileInterface) reg.lookup("FServer");
  • stackoverflow.com/questions/3071376/… may help you
    – VMai
    May 20 '14 at 11:12
  • Cheers, checked it out but it didn't help.
    – majoely
    May 20 '14 at 13:20
  • What did you try? Did you find the RMI FAQ?
    – VMai
    May 20 '14 at 13:25
  • Double checked the RMI FAQ and saw that the exportObject function needs to be set to a port aswell. Done that and it is working with the firewall now.
    – majoely
    May 20 '14 at 13:41
  • How do I mark as solved?
    – majoely
    May 20 '14 at 13:42

The firewall part of the RMI FAQ describes, how to cope with firewalls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.