activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RJtokenlanring <ing.marco.colo...@gmail.com>
Subject Re: Set ClientID - InvalidClientIDException
Date Fri, 16 Jul 2010 09:54:53 GMT

Here is (attached) the test case that I have used.
If you connect to http the first time, connection is ok.
If you kill the JVM and the try to restart the test case, 'myclid already
connected from blockingQueue_' is always raised. Also after some hours. I
have to restart the broker in order to have a new conection with that client
id.

This test simulate a JVM crash with no resource cleanup.

Thank you very muh.

Marco


Gary Tully wrote:
> 
> can you try and build a test case, possibly a http version of:
> http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java?view=markup
> 
> 
> On 16 July 2010 09:22, RJtokenlanring <ing.marco.colombo@gmail.com> wrote:
>>
>> Any update?
>>
>>
>> RJtokenlanring wrote:
>>>
>>> And also.
>>> If I kill all the clients an I leave active only the broker,
>>> If I try to reconnect using http (or tcp) I get the same error.
>>> So client is not de-registered.
>>> This appens also if I use failover protocol. After client kill/restart.
>>> Same exception is raised (javax.jms.InvalidClientIDException - with the
>>> clientID of the killed client).
>>>
>>> I have to restart broker in order to register again the client.
>>>
>>>
>>> RJtokenlanring wrote:
>>>>
>>>> Thank you very much. I'll try failover mecanism.
>>>> After some tests I see that the code that I have written works
>>>> correctly
>>>> with tcp://
>>>> but the above problem only occurs in http:// or in https:// mode.
>>>>
>>>> It could be a bug?
>>>>
>>>>
>>>> Gary Tully wrote:
>>>>>
>>>>> If you use the failover: protocol, the reconnect will be transparent
>>>>> and the broker will be aware of the possibility of a duplicate and
>>>>> suppress that exception.
>>>>> Otherwise you will need to backoff the reconnect till the broker has
a
>>>>> chance to recognise and deal with the disconnect
>>>>>
>>>>> On 15 July 2010 14:25, RJtokenlanring <ing.marco.colombo@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi all,
>>>>>> I have a client that do a durable subscriptio to a topic.
>>>>>> It register with a static client id.
>>>>>>
>>>>>> After a connectivity loss (an so a new re-connection), this exception
>>>>>> is
>>>>>> thrown and connection cannot be
>>>>>> re-established:
>>>>>>
>>>>>> 2010-07-15 13:49:04,700 ERROR - javax.jms.InvalidClientIDException:
>>>>>> Broker:
>>>>>> localhost - Client: (SchedulerId = '1') already connected from
>>>>>> blockingQueue_8461294
>>>>>>        at
>>>>>> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:216)
>>>>>>        at
>>>>>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>>>>>>        at
>>>>>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>>>>>>        at
>>>>>> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:77)
>>>>>>        at
>>>>>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>>>>>>        at
>>>>>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>>>>>> ....
>>>>>>
>>>>>> This is not possible, because is the only client with that name and
>>>>>> previos
>>>>>> connection was closed . .close().
>>>>>>
>>>>>> There is a way to force reconnection or force that registered client
>>>>>> is
>>>>>> died
>>>>>> and so accept a new connection?
>>>>>>
>>>>>> I'm using AMQ 5.3.2
>>>>>>
>>>>>> Thank you and best regards!
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/Set-ClientID---InvalidClientIDException-tp29172904p29172904.html
>>>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://blog.garytully.com
>>>>>
>>>>> Open Source Integration
>>>>> http://fusesource.com
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Set-ClientID---InvalidClientIDException-tp29172904p29181249.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 
http://old.nabble.com/file/p29181940/TestCaseClientReconnection.zip
TestCaseClientReconnection.zip 
-- 
View this message in context: http://old.nabble.com/Set-ClientID---InvalidClientIDException-tp29172904p29181940.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message