Hi all,
I've just installed activemq-5.9.1-2 on CentOS 7.
When I attempt to start the service I get the following result:
[root@activemq:~] #service activemq start
Redirecting to /bin/systemctl start activemq.service
It LOOKS like it has started. But when I check to see if it's running, I
see there are errors:
[root@activemq:~] #service activemq status
Redirecting to /bin/systemctl status activemq.service
activemq.service - ActiveMQ
Loaded: loaded (/usr/lib/systemd/system/activemq.service; disabled)
* Active: failed (Result: exit-code) since Fri 2015-01-16 22:57:10 EST;
28s ago*
* Process: 24373 ExecStop=/usr/share/activemq/bin/activemq stop
(code=exited, status=1/FAILURE)*
Process: 24343 ExecStart=/usr/share/activemq/bin/activemq start
(code=exited, status=0/SUCCESS)
Main PID: 24360 (code=exited, status=0/SUCCESS)
Jan 16 22:57:07 activemq activemq[24343]: INFO: changing to user 'activemq'
to invoke java
Jan 16 22:57:07 activemq su[24350]: (to activemq) root on none
Jan 16 22:57:07 activemq activemq[24343]: INFO: pidfile created :
'/var/run/activemq/activemq.pid' (pid '24360')
Jan 16 22:57:07 activemq systemd[1]: Started ActiveMQ.
Jan 16 22:57:10 activemq activemq[24373]: INFO: Loading
'/etc/sysconfig/activemq'
Jan 16 22:57:10 activemq activemq[24373]: INFO: Using java 'java'
Jan 16 22:57:10 activemq activemq[24373]: ERROR: No or outdated process id
in '/var/run/activemq/activemq.pid'
Jan 16 22:57:10 activemq activemq[24373]: INFO: Removing
/var/run/activemq/activemq.pid
*Jan 16 22:57:10 activemq systemd[1]: activemq.service: control process
exited, code=exited status=1*
*Jan 16 22:57:10 activemq systemd[1]: Unit activemq.service entered failed
state.*
If I look at the logs I see the following error:
2015-01-16 22:57:09,682 [main ] ERROR XBeanBrokerFactory
- *Failed to load: class path resource [activemq.xml], reason: Line 69
in XML document from class path resource [activemq.xml] is invalid;* nested
exception is org.xml.sax.SAXParseException; lineNumber: 69; columnNumber:
69;* Element type "authorizationEntry" must be followed by either attribute
specifications, ">" or "/>".*
The problem, I think is with this section (as pointed out in that log
message):
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
* <authorizationEntry queue="mcollective.
>"write="clients" read="clients" admin="clients"/>*
<authorizationEntry topic="mcollective.
>"write="clients" read="clients" admin="clients"/>
<authorizationEntry queue="mcollective.nodes"
read="servers" admin="servers"/>
<authorizationEntry queue="mcollective.reply.
>"write="servers" admin="servers"/>
<authorizationEntry topic="mcollective.*.agent"
read="servers" admin="servers"/>
<authorizationEntry
topic="mcollective.registration.agent" write="servers" read="servers"
admin="servers"/>
<authorizationEntry topic="ActiveMQ.Advisory. >"
read="everyone" write="everyone" admin="everyone"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
I show line 69 highlighted and in bold in the above entry.
Can anyone tell me where my mistake is? I'm enclosing the entire XML file
as an attachment. As reference, in case the greater context can yield any
clues.
Thanks!
Tim
--
GPG me!!
gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean>
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq.jokefire.com" dataDirectory="${activemq.data}" schedulePeriodForDestinationPurge="60000">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false" memoryLimit="1mb">
<!-- The constantPendingMessageLimitStrategy is used to prevent
slow topic consumers to block producers and affect other consumers
by limiting the number of messages that are retained
For more information, see:
http://activemq.apache.org/slow-consumer-handling.html
-->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" memoryLimit="10mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="300000" />
</policyEntries>
</policyMap>
</destinationPolicy>
<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="client" password="h6R8eH1A3w6ZpVHMl/qxhTuqYNkYN8gVxxBDBeJ+jMM=" groups="servers, clients, everyone" />
<authenticationUser username="server" password="6kbKwLyjsT11r9TSw1sEgePjZrqTzN54r4ZJpQ4Iu/M=" groups="servers, everyone" />
</users>
</simpleAuthenticationPlugin>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue="mcollective. >"write="clients" read="clients" admin="clients"/>
<authorizationEntry topic="mcollective. >"write="clients" read="clients" admin="clients"/>
<authorizationEntry queue="mcollective.nodes" read="servers" admin="servers"/>
<authorizationEntry queue="mcollective.reply. >"write="servers" admin="servers"/>
<authorizationEntry topic="mcollective.*.agent" read="servers" admin="servers"/>
<authorizationEntry topic="mcollective.registration.agent" write="servers" read="servers" admin="servers"/>
<authorizationEntry topic="ActiveMQ.Advisory. >" read="everyone" write="everyone" admin="everyone"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
`</plugins>
<!--
The managementContext is used to configure how ActiveMQ is exposed in
JMX. By default, ActiveMQ uses the MBean server that is started by
the JVM. For more information, see:
http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<!--
Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see:
http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
<!--
The systemUsage controls the maximum amount of space the broker will
use before disabling caching and/or slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html
-->
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage percentOfJvmHeap="70" />
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<!--
The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see:
http://activemq.apache.org/configuring-transports.html
-->
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>
</broker>
<!--
Enable web consoles, REST and Ajax APIs and demos
The web consoles requires by default login, you can disable this in the jetty.xml file
Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-->
<!--
<import resource="jetty.xml"/>
-->
</beans>
<!-- END SNIPPET: example -->