Connection refused
ecatum Feb 13, 2008 3:18 AMHello,
I m actually coding a server/client application using rmi and ServerInvocationHandler for the server.
When I use the client on the same system as the server, there is no problem. But when I use the client on a different system, the client catch the exception :
org.jboss.remoting.CannotConnectException: Error making invocation in RMI client invoker. at org.jboss.remoting.transport.rmi.RMIClientInvoker.transport(RMIClientInvoker.java:218) at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:112) at org.jboss.remoting.Client.invoke(Client.java:226) at org.jboss.remoting.Client.invoke(Client.java:189) at XXXX.main(XXX.java:66) Caused by: java.rmi.ConnectException: Connection refused to host: 129.1.3.6; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94) at org.jboss.remoting.transport.rmi.RMIServerInvoker_Stub.transport(Unknown Source) at org.jboss.remoting.transport.rmi.RMIClientInvoker.transport(RMIClientInvoker.java:184) ... 4 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:193) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:430) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.<init>(Socket.java:367) at java.net.Socket.<init>(Socket.java:180) at org.jboss.remoting.transport.rmi.RemotingRMIClientSocketFactory.createSocket(RemotingRMIClientSocketFactory.java:178) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569) ... 9 more
Here the jboss-service.xml of the server locate in the sar I deploy :
server> <mbean code="org.jboss.remoting.transport.Connector" xmbean-dd="org/jboss/remoting/transport/Connector.xml" name="jboss.remoting:service=Connector,transport=RMI"> <attribute name="Configuration"> <config> <invoker transport="rmi"> <attribute name="registryPort" isParam="true">8071</attribute> <attribute name="serverBindAddress">${jboss.bind.address}</attribute> <attribute name="serverBindPort">8070</attribute> </invoker> <handlers> <handler subsystem="XXXX_POSTER">xxx.xxx.xxx.Poster</handler> </handlers> </config> </attribute> <depends>jboss.jca:service=DataSourceBinding,name=TOC</depends> </mbean> </server>
For information : I can reach the server, and its ports are opened.
So if someone had an idea of what happen or where i can search to solve the problem, you re help will be welcom. :)
Thanks.