[jboss-user] [Remoting] - Re: Problem running with Maven

eric.rotick do-not-reply at jboss.com
Wed Aug 5 06:32:04 EDT 2009

I've been doing some more digging around and I've discovered that the stack trace for the situation when the server is started, then the client is run up and then the server is killed is exactly the same as when the server is not running but the client is started.

In both case the error is connection refused. However, if I run the server up then the client and wait a second or two, then run netstat I get

tcp        0      0 ::ffff:  :::*                        LISTEN
  | tcp        0      0 ::ffff: ::ffff:  ESTABLISHED
  | tcp      575      0 ::ffff:  ::ffff: ESTABLISHED

which shows that the connection has been made and there is also data in the receive queue for the server process.

My conclusion is there is either something totally screwed or, and more likely, there is an additional connection which is being refused and not the link I expect to see.

The stack trace is

  | org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://]
  |     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)
  |     at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
  |     at org.jboss.remoting.Client.invoke(Client.java:1724)
  |     at org.jboss.remoting.Client.invoke(Client.java:629)
  |     at org.jboss.remoting.Client.invoke(Client.java:617)
  |     at org.jboss.remoting.transporter.TransporterClient.invoke(TransporterClient.java:321)
  |     at $Proxy0.getOne(Unknown Source)
  |     at example.SimpleClient.go(SimpleClient.java:21)
  |     at example.SimpleClient.main(SimpleClient.java:12)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:597)
  |     at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
  |     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:289)
  |     at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:206)
  |     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1089)
  |     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:762)
  |     ... 14 more

I then saved the output from netstat before running the test and again while the test was running and the client was blocked and there are no additional listeners running so it could be that I'm not starting a listener which is expected.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248070#4248070

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248070

More information about the jboss-user mailing list