日期:2014-05-18 浏览次数:20626 次
Exception in thread "main" java.rmi.ConnectException: Connection refused to host: 192.168.1.153; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at rmi.compute.Bootstrap.main(Bootstrap.java:17)
if(System.getSecurityManager() == null){
System.setSecurityManager(new SecurityManager());
}
LocateRegistry.createRegistry(10990);
String name = "ComputeEngine";
ComputeEngine engine = new ComputeEngine();
System.out.println("ComputerEngine exported");
Naming.rebind(name, engine);
System.out.println("ComputeEngine bound");