• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI over the LAN on different machines

 
Jawad Hassan Khan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I successfully developed a chess game which can be played over the RMI. I tested it over the same machine and its working fine but not over the LAN.
I started registry on one machine and on the same machine I started server app, Moved client app to another machine over the LAN, unable to connect. should I also start registry on that machine.
Now I want this game to run over the LAN, I tried but its not working. Code for Server and client is given below.

Client App Registry Code.



Server App Registry code is



Is there anything else required. May be this time again problem is related to Firewall. Over the WiFi routers IP keeps on changing. If I run server app on one machine, other machine on the same LAN should connect detecting IP and registry.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"unable to connect" and "its not working" are not very helpful problem descriptions. If there are exceptions, post the full stack traces. Also make sure that no firewalls or router on any of the involved machines block any of the involved ports (which is 1099 by default).

Over the WiFi routers IP keeps on changing.

If this ever gets deployed to be used by more persons, then you should assign a static IP to the server so that this does not happen.
 
Jawad Hassan Khan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting ConnectException, connection refused by IP address. I will put full stack trace in a short while. Problem main cause could be firewall on the Wi-Fi router or something else like that.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, ports that are generally unused are often blocked (which is a good security precaution). So you need to check all involved devices that that isn't the case.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!