• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Java RMI application on two different machines - ConnectException

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello. Long story short I am trying to run a client server RMI application on two different machines running Windows, but I have some trouble.

A simplified code of the server is:


And the Client:


The exception I get is: "ConnectException: Connection refused to host: 192.168.1.100; nested exception is: Connection timed out: connect".
I know this question has been asked a million times and I found out that I have to change the properties of the server and that is why I added the System.setProperty("java.rmi.server.hostname", "192.168.x.x"); line but the error remains. For the IP addres I am using the one returned from ipconfig.

I will be very thankful if someone could suggest what I can change.
 
Bartender
Posts: 3323
86
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Have you tried pinging from the client machine to the server to make sure there is a route to IP address 192.168.1.100 - it may be being blocked by a firewall.
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cross posted at http://stackoverflow.com/questions/27666504/running-java-rmi-application-on-two-machines-connectexception

Please BeForthrightWhenCrossPostingToOtherSites (← click). We all give up our time here for free and would rather not waste it answering a question that has already been answered elsewhere.
 
John Went
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it was because of the firewall. Thank you for the suggestion.
 
Oh. Hi guys! Look at this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic