DA activemq service fails to start after upgrade to 21.2.8
search cancel

DA activemq service fails to start after upgrade to 21.2.8

book

Article ID: 238538

calendar_today

Updated On:

Products

DX NetOps

Issue/Introduction

● activemq.service - Apache ActiveMQ
   Loaded: loaded (/etc/systemd/system/activemq.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2022-04-03 13:15:28 EDT; 11s ago
  Process: 8753 ExecStop=/app/IMDataAggregator/scripts/activemq stop sysd (code=exited, status=0/SUCCESS)
  Process: 22759 ExecStart=/app/IMDataAggregator/scripts/activemq start sysd (code=exited, status=0/SUCCESS)
 Main PID: 22859 (code=exited, status=1/FAILURE)

activemq fails to start after upgrade to 21.2.8 

Error from activemq.log 

| org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2022-04-03 13:24:18,284 | ERROR | Failed to load: class path resource [activemq.xml], reason: Line 166 in XML document from class path resource [activemq.xml] is
 invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 166; columnNumber: 9; cvc-complex-type.2.3: Element 'beans' cannot have character [child
ren], because the type's content type is element-only. | org.apache.activemq.xbean.XBeanBrokerFactory | main
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 166 in XML document from class path resource [activemq.xml] is invalid; nested except
ion is org.xml.sax.SAXParseException; lineNumber: 166; columnNumber: 9; cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type'
s content type is element-only.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
        at org.springframework.beans.factory.

Environment

Release : 21.2

Cause

There was a formatting error in the /opt/IMDataAggregator/broker/apache-activemq-5.16.2/conf/activemq.xml file 

Resolution

Updated the /opt/IMDataAggregator/broker/apache-activemq-5.16.2/conf/activemq.xml file and changed the end of the file. 

Took the # out and then separated the comment lines

From this: 
 <!-- 
        Enable web consoles, REST and Ajax APIs and demos
        
        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details 
    -->
  #    
  <!--<import resource="jetty.xml"/>-->
      

</beans><!-- END SNIPPET: example -->

 

To this: 

 <!-- 
        Enable web consoles, REST and Ajax APIs and demos

  Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details 
    -->
    <!--
      <import resource="jetty.xml"/>
    -->
 
    
</beans>
<!-- END SNIPPET: example -->