Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI: java.net.ConnectException: Connection refused  RSS feed

 
Muthaiah Ramanathan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have been stuck on this for some time now. Does anyone have any idea?.

Basically it is all ok, if I run both the server and the client in the same pc(w2k). But the problem arises when I try to run the server and client in different machines. I got 'java.net.ConnectException: Connection refused' error when launching the client (the server is up and running)

1.I don't have any firewall running.
2.I tried to include a policy file by specifying in the command line like

java -classpath suncertify.jar -Djava.security.policy==D:\Software\dist\myPolicy.policy urlyBird.gui.Client Network

where myPolicy.policy is



Thanks,

Muthaiah
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Connection refused could be due to simply using the wrong address for the other machine.
Is that policy on the client machine or the server machine?
Bill
 
Muthaiah Ramanathan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, I have figured out my problem. I was binding the server with
which was wrong. It should have been

Thanks for your help.

Muthaiah.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!