This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

port of RMI  RSS feed

 
yi lu
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why only port 1099 do well in my computer?
when I use any other port number, an exception is throwed like this:java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:java.net.ConnectException: Connection refused:java.lang.NullPointerException
is there any restriction with RMI'port? like closing firewall, start some system web server and so on.
my policy is :
grant {
permission java.security.AllPermission "", "";
permission java.net.SocketPermission "localhost:1024-65535","connect";
};
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yi,
You might find this thread might help to answer your question:
Topic: RMI Binding on localhost
I don't think the problem is the security manager and I believe that the use of the security manager is not required (in fact, in my assignment instructions it was explicitly prohibited). The problem may have to do with creating a registry using the new port, but then not using the newly created registry. Take a look at the above thread.
There's a tremendous amount of information on this forum, the search function is invaluable in sorting through it.
Hope this helps,
George
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!