Alfonso Olias [
http://community.jboss.org/people/aolias] created the discussion
"[Urgent] Random org.jboss.remoting.CannotConnectException"
To view the discussion, visit:
http://community.jboss.org/message/563013#563013
--------------------------------------------------------------
Hi
We are running a Client/Server Application were there is a server receiving incoming
remote requests. Everything works ok until we double the number of clients (workers).
Then we start having this exception stack trace in some workers when they call remotely
the server (master). We have implemented a retry mechanism that catches this error and
tries to send the data 10 times, with random delays and also re-starting the transport.
But none of the failover mechanisms work.
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem
establishing socket connection for InvokerLocator
[socket://xxxxxxxxxxxxx.xxxxx.xxx:9003/?serializationtype=jboss]
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:831)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:167)
at org.jboss.remoting.Client.invoke(Client.java:2034)
at org.jboss.remoting.Client.invoke(Client.java:877)
at org.jboss.remoting.Client.invoke(Client.java:865)
at
org.jboss.remoting.transporter.TransporterClient.invoke(TransporterClient.java:321)
at $Proxy15.isReady(Unknown Source)
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:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.connect(SocketClientInvoker.java:293)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:210)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1165)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:816)
... 10 more
We are using the following libraries
<dependency org="org.jboss.remoting" name="jboss-remoting"
rev="2.5.3.SP1" />
<dependency org="jboss" name="jboss-serialization"
rev="1.0.3.GA" />
<dependency org="org.jboss" name="jboss-common-core"
rev="2.2.14.GA">
<exclude module="commons-httpclient"/>
</dependency>
<dependency org="jboss" name="jboss-logging-spi"
rev="2.0.3.GA" />
<dependency org="jboss" name="jboss-concurrent" rev="1.0"
/>
<dependency org="jboss" name="jboss-jmx" rev="4.0.4"
/>
<dependency org="trove" name="trove" rev="2.0.4" />
The way we start the server is like this
this.transporter =
TransporterServer.createTransporterServer("socket://"+this.hostname +
":"+ port + "/?serializationtype=jboss", this, this.serverName);
And at the client side
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem
establishing socket connection for InvokerLocator
[socket://gaials48.n1data.lan:9003/?serializationtype=jboss]
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:831)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:167)
at org.jboss.remoting.Client.invoke(Client.java:2034)
at org.jboss.remoting.Client.invoke(Client.java:877)
at org.jboss.remoting.Client.invoke(Client.java:865)
at
org.jboss.remoting.transporter.TransporterClient.invoke(TransporterClient.java:321)
at $Proxy15.isReady(Unknown Source)
at
gaia.cu3.agis.algo.gis.DistributedUpdateCalculatorServerProxy.send2Server(DistributedUpdateCalculatorServerProxy.java:255)
at
gaia.cu3.agis.algo.gis.attitude.DistributedAttitudeUpdateCalculatorServerProxy.access$100(DistributedAttitudeUpdateCalculatorServerProxy.java:73)
at
gaia.cu3.agis.algo.gis.attitude.DistributedAttitudeUpdateCalculatorServerProxy$1.run(DistributedAttitudeUpdateCalculatorServerProxy.java:242)
at java.lang.Thread.run(Thread.java:619)
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:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.connect(SocketClientInvoker.java:293)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:210)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1165)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:816)
... 10 more
updateServer = (T)
TransporterClient.createTransporterClient("socket://"+hostName+":" +
port + "/?serializationtype=jboss", this.myClass);
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/563013#563013]
Start a new discussion in JBoss Remoting at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]