java.rmi.ConnectException: Connection refused to host: [hostname:10555]; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPChannel.openSocket(TCPChannel.java:240) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:125) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:73) at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:86) ...
The rmiregistry has not been started. The DGL daemon and server need the rmiregistry running in order to handle RMI calls. This is done by executing rmiregistry port-number. The default port number is 10555. If this port is already in use, it can be changed by starting the server with the command line option -rmiport (or changing rmiport in the server config file).
java.rmi.ServerException: Server RemoteException; nested exception is: java.rmi.AccessException: Registry.rebind rohan.sdsu.edu/184.108.40.206 != localhost/127.0.0.1
Due to a known bug, Java reports a wrong local address (127.0.0.1) of the server machine instead of the real IP address. It depends on which platform java is running. These behavior has been reported on Solaris 2.6. It can be fixed by unsetting the server option in the server config file to "".
e.g. server = ""
java.rmi.ConnectException: Connection refused to host: [localhost:63621]; nested exception is: java.net.ConnectException: Connection refused ...
The server does not report his true host name (The string localhost is meaninglessy to the client). This is caused by the same Java bug mentioned above. Set the localhost option in the servers config file to the real server host name.
e.g. localhost = rohan.sdsu.edu
This behavior has been discussed in the RMI-USERS mailing list.6.1
http://www.javasoft.com/products/jdk/rmi/faq.html#bind This could be caused by another known bug of Java. The following answer can be found in the Java RMI and Object Serialization FAQ6.2:
- Why do Naming.bind and Naming.lookup take an extraordinarily long time on Windows?
Most likely, your host's networking setup is incorrect. RMI uses the Java API networking classes, in particular java.net.InetAddress, which will cause TCP/IP host name lookups -- both host to address mapping and address to host name mapping (the InetAddress class does this for security reasons). On Windows, the lookup functions are performed by the native Windows socket library, so the delays are happening not in RMI, but in the Windows libraries. If your host is set up to use DNS, then it is usually a problem with the DNS server not knowing about the hosts involved in communication, and what you are experiencing are DNS lookup timeouts. Try specifying all the involved hostnames/addresses in the local file
\hosts. The format of a typical host file is:
IPAddress Machine Name e.g.: 220.127.116.11 homer
It was reported that the RMI method Naming.rebind() hangs when java is running with the JIT compiler option enabled. Try disabling the JIT compiler (set JAVA_COMPILER=3D). This workaround was reported in the RMI-USERS mailing list6.3.