activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smartin <sm.junkm...@gmail.com>
Subject Trouble setting up ReplicatedLevelDB / zookeeper for AMQ 5.9.1
Date Thu, 15 May 2014 18:29:34 GMT
I've been banging my head against the wall for a few hours trying to get this
going, but am unable to see where the issue is. I'm trying to setup a 3
broker / 3 zookeeper node config. Zookeeper start fine on all three servers,
but when I start ActiveMQ on the master node I get the following in
activemq.log. The activemq.xml config file is below the log output.

Any help would be greatly appreciated.

activemq.log
###########
2014-05-15 15:13:08,590 | DEBUG | Using class path resource [activemq.xml]
from activemq.xml | org.apache.activemq.xbean.XBeanBrokerFactory | main
2014-05-15 15:13:08,627 | INFO  | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@2e3f8a3e: startup date [Thu
May 15 15:13:08 ADT 2014]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2014-05-15 15:13:09,482 | DEBUG | Bean factory for
org.apache.activemq.xbean.XBeanBrokerFactory$1@2e3f8a3e:
org.springframework.beans.factory.support.DefaultListableBeanFactory@3302a252:
defining beans
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.apache.activemq.xbean.XBeanBrokerService#0,securityLoginService,securityConstraint,adminSecurityConstraint,securityConstraintMapping,adminSecurityConstraintMapping,securityHandler,contexts,jettyPort,Server];
root of factory hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 |
main
2014-05-15 15:13:09,607 | DEBUG | Unable to locate MessageSource with name
'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@22ebc6bf] |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2014-05-15 15:13:09,610 | DEBUG | Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster': using
default
[org.springframework.context.event.SimpleApplicationEventMulticaster@2a4354cb]
| org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2014-05-15 15:13:09,956 | INFO  | Using Persistence Adapter: Replicated
LevelDB[/opt/sphere/activemq-5.9.1/data, dev1-server:2181, dev2-server:2181,
dev3-server:2181//store/activemq/leveldb-stores] |
org.apache.activemq.broker.BrokerService | main
2014-05-15 15:13:10,046 | DEBUG | addEvent: NONE => CONNECTING |
org.apache.activemq.leveldb.replicated.groups.ZKClient | main
2014-05-15 15:13:10,046 | INFO  | Starting StateChangeDispatcher |
org.apache.activemq.leveldb.replicated.groups.ZKClient | ZooKeeper state
change dispatcher thread
2014-05-15 15:13:10,057 | INFO  | Client
environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,057 | INFO  | Client environment:host.name=dev1-server |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,057 | INFO  | Client environment:java.version=1.7.0_25 |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,057 | INFO  | Client environment:java.vendor=Oracle
Corporation | org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,057 | INFO  | Client
environment:java.home=/usr/lib/jvm/jdk1.7.0_25/jre |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,057 | INFO  | Client
environment:java.class.path=/opt/sphere/activemq-5.9.1/bin/activemq.jar |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,057 | INFO  | Client
environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
| org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client
environment:java.io.tmpdir=/opt/sphere/activemq-5.9.1/tmp |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client environment:java.compiler=<NA> |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client environment:os.name=Linux |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client environment:os.arch=amd64 |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client
environment:os.version=3.2.0-32-virtual | org.apache.zookeeper.ZooKeeper |
main
2014-05-15 15:13:10,058 | INFO  | Client environment:user.name=devuser1 |
org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client
environment:user.home=/home/devuser1 | org.apache.zookeeper.ZooKeeper | main
2014-05-15 15:13:10,058 | INFO  | Client environment:user.dir=/opt/sphere |
org.apache.zookeeper.ZooKeeper | main

2014-05-15 15:13:10,059 | INFO  | Initiating client connection,
connectString=dev1-server:2181, dev2-server:2181, dev3-server:2181
sessionTimeout=2000
watcher=org.apache.activemq.leveldb.replicated.groups.ZKClient@2457c24c |
org.apache.zookeeper.ZooKeeper | main

2014-05-15 15:13:10,075 | ERROR | Failed to start Apache ActiveMQ ([pubsub,
null], org.linkedin.util.exceptions.InternalException:
org.linkedin.zookeeper.client.ZooKeeperFactory) |
org.apache.activemq.broker.BrokerService | main

2014-05-15 15:13:10,076 | INFO  | Apache ActiveMQ 5.9.1 (pubsub, null) is
shutting down | org.apache.activemq.broker.BrokerService | main

2014-05-15 15:13:10,077 | INFO  | Connector openwire stopped |
org.apache.activemq.broker.TransportConnector | main
2014-05-15 15:13:10,077 | INFO  | Connector amqp stopped |
org.apache.activemq.broker.TransportConnector | main
2014-05-15 15:13:10,077 | INFO  | Connector stomp stopped |
org.apache.activemq.broker.TransportConnector | main
2014-05-15 15:13:10,077 | INFO  | Connector mqtt stopped |
org.apache.activemq.broker.TransportConnector | main
2014-05-15 15:13:10,078 | INFO  | Connector ws stopped |
org.apache.activemq.broker.TransportConnector | main
2014-05-15 15:13:10,081 | DEBUG | Unregistering MBean
org.apache.activemq:type=Broker,brokerName=pubsub,Service=PersistenceAdapter,InstanceName=LevelDB[/opt/sphere/activemq-5.9.1/data],view=Replication
| org.apache.activemq.broker.jmx.ManagementContext | main
2014-05-15 15:13:10,082 | ERROR | Could not stop service: Replicated
LevelDB[/opt/sphere/activemq-5.9.1/data, dev1-server:2181, dev2-server:2181,
dev3-server:2181//store/activemq/leveldb-stores]. Reason:
java.lang.NullPointerException |
org.apache.activemq.store.leveldb.ReplicatedLevelDBPersistenceAdapter | main
java.lang.NullPointerException
	at
org.apache.activemq.leveldb.replicated.ElectingLevelDBStore.doStop(ElectingLevelDBStore.scala:276)
	at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:71)
	at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:41)
	at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:775)
	at
org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:601)
	at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1



activemq.xml
###########
<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">

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

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="pubsub" dataDirectory="${activemq.data}">

        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" >
                    
                  <pendingMessageLimitStrategy>
                    <constantPendingMessageLimitStrategy limit="1000"/>
                  </pendingMessageLimitStrategy>
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy>

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

        <persistenceAdapter>
            <replicatedLevelDB
                directory="${activemq.data}"
                replicas="3"
                bind="tcp://0.0.0.0:0"
                zkAddress="dev1-server:2181,
                           dev2-server:2181,
                           dev3-server:2181"
                zkPassword=""
                zkPath="/store/activemq/leveldb-stores"
                hostname="dev1-server"
            />
        </persistenceAdapter>

        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage percentOfJvmHeap="70" />
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="100 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="50 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
<transportConnectors>
            
            <transportConnector name="openwire"
uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="amqp"
uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp"
uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt"
uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws"
uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        </transportConnectors>

        
        <shutdownHooks>
            <bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.activemq.hooks.SpringContextHook" />
        </shutdownHooks>

    </broker>

    
    <import resource="jetty.xml"/>

</beans>





--
View this message in context: http://activemq.2283324.n4.nabble.com/Trouble-setting-up-ReplicatedLevelDB-zookeeper-for-AMQ-5-9-1-tp4681151.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message