activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chrisnicholls <chrisjohnnicho...@gmail.com>
Subject NullPointerException starting slave
Date Mon, 07 Feb 2011 15:03:05 GMT

Hi,

I am trying to configure a share nothing master/slave. When I start the
master everything looks fine in the logs. When I start the slave I see the
following Exception. Things seem to work fine for a bit but then I start
getting a lot more Exceptions after a while. I'm using 5.4.2. My config
files are included at the end of the post.

Will this lead to problems with master/slave synchronization? 

Note: I am also using a network of brokers, but this is independent of that.

2011-02-07 10:16:01,612 | DEBUG | Error occured while processing async
command: BrokerInfo {commandId = 4, responseRequired = false, brokerId =
ID:dv1001-60597-1297087960315-0:1, brokerURL = tcp://dv1001:61616,
slaveBroker = false, masterBroker = false, faultTolerantConfiguration =
false, networkConnection = false, duplexConnection = false, peerBrokerInfos
= [], brokerName = master-A-dv1001, connectionId = 0, brokerUploadUrl =
null, networkProperties = null}, exception: java.lang.NullPointerException |
org.apache.activemq.broker.TransportConnection.Service | VMTransport:
vm://slave-A-dv1002#1
java.lang.NullPointerException
	at
org.apache.activemq.broker.TransportConnector.getConnectionControl(TransportConnector.java:387)
	at
org.apache.activemq.broker.TransportConnector.updateClientClusterInfo(TransportConnector.java:415)
	at
org.apache.activemq.broker.region.RegionBroker.addBrokerInClusterUpdate(RegionBroker.java:905)
	at
org.apache.activemq.broker.region.RegionBroker.addBroker(RegionBroker.java:642)
	at org.apache.activemq.broker.BrokerFilter.addBroker(BrokerFilter.java:185)
	at org.apache.activemq.broker.BrokerFilter.addBroker(BrokerFilter.java:185)
	at org.apache.activemq.broker.BrokerFilter.addBroker(BrokerFilter.java:185)
	at
org.apache.activemq.broker.MutableBrokerFilter.addBroker(MutableBrokerFilter.java:191)
	at
org.apache.activemq.broker.TransportConnection.processBrokerInfo(TransportConnection.java:1232)
	at org.apache.activemq.command.BrokerInfo.visit(BrokerInfo.java:125)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:311)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
	at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:219)
	at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
	at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
2011-02-07 10:16:01,613 | WARN  | Async error occurred:
java.lang.NullPointerException |
org.apache.activemq.broker.TransportConnection.Service | VMTransport:
vm://slave-A-dv1002#1
java.lang.NullPointerException
	at
org.apache.activemq.broker.TransportConnector.getConnectionControl(TransportConnector.java:387)
	at
org.apache.activemq.broker.TransportConnector.updateClientClusterInfo(TransportConnector.java:415)
	at
org.apache.activemq.broker.region.RegionBroker.addBrokerInClusterUpdate(RegionBroker.java:905)
	at
org.apache.activemq.broker.region.RegionBroker.addBroker(RegionBroker.java:642)
	at org.apache.activemq.broker.BrokerFilter.addBroker(BrokerFilter.java:185)
	at org.apache.activemq.broker.BrokerFilter.addBroker(BrokerFilter.java:185)
	at org.apache.activemq.broker.BrokerFilter.addBroker(BrokerFilter.java:185)
	at
org.apache.activemq.broker.MutableBrokerFilter.addBroker(MutableBrokerFilter.java:191)
	at
org.apache.activemq.broker.TransportConnection.processBrokerInfo(TransportConnection.java:1232)
	at org.apache.activemq.command.BrokerInfo.visit(BrokerInfo.java:125)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:311)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
	at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:219)
	at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
	at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)


slave config:
<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">

    <!-- 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.base}/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="slave-A-dv1002" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true"
masterConnectorURI="tcp://dv1001:61616">
 
        <!--
			For better performances use VM cursor and small memory limit.
			For more information, see:
            
            http://activemq.apache.org/message-cursors.html
            
            Also, if your producer is "hanging", it's probably due to
producer flow control.
            For more information, see:
            http://activemq.apache.org/producer-flow-control.html
        -->
              
        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="false"
memoryLimit="1mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="false"
memoryLimit="1mb">
                  <!-- Use VM cursor for better latency
                       For more information, see:
                       
                       http://activemq.apache.org/message-cursors.html
                       
                  <pendingQueuePolicy>
                    <vmQueueCursor/>
                  </pendingQueuePolicy>
                  -->
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy> 
 
        
        <!-- 
            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>

        <networkConnectors>
            <networkConnector
uri="static:(failover:(tcp://dv1002:61616,tcp://dv1001:61626)?randomize=false)"
                              dynamicOnly="true"
                              decreaseNetworkConsumerPriority="false"
                              networkTTL="100"
                              />
        </networkConnectors>

        <!-- 
            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.base}/data/kahadb"/>
        </persistenceAdapter>
        
        
          <!--
            The systemUsage controls the maximum amount of space the broker
will 
            use before slowing down producers. For more information, see:
            
            http://activemq.apache.org/producer-flow-control.html
             
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="20 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </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>
            <transportConnector name="openwire" 
                                uri="tcp://0.0.0.0:61626" 
                                updateClusterClients="true"
                                rebalanceClusterClients="true"
                                updateClusterClientsOnRemove="true"
                                />
        </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
        
        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details 
    -->
    <import resource="jetty.xml"/>
    
</beans>


master config:
<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">

    <!-- 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.base}/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="master-A-dv1001" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true" waitForSlave="true">
 
        <!--
			For better performances use VM cursor and small memory limit.
			For more information, see:
            
            http://activemq.apache.org/message-cursors.html
            
            Also, if your producer is "hanging", it's probably due to
producer flow control.
            For more information, see:
            http://activemq.apache.org/producer-flow-control.html
        -->
              
        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="false"
memoryLimit="1mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="false"
memoryLimit="1mb">
                  <!-- Use VM cursor for better latency
                       For more information, see:
                       
                       http://activemq.apache.org/message-cursors.html
                       
                  <pendingQueuePolicy>
                    <vmQueueCursor/>
                  </pendingQueuePolicy>
                  -->
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy> 
 
        
        <!-- 
            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>

	<networkConnectors>
	    <networkConnector
uri="static:(failover:(tcp://dv1002:61616,tcp://dv1001:61626)?randomize=false)"
	                      dynamicOnly="true"
	                      decreaseNetworkConsumerPriority="false"
	                      networkTTL="100"
	                      />
	</networkConnectors>
	

        <!-- 
            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.base}/data/kahadb"/>
        </persistenceAdapter>
        
        
          <!--
            The systemUsage controls the maximum amount of space the broker
will 
            use before slowing down producers. For more information, see:
            
            http://activemq.apache.org/producer-flow-control.html
             
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="20 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </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>
            <transportConnector name="openwire" 
	                        uri="tcp://0.0.0.0:61616" 
	                        updateClusterClients="true"
	                        rebalanceClusterClients="true"
	                        updateClusterClientsOnRemove="true"
	                        />
        </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
        
        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details 
    -->
    <import resource="jetty.xml"/>
    
</beans>

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/NullPointerException-starting-slave-tp3264279p3264279.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message