Layer7 API Management

Expand all | Collapse all

NamingException: Something already bound at [queue-name]

  • 1.  NamingException: Something already bound at [queue-name]

    Posted Jun 30, 2017 02:30 AM

    Hi 

     

    I have a working policy of a running system that throws every now and then an error. 

     

    The policy processes about 1000 messages a day. About 2 or 3 messages per week are going to the error queue because of the error below (taken from the audit logs). If I reprocess the messages, they are processed without any problems. So it is not a policy or a data problem. 

     

    Any idea what is going wrong here? 

     

    We use the "Generic JMS" provider and the ActiveMQ client-lib to configure JMS destinations with the "org.apache.activemq.jndi.ActiveMQInitialContextFactory".

     

    Thanks

    Stephan

     

     

    Stacktrace: 

    javax.naming.NamingException: Something already bound at [name of the JMS queue]      at org.apache.activemq.jndi.ReadOnlyContext.internalBind(ReadOnlyContext.java:160)      at org.apache.activemq.jndi.LazyCreateContext.lookup(LazyCreateContext.java:36)      at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:268)      at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:238)      at javax.naming.InitialContext.lookup(InitialContext.java:417)      at com.l7tech.server.transport.jms.JmsServiceLocator.lookup(Unknown Source)      at com.l7tech.server.transport.jms2.j.makeObject(Unknown Source)      at com.l7tech.server.transport.jms2.j.makeObject(Unknown Source)      at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)      at com.l7tech.server.transport.jms2.JmsResourceManager$CachedConnection.borrowJmsBag(Unknown Source)      at com.l7tech.server.transport.jms2.JmsResourceManager$CachedConnection.doWithJmsResources(Unknown Source)      at com.l7tech.server.transport.jms2.JmsResourceManager.doWithJmsResources(Unknown Source)      at com.l7tech.server.policy.assertion.ServerJmsRoutingAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerOneOrMoreAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.ServerPolicy.checkRequest(Unknown Source)      at com.l7tech.server.policy.w.call(Unknown Source)      at com.l7tech.server.policy.w.call(Unknown Source)      at com.l7tech.common.log.HybridDiagnosticContext.doInContext(Unknown Source)      at com.l7tech.server.policy.ServerPolicyHandle.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.ServerInclude.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerOneOrMoreAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerOneOrMoreAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerForEachLoopAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerOneOrMoreAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerOneOrMoreAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.ServerPolicy.checkRequest(Unknown Source)      at com.l7tech.server.policy.w.call(Unknown Source)      at com.l7tech.server.policy.w.call(Unknown Source)      at com.l7tech.common.log.HybridDiagnosticContext.doInContext(Unknown Source)      at com.l7tech.server.policy.ServerPolicyHandle.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.ServerInclude.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerHandleErrorsAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source)      at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source)      at com.l7tech.server.policy.ServerPolicy.checkRequest(Unknown Source)      at com.l7tech.server.policy.w.call(Unknown Source)      at com.l7tech.server.policy.w.call(Unknown Source)      at com.l7tech.common.log.HybridDiagnosticContext.doInContext(Unknown Source)      at com.l7tech.server.policy.ServerPolicyHandle.checkRequest(Unknown Source)      at com.l7tech.server.ap.b(Unknown Source)      at com.l7tech.server.ap.a(Unknown Source)      at com.l7tech.server.ap.access$700(Unknown Source)      at com.l7tech.server.MessageProcessor.a(Unknown Source)      at com.l7tech.server.MessageProcessor.processMessageNoAudit(Unknown Source)      at com.l7tech.server.transport.jms2.f.call(Unknown Source)      at com.l7tech.server.audit.AuditContextFactory.doWithNewAuditContext(Unknown Source)      at com.l7tech.server.transport.jms2.JmsRequestHandlerImpl.onMessage(Unknown Source)      at com.l7tech.server.transport.jms2.asynch.JmsTask.a(Unknown Source)      at com.l7tech.server.transport.jms2.asynch.JmsTask.onMessage(Unknown Source)      at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1405)      at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)      at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)      at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)      at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)      at java.lang.Thread.run(Thread.java:745)


  • 2.  Re: NamingException: Something already bound at [queue-name]

    Broadcom Employee
    Posted Aug 15, 2017 02:56 AM

    The problem is the following : 

     

    The JNDI lookup in the Gateway has a very long timeout and occupies a full connection thread. In the event of a failed lookup, the JNDI lookup can become blocking to the general functionality of the Gateway as it blocks the ability of the Gateway to create JMS thread pools or service requests. 
    The Gateway should provide appropriate timeout and retry functionality for JNDI lookups, for all JMS providers. 

     

    The solution for this problem is planned for F38806 which is targeted for next major release of API Gateway.