As we have already mentioned, the stub contains the IP address of the endpoint where the implementation is running.
When the method Naming.rebind() is executed on your linux machine, the RMIRegistry builds the corresponding stub and issues a system call to get the IP address of the localhost (the alias localhost is VERY IMPORTANT here) to associate it with that stub.
Under linux system, the IP address of the localhost is mapped from /etc/hosts file. This is why, you should overwrite 127.0.0.1 with [YOUR_SERVER_IP_ADDRESS].
try a new <ping localhost> to make sure the modification has taken place, and reexecute your app.
Waiting for your feedbabk.