Getting InvalidClientIDException for durable subscription with Camel in Karaf

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting InvalidClientIDException for durable subscription with Camel in Karaf

Oliver Wulff

Hi there


I've three camel routes (one publisher, two subscriber) (Spring DM) deployed in Karaf 4 where I use durable subscription with embedded ActiveMQ broker. When I redeploy the bundle I get the following errors. After around one minute it recovers and starts working.


I looks like that during bundle stop the connections are not properly freed which results into the below error when the publisher wants to write into the queue:


Caused by: javax.jms.IllegalStateException: javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:49532
at org.apache.activemq.jms.pool.ConnectionPool.createSession(ConnectionPool.java:159)[258:org.apache.activemq.activemq-osgi:5.13.3]
at org.apache.activemq.jms.pool.PooledConnection.createSession(PooledConnection.java:167)[258:org.apache.activemq.activemq-osgi:5.13.3]
at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)[169:org.apache.servicemix.bundles.spring-jms:3.2.14.RELEASE_1]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)[169:org.apache.servicemix.bundles.spring-jms:3.2.14.RELEASE_1]
... 87 more
Caused by: javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:49532
at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:255)
at org.apache.activemq.broker.jmx.ManagedRegionBroker.addConnection(ManagedRegionBroker.java:227)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)
at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:116)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)

During redeploy the following errors are logged:


2017-03-17 12:49:52,484 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Setting clientID on a used Connection is not allowed
2017-03-17 12:49:57,511 | WARN  | .0.1:50215@61616 | TransportConnection              | 258 - org.apache.activemq.activemq-osgi - 5.13.3 | Failed to add Connection ID:ubuntu-wuol-58025-1489740668350-6:76 due to javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:49:57,520 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:02,536 | WARN  | .0.1:50216@61616 | TransportConnection              | 258 - org.apache.activemq.activemq-osgi - 5.13.3 | Failed to add Connection ID:ubuntu-wuol-58025-1489740668350-6:77 due to javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:02,539 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:07,559 | WARN  | .0.1:50217@61616 | TransportConnection              | 258 - org.apache.activemq.activemq-osgi - 5.13.3 | Failed to add Connection ID:ubuntu-wuol-58025-1489740668350-6:78 due to javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:07,565 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:12,566 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Setting clientID on a used Connection is not allowed
2017-03-17 12:50:17,570 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Setting clientID on a used Connection is not allowed
2017-03-17 12:50:22,571 | INFO  | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Successfully refreshed JMS Connection


I haven't found a related JIRA ticket in Karaf or ActiveMQ. Is this a known issue and/or is there a feasible workaround?


Thanks

Oli

Reply | Threaded
Open this post in threaded view
|

AW: Getting InvalidClientIDException for durable subscription with Camel in Karaf

Oliver Wulff

Hi all


Should I send this question to the camel mailing list? I thought it's more related to lifecycle management within the Karaf environment and therefore I sent the question originally here.


Thanks

Oli


Von: Oliver Wulff <[hidden email]>
Gesendet: Freitag, 17. März 2017 12:53:35
An: [hidden email]
Betreff: Getting InvalidClientIDException for durable subscription with Camel in Karaf
 

Hi there


I've three camel routes (one publisher, two subscriber) (Spring DM) deployed in Karaf 4 where I use durable subscription with embedded ActiveMQ broker. When I redeploy the bundle I get the following errors. After around one minute it recovers and starts working.


I looks like that during bundle stop the connections are not properly freed which results into the below error when the publisher wants to write into the queue:


Caused by: javax.jms.IllegalStateException: javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:49532
at org.apache.activemq.jms.pool.ConnectionPool.createSession(ConnectionPool.java:159)[258:org.apache.activemq.activemq-osgi:5.13.3]
at org.apache.activemq.jms.pool.PooledConnection.createSession(PooledConnection.java:167)[258:org.apache.activemq.activemq-osgi:5.13.3]
at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)[169:org.apache.servicemix.bundles.spring-jms:3.2.14.RELEASE_1]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)[169:org.apache.servicemix.bundles.spring-jms:3.2.14.RELEASE_1]
... 87 more
Caused by: javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:49532
at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:255)
at org.apache.activemq.broker.jmx.ManagedRegionBroker.addConnection(ManagedRegionBroker.java:227)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)
at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:116)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:98)

During redeploy the following errors are logged:


2017-03-17 12:49:52,484 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Setting clientID on a used Connection is not allowed
2017-03-17 12:49:57,511 | WARN  | .0.1:50215@61616 | TransportConnection              | 258 - org.apache.activemq.activemq-osgi - 5.13.3 | Failed to add Connection ID:ubuntu-wuol-58025-1489740668350-6:76 due to javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:49:57,520 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:02,536 | WARN  | .0.1:50216@61616 | TransportConnection              | 258 - org.apache.activemq.activemq-osgi - 5.13.3 | Failed to add Connection ID:ubuntu-wuol-58025-1489740668350-6:77 due to javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:02,539 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:07,559 | WARN  | .0.1:50217@61616 | TransportConnection              | 258 - org.apache.activemq.activemq-osgi - 5.13.3 | Failed to add Connection ID:ubuntu-wuol-58025-1489740668350-6:78 due to javax.jms.InvalidClientIDException: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:07,565 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Broker: amq-broker - Client: trace1 already connected from tcp://127.0.0.1:50195
2017-03-17 12:50:12,566 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Setting clientID on a used Connection is not allowed
2017-03-17 12:50:17,570 | ERROR | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Could not refresh JMS Connection for destination 'TRACE' - retrying in 5000 ms. Cause: Setting clientID on a used Connection is not allowed
2017-03-17 12:50:22,571 | INFO  | sConsumer[TRACE] | faultJmsMessageListenerContainer | 169 - org.apache.servicemix.bundles.spring-jms - 3.2.14.RELEASE_1 | Successfully refreshed JMS Connection


I haven't found a related JIRA ticket in Karaf or ActiveMQ. Is this a known issue and/or is there a feasible workaround?


Thanks

Oli