aaron3323
aaron3323
2013-08-08 13:18

RMI异常,java.rmi.ConnectException: Connection refused to host

已采纳

[code="java"] String name = "Compute";
HelloWorldCompute engine = new HelloWorldEngine();
HelloWorldCompute stub = (HelloWorldCompute) UnicastRemoteObject.exportObject(engine, 8888);
Registry registry = LocateRegistry.getRegistry();
registry.rebind(name, stub);[/code]

执行最后一句,抛出异常
java.rmi.ConnectException: Connection refused to host: 10.200.1.184; nested exception is:
java.net.ConnectException: Connection refused: connect

什么原因啊

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

相关推荐