I wrote an application which uses RMI. The server is successfully tested on Windows and Linux. However it doesn't work on Solaris.
Naming.lookup works, I can find the server. But calling a method on my remote interface causes a ConnectionException:
java.rmi.ConnectException: Connection refused to host: 192.168.1.123; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at at.triton.javaengine.server.ServerImpl_Stub.connectToWindow(Unknown Source)
at at.triton.javaengine.client.JavaEngineClient.connectToWindow(JavaEngineClient.java:288)
at at.triton.javaengine.client.JavaEngineClient.main(JavaEngineClient.java:787)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 7 more
Note that I have almost no experience with Solaris.
Additional information about the common pitfalls which I have already checked:
* rmiregistry finds the server classes (the exception was different without them)
* the server is in the LAN and the desktop firewall of the client is double-checked to let the required ports through to any destination.