org.apache.commons.lang.UnhandledException: Failed to recover a connector.

MuleSoft JIRA | Maulik Kayastha | 9 years ago
  1. 0

    Channels that use a JMS Reader connector or JMS Writer connector must be redeployed (or stopped then started) after the ActiveMQ broker it is connected to restarts. The problem is this: When ActiveMQ is restarted (or in my case, software that uses an embedded broker) any channel that is connected to that broker will throw this error: 2012-08-02 07:37:00,343] ERROR (com.mirth.connect.connectors.jms.JmsMessageReceiver:409): Initialisation Failure: The Consumer is closed org.mule.umo.lifecycle.LifecycleException: Initialisation Failure: The Consumer is closed at com.mirth.connect.connectors.jms.JmsMessageReceiver.doStop( at org.mule.providers.AbstractMessageReceiver.stop( at org.mule.providers.AbstractMessageReceiver.dispose( at org.mule.providers.AbstractConnector.destroyReceiver( at org.mule.providers.AbstractConnector.unregisterListener( at org.mule.impl.model.AbstractModel.unregisterListeners( at org.mule.impl.model.AbstractModel.stopComponent( at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2( at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2( at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM( at com.sun.jmx.mbeanserver.PerInterface.invoke( at com.sun.jmx.mbeanserver.MBeanSupport.invoke( at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke( at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke( at at$200( at$ at Method) at at at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at sun.rmi.server.UnicastServerRef.dispatch( at sun.rmi.transport.Transport$ at Method) at sun.rmi.transport.Transport.serviceCall( at sun.rmi.transport.tcp.TCPTransport.handleMessages( at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0( at sun.rmi.transport.tcp.TCPTransport$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at by: javax.jms.IllegalStateException: The Consumer is closed at org.apache.activemq.ActiveMQMessageConsumer.checkClosed( at org.apache.activemq.ActiveMQMessageConsumer.setMessageListener( at com.mirth.connect.connectors.jms.JmsMessageReceiver.doStop( ... 37 more This error appears in the Mirth Connect log but it does not show an error state directly on the channel nor does it send an alert. The channel never attempts to reconnect and will only resume processing messages if redeployed (or stopped and started). How to reproduce this error: 1. Setup ActiveMQ (or create an embedded ActiveMQ broker) 2. Create a channel with a JMS Reader connector and/or JMS Writer connector 3. Start ActiveMQ 4. Deploy channel 5. Stop ActiveMQ 6 (Optional). Queue message on ActiveMQ 7 (Optional). Start ActiveMQ (at this moment, the messages will be consumed). Recommendations: The LLP connectors are a great example of how this should work. The connections should be automatically reestablished ever x seconds. Any unsent messages on a JMS writer should be queued up as in the LLP Sender connector. The JMS Reader should simply retry to connect. This issue is similar to, but not exactly the same, as

    Mirth Project | 4 years ago | Bryce Prescott
    org.mule.umo.lifecycle.LifecycleException: Initialisation Failure: The Consumer is closed
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.mule.umo.lifecycle.LifecycleException

      Failed to start Jms Connection

      at org.mule.providers.jms.JmsConnector.doStart()
    2. org.mule.providers
      1. org.mule.providers.jms.JmsConnector.doStart(
      2. org.mule.providers.AbstractConnector.startConnector(
      3. org.mule.providers.jms.JmsConnector$1.onException(
      3 frames
    3. ActiveMQ :: Core
      1. org.apache.activemq.ActiveMQConnection$
      1 frame
    4. Java RT
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$ Source)
      3. Source)
      3 frames