]
Tim Fox closed JBMESSAGING-965.
-------------------------------
Resolution: Out of Date
JBoss Messaging client fails to reconnect after restart of the
server
---------------------------------------------------------------------
Key: JBMESSAGING-965
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-965
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.2.0.SP1
Environment: java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition,
java.runtime.version=1.5.0_10-b03,
java.vm.version=1.5.0_10-b03,
java.vm.vendor=Sun Microsystems Inc.,
java.vm.name=Java HotSpot(TM) Client VM,
java.vm.specification.name=Java Virtual Machine Specification,
java.vm.specification.vendor=Sun Microsystems Inc.,
java.specification.name=Java Platform API Specification,
java.specification.version=1.5,
java.vendor=Sun Microsystems Inc.,
os.name=Windows 2000,
os.version=5.0,
os.arch=x86,
sun.os.patch.level=Service Pack 4,
JBossAS version: 4.0.5
Reporter: pgervais
Assigned To: Tim Fox
Fix For: Unscheduled
There seem to be a clean up problem with the client JBoss Messaging QueueConnection.
When following these steps, everything works fine:
Sequence A:
1. create a QueueConnection
2. create a QueueSender
3. send a message
4. create QueueReceiver (on the same queue as the QueueSender)
5. receive the sent message
6. close the connection
7. shutdown the JBoss server
8. restart the JBoss server
9. execute step 1-6
Everything works fine
But following these steps:
Sequence B:
1. create a QueueConnection
2. create a QueueSender
3. send a message
4. create QueueReceiver (on the same queue as the QueueSender)
5. receive the sent message
6. shutdown the JBoss server
7. close the connection (I get an exception, it should be normal)
8. restart the JBoss server
9. execute step 1, I get an exception, this should not be normal
Exception received in step 7 of sequence B:
org.jboss.jms.util.MessagingNetworkFailureException
at
org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:220)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:200)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:155)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$closing$aop(ClientConnectionDelegate.java:158)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
at
org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:91)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
at
org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
at
org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate.closing(ClientConnectionDelegate.java)
at org.jboss.jms.client.JBossConnection.close(JBossConnection.java:131)
at TestJmsClient.sendMessage(TestJmsClient.java:82)
at TestJmsClient.main(TestJmsClient.java:32)
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server.
Problem establishing socket connection for InvokerLocator
[bisocket://142.117.14.44:4457/?NumberOfCallRetries=2&clientMaxPoolSize=50&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&numberOfRetries=1&serializationtype=jms&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat]
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:525)
at
org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:339)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1544)
at org.jboss.remoting.Client.invoke(Client.java:530)
at org.jboss.remoting.Client.invoke(Client.java:518)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:184)
... 17 more
Caused by: java.net.ConnectException: Connection refused: connect
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.createSocket(SocketClientInvoker.java:187)
at
org.jboss.remoting.transport.bisocket.BisocketClientInvoker.createSocket(BisocketClientInvoker.java:346)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:796)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:521)
... 23 more
Exception received in step 9 of sequence B:
org.jboss.jms.util.MessagingNetworkFailureException
at
org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:220)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:179)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
at
org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
at
org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
at
org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
at
org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
at
org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
at
org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:101)
at TestJmsClient.sendMessage(TestJmsClient.java:54)
at TestJmsClient.main(TestJmsClient.java:36)
Caused by: java.net.ConnectException: Connection refused: connect
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 java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at
org.jboss.remoting.transport.bisocket.BisocketServerInvoker.createControlConnection(BisocketServerInvoker.java:217)
at
org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:328)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1544)
at org.jboss.remoting.Client.addCallbackListener(Client.java:1613)
at org.jboss.remoting.Client.addListener(Client.java:907)
at
org.jboss.jms.client.remoting.JMSRemotingConnection.addInvokerCallbackHandler(JMSRemotingConnection.java:221)
at
org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:287)
at
org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:146)
... 13 more
After investigating, I think that the problem happens when the close is executed in the
second case. It seems that an exception is thrown before all the clean up has been done,
because I see a thread named WorkerThread#1[142.117.14.44:3421] (which is my machine
address and what seems to be the port on which the thread is listening). That thread was
not present in the first case, it disappeared after executing close on the
QueueConnection.
After further investigation, it seems that the problem is due to a clean up problem with
the org.jboss.remoting.InvokerRegistry. The client invoker and server invoker from the
previously created connection are not unregistered when the close method fails.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: