You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Coombo Marco (JIRA)" <ji...@apache.org> on 2010/07/16 13:49:51 UTC

[jira] Created: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Set ClientID - InvalidClientIDException with http transport
-----------------------------------------------------------

                 Key: AMQ-2831
                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
             Project: ActiveMQ
          Issue Type: Bug
          Components: Transport
    Affects Versions: 5.3.2
            Reporter: Coombo Marco
             Fix For: 5.4.0
         Attachments: TestVaseClientID.zip

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().

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. 

A test case is attached. 
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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated AMQ-2831:
---------------------------------

    Fix Version/s: 5.4.1
                       (was: 5.4.0)

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Coombo Marco
>             Fix For: 5.4.1
>
>         Attachments: broker-config.xml, TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-2831:
-------------------------------

    Assignee: Gary Tully

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Colombo Marco
>            Assignee: Gary Tully
>            Priority: Blocker
>             Fix For: 5.4.1
>
>         Attachments: broker-config.xml, TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Colombo Marco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61575#action_61575 ] 

Colombo Marco commented on AMQ-2831:
------------------------------------

And related to this bug, I can report a related problem.
The http transport maintains a cache of the connected clients and doesn't flush it. If I restart the client, It cannot reconnect until I restart the broker:

javax.jms.JMSException: Could not connect to broker URL: http://server:61617/broker003. Reason: java.io.IOException: Failed to perform GET on: http://server:61617/broker003 as response was: 400
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
....

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Colombo Marco
>             Fix For: 5.4.1
>
>         Attachments: broker-config.xml, TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Colombo Marco (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colombo Marco updated AMQ-2831:
-------------------------------

    Priority: Blocker  (was: Major)

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Colombo Marco
>            Priority: Blocker
>             Fix For: 5.4.1
>
>         Attachments: broker-config.xml, TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Coombo Marco (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Coombo Marco updated AMQ-2831:
------------------------------

    Attachment: broker-config.xml

Broker configuration

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Coombo Marco
>             Fix For: 5.4.0
>
>         Attachments: broker-config.xml, TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Coombo Marco (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Coombo Marco updated AMQ-2831:
------------------------------

    Attachment: TestVaseClientID.zip

Test case class

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Coombo Marco
>             Fix For: 5.4.0
>
>         Attachments: TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2831) Set ClientID - InvalidClientIDException with http transport

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2831.
-----------------------------

    Resolution: Fixed

The http transport now has an inactivity monitor, configure the http transport url with a low inactivity timeout value and the server end of the http transport will timeout when the client jvm crashes.

{code}http://localhost:61617??transport.readCheckTime=4000&amp;transport.initialDelayTime=4000{code}

> Set ClientID - InvalidClientIDException with http transport
> -----------------------------------------------------------
>
>                 Key: AMQ-2831
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2831
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Colombo Marco
>            Assignee: Gary Tully
>            Priority: Blocker
>             Fix For: 5.4.1
>
>         Attachments: broker-config.xml, TestVaseClientID.zip
>
>
> 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().
> 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. 
> A test case is attached. 
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.