C
coder_1024
I'm developing a Java RMI client/server application.
On the server side, I create a registry on port X, then create my
object on port X and bind to the registry.
On the client side, I do a Naming.lookup call specifying the server
host and port X along with the object name. This gives me back the
object reference and everything works.
The problem occurs when I run my server behind a router. I setup
port-forwarding on my router to route port X to the machine running
the server.
Problem is, the registry is returning the IP of the server which isn't
valid on the other side of the router and the client is then unable to
connect to the object.
Is it possible to skip the object registry entirely and just connect
up to a specified host and port number from the client? I need some
way to, on the client side, get the server object without using the
registry, i.e. just tell it the host and port number and connect up
directly to the remote object. I think this would solve my router
problems...
On the server side, I create a registry on port X, then create my
object on port X and bind to the registry.
On the client side, I do a Naming.lookup call specifying the server
host and port X along with the object name. This gives me back the
object reference and everything works.
The problem occurs when I run my server behind a router. I setup
port-forwarding on my router to route port X to the machine running
the server.
Problem is, the registry is returning the IP of the server which isn't
valid on the other side of the router and the client is then unable to
connect to the object.
Is it possible to skip the object registry entirely and just connect
up to a specified host and port number from the client? I need some
way to, on the client side, get the server object without using the
registry, i.e. just tell it the host and port number and connect up
directly to the remote object. I think this would solve my router
problems...