I am trying to get mcollective running. Having issues with activemq.

Here is it restarting, seems fine:

[root@puppet activemq]# service activemq restart
INFO: Loading '/etc/sysconfig/activemq'
INFO: Using java 'java'
INFO: Loading '/etc/sysconfig/activemq'
INFO: Using java 'java'
INFO: changing to user 'activemq' to invoke java
INFO: Waiting at least 30 seconds for regular process termination of pid 
'12430' :
Java Runtime: Oracle Corporation 1.7.0_71 
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre
  Heap sizes: current=506816k  free=504020k  max=506816k
    JVM args: -Xms512m -Xmx512m 
-Djava.util.logging.config.file=logging.properties -Dhawtio.realm=activemq 
-Dhawtio.role=admins 
-Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal 
-Djava.security.auth.login.config=/etc/activemq/login.config 
-Dactivemq.classpath=/etc/activemq; -Dactivemq.home=/usr/share/activemq 
-Dactivemq.base=/usr/share/activemq -Dactivemq.conf=/etc/activemq 
-Dactivemq.data=/usr/share/activemq/data
Extensions classpath:
  
[/usr/share/activemq/lib,/usr/share/activemq/lib/camel,/usr/share/activemq/lib/optional,/usr/share/activemq/lib/web,/usr/share/activemq/lib/extra]
ACTIVEMQ_HOME: /usr/share/activemq
ACTIVEMQ_BASE: /usr/share/activemq
ACTIVEMQ_CONF: /etc/activemq
ACTIVEMQ_DATA: /usr/share/activemq/data
Connecting to pid: 12430
.Stopping broker: localhost
. FINISHED
INFO: Loading '/etc/sysconfig/activemq'
INFO: Using java 'java'
activemq not running
INFO: Loading '/etc/sysconfig/activemq'
INFO: Using java 'java'
INFO: Starting - inspect logfiles specified in logging.properties and 
log4j.properties to get details
INFO: changing to user 'activemq' to invoke java
INFO: pidfile created : '/var/run/activemq/activemq.pid' (pid '12774')
INFO: Loading '/etc/sysconfig/activemq'
INFO: Using java 'java'
activemq is running (pid '12774')

However when I attempt to run mco ping -v it doesnt respond, so when I stop 
it it comes back with the following error:

[root@puppet activemq]# mco ping -v
^C
The ping application failed to run: Could not connect to ActiveMQ Server:

Could not connect to ActiveMQ Server:  (RuntimeError)
        from /usr/libexec/mcollective/mcollective/connector/activemq.rb:248:in 
`connect'  <----
        from /usr/lib/ruby/site_ruby/1.8/mcollective/client.rb:18:in 
`initialize'
        from /usr/libexec/mcollective/mcollective/application/ping.rb:52:in 
`new'
        from /usr/libexec/mcollective/mcollective/application/ping.rb:52:in 
`main'
        from /usr/lib/ruby/site_ruby/1.8/mcollective/application.rb:291:in `run'
        from /usr/lib/ruby/site_ruby/1.8/mcollective/applications.rb:23:in `run'
        from /usr/bin/mco:24

Here are my configs:

activemq.xml:

[root@puppet activemq]# cat activemq.xml
<beans
  xmlns="http://www.springframework.org/schema/beans";
  xmlns:amq="http://activemq.apache.org/schema/core";
  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-2.0.xsd
  http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring 
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>

    <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.base}/conf/credentials.properties</value>
        </property>
    </bean>

    <!--
      For more information about what MCollective requires in this file,
      see http://docs.puppetlabs.com/mcollective/deploy/middleware/activemq.html
    -->

    <!--
      WARNING: The elements that are direct children of <broker> MUST BE IN
      ALPHABETICAL ORDER. This is fixed in ActiveMQ 5.6.0, but affects
      previous versions back to 5.4.
      https://issues.apache.org/jira/browse/AMQ-3570
    -->
    <broker xmlns="http://activemq.apache.org/schema/core"; 
brokerName="localhost" useJmx="true" schedulePeriodForDestinationPurge="60000">
        <!--
          MCollective generally expects producer flow control to be turned off.
          It will also generate a limitless number of single-use reply queues,
          which should be garbage-collected after about five minutes to conserve
          memory.

          For more information, see:
          http://activemq.apache.org/producer-flow-control.html
        -->
        <destinationPolicy>
          <policyMap>
            <policyEntries>
              <policyEntry topic=">" producerFlowControl="false"/>
              <policyEntry queue="*.reply.>" gcInactiveDestinations="true" 
inactiveTimoutBeforeGC="300000" />
            </policyEntries>
          </policyMap>
        </destinationPolicy>

        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

        <plugins>
          <statisticsBrokerPlugin/>

          <!--
            This configures the users and groups used by this broker. Groups
            are referenced below, in the write/read/admin attributes
            of each authorizationEntry element.
          -->
          <simpleAuthenticationPlugin>
            <users>
              <authenticationUser username="mcollective" password="marionette" 
groups="mcollective,everyone"/>
              <authenticationUser username="admin" password="secret" 
groups="mcollective,admins,everyone"/>
            </users>
          </simpleAuthenticationPlugin>

          <!--
            Configure which users are allowed to read and write where. 
Permissions
            are organized by group; groups are configured above, in the
            authentication plugin.

            With the rules below, both servers and admin users belong to group
            mcollective, which can both issue and respond to commands. For an
            example that splits permissions and doesn't allow servers to issue
            commands, see:
            
http://docs.puppetlabs.com/mcollective/deploy/middleware/activemq.html#detailed-restrictions
          -->
          <authorizationPlugin>
            <map>
              <authorizationMap>
                <authorizationEntries>
                  <authorizationEntry queue=">" write="admins" read="admins" 
admin="admins" />
                  <authorizationEntry topic=">" write="admins" read="admins" 
admin="admins" />
                  <authorizationEntry topic="mcollective.>" write="mcollective" 
read="mcollective" admin="mcollective" />
                  <authorizationEntry queue="mcollective.>" write="mcollective" 
read="mcollective" admin="mcollective" />
                  <!--
                    The advisory topics are part of ActiveMQ, and all users 
need access to them.
                    The "everyone" group is not special; you need to ensure 
every user is a member.
                  -->
                  <authorizationEntry topic="ActiveMQ.Advisory.>" 
read="everyone" write="everyone" admin="everyone"/>
                </authorizationEntries>
              </authorizationMap>
            </map>
          </authorizationPlugin>
        </plugins>

        <!--
          The systemUsage controls the maximum amount of space the broker will
          use for messages. For more information, see:
          
http://docs.puppetlabs.com/mcollective/deploy/middleware/activemq.html#memory-and-temp-usage-for-messages-systemusage
        -->
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="20 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

        <!--
          The transport connectors allow ActiveMQ to listen for connections over
          a given protocol. MCollective uses Stomp, and other ActiveMQ brokers
          use OpenWire. You'll need different URLs depending on whether you are
          using TLS. For more information, see:

          
http://docs.puppetlabs.com/mcollective/deploy/middleware/activemq.html#transport-connectors
        -->
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
            <transportConnector name="stomp+nio" 
uri="stomp+nio://0.0.0.0:61613"/>
            <!-- If using TLS, uncomment this and comment out the previous 
connector:
              <transportConnector name="stomp+ssl" 
uri="stomp+ssl://0.0.0.0:61614?needClientAuth=true&amp;transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2"/>
            -->
        </transportConnectors>
    </broker>

    <!--
      Enable web consoles, REST and Ajax APIs and demos.
      It also includes Camel (with its web console); see 
${ACTIVEMQ_HOME}/conf/camel.xml for more info.

      See ${ACTIVEMQ_HOME}/conf/jetty.xml for more details.
    -->
    <import resource="jetty.xml"/>
</beans>

server.cfg:

[root@puppet mcollective]# cat server.cfg
main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logfile = /var/log/mcollective.log
loglevel = info
daemonize = 1
direct_addressing = 1

# Plugins
securityprovider = psk
plugin.psk = unset
plugin.actionpolicy.allow_unconfigured = 1
plugin.activemq.base64 = yes
connector = activemq
plugin.activemq.pool.1.host = puppet.foundry.test
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.port = 6163
plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = marionette

# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml

activemq log file:

[root@puppet mcollective]# cat /var/log/activemq/activemq.log 2014-11-04 
13:17:40,024 [main ] INFO XBeanBrokerFactory$1
- Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@7497e90e: 
startup date [Tue Nov 04 13:17:40 CST 2014]; root of context hierarchy 
2014-11-04 13:17:43,113 [main ] INFO PListStoreImpl
- PListStore:[/usr/share/activemq/activemq-data/localhost/tmp_storage] 
started 2014-11-04 13:17:43,191 [main ] INFO BrokerService - Using 
Persistence Adapter: 
KahaDBPersistenceAdapter[/usr/share/activemq/activemq-data/localhost/KahaDB] 
2014-11-04 13:17:43,198 [main ] INFO SharedFileLocker
- Database activemq-data/localhost/KahaDB/lock is locked... waiting 10 
seconds for the database to be unlocked. Reason: java.io.IOException: 
Failed to create directory 'activemq-data/localhost/KahaDB' 2014-11-04 
13:17:53,199 [main ] INFO SharedFileLocker - Database 
activemq-data/localhost/KahaDB/lock is locked... waiting 10 seconds for the 
database to be unlocked. Reason: java.io.IOException: Failed to create 
directory 'activemq-data/localhost/KahaDB' 2014-11-04 13:18:03,199 [main ] 
INFO SharedFileLocker - Database activemq-data/localhost/KahaDB/lock is 
locked... waiting 10 seconds for the database to be unlocked. Reason: 
java.io.IOException: Failed to create directory 
'activemq-data/localhost/KahaDB' 2014-11-04 13:18:13,200 [main ] INFO 
SharedFileLocker - Database activemq-data/localhost/KahaDB/lock is 
locked... waiting 10 seconds for the database to be unlocked. Reason: 
java.io.IOException: Failed to create directory 
'activemq-data/localhost/KahaDB' 2014-11-04 13:18:23,201 [main ] INFO 
SharedFileLocker - Database activemq-data/localhost/KahaDB/lock is 
locked... waiting 10 seconds for the database to be unlocked. Reason: 
java.io.IOException: Failed to create directory 
'activemq-data/localhost/KahaDB' 2014-11-04 13:18:33,202 [main ] INFO 
SharedFileLocker - Database activemq-data/localhost/KahaDB/lock is 
locked... waiting 10 seconds for the database to be unlocked. Reason: 
java.io.IOException: Failed to create directory 
'activemq-data/localhost/KahaDB'

Its this last part that seems to be causing the error. Forewarned, I am 2 
weeks in to Linux, but learning fast. I can't seem to resolve this issue 
alone. The service is running.

Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bdf6d6d6-c75f-4262-9d37-9b8258daeaca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to