Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI: net.ConnectException

 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • 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
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are specifying the security policy, you also need an instance of Security Manager to handle that policy. It's very likely that your requirements ask you not to do anything about the security. So, remove that reference to the security policy from the command line, don't use any instances to SecurityManager, and make sure that you have a hole in the firewall (if you have a firewall). It'll work.
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • 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

I don't use policy or security anymore as advised.

Thanks for your help.

Muthaiah.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic