I’ve been using RMI for a project I am currently working on and I want to bind from multiple hosts to a single RMI registry.
However when I attempt to do so I get an error saying
java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 192.168.0.9 is non-local host
I did so googling and it seems that RMI stops remote hosts from binding by default, what I want to know is there some way of overriding or bypassing this?
If anyone any suggestions on how to get past this issue they would be highly appreciated, i’ve tried using different policy files and overriding the security manger but none seem to work.
Thanks for everyones answers the solution I came up with in the end was to use the Cajo Framework this gives a very flexible system for distribution and it allowed for me to handle the registry as I saw fit. It can also work behind NATs, firewalls, and HTTP proxies, which is very useful.
I believe that the method of proxying suggested by rndm.buoy will work in some cases but its may be troublesome on some system. RMI seems to have some issues with associating to the wrong Network Interface I particularly had this issue when running on Debian based Linux distributions.