You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by zhjt80 <tz...@paciolan.com> on 2013/07/17 20:10:56 UTC

ActiveMQ 5.7 master/salve nfs4 both active

Hi

I am using activemq 5.7, mount netapp  NFS4 as share file system for
master/slave.
I got a issue,
When the master is up and slave is standby, our Share file system NetApp is
unavailable or network connection is down for 1-2 minutes,  then the master
is up and slave is also up. They are both get the nfs lock. 

How could you fix avoid this problem?

Is there any solution to for this?

Thanks




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by Paul Gale <pa...@gmail.com>.
I see. I didn't realize you were using the old deprecated
KahaPersistenceAdapter.

On Fri, Jul 19, 2013 at 2:43 PM, zhjt80 <tz...@paciolan.com> wrote:
> I upgrade the CentOS form 6.0 to 6.2, the high CPU issue is gone.
>
> I think the KahaPersistenceAdapter default already include the share file
> lock, we don't need to define it, isn't it?
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669526.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by zhjt80 <tz...@paciolan.com>.
I upgrade the CentOS form 6.0 to 6.2, the high CPU issue is gone.

I think the KahaPersistenceAdapter default already include the share file
lock, we don't need to define it, isn't it?





--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669526.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by Paul Gale <pa...@gmail.com>.
Shouldn't there be a Shared File Locker element defined inside your
kahaPersistenceAdapter?

See this page for examples:
http://activemq.apache.org/pluggable-storage-lockers.html


On Thu, Jul 18, 2013 at 4:29 PM, zhjt80 <tz...@paciolan.com> wrote:
> Thanks for your quick reply, Ceposta.
>
> I tested with below scenes,
> Master and Slave are both running on centos 6.0, kernal 2.6.32-71.el6.x86_64
> 1. Master and salve connect to the NFSv4 server. Master get the lock.
> 2. I stop the NFS server for a while(about 3 minutes). Make NFS server
> available again.
> 3. The master CPU usage is very high, about 80%. the Process rpciod consume
> most of CPU.
> 4. The slave are also up.
>
> I need to restart master server.
>
> I also test with only one activeMQ server with NFS unavaiable, after NFS
> resume,  the CPU usage still very high.
> What's cause this happen? Is there a work around?
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669482.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by zhjt80 <tz...@paciolan.com>.
Thanks for your quick reply, Ceposta.

I tested with below scenes,
Master and Slave are both running on centos 6.0, kernal 2.6.32-71.el6.x86_64 
1. Master and salve connect to the NFSv4 server. Master get the lock.
2. I stop the NFS server for a while(about 3 minutes). Make NFS server
available again.
3. The master CPU usage is very high, about 80%. the Process rpciod consume
most of CPU.
4. The slave are also up.

I need to restart master server.

I also test with only one activeMQ server with NFS unavaiable, after NFS
resume,  the CPU usage still very high.
What's cause this happen? Is there a work around?




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669482.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by Christian Posta <ch...@gmail.com>.
I've seen this before at a client with NFSv4, they ended up writing they're
own locker to work around this bug. You'll have to double check what kind
of locking your filesystem supports.


On Wed, Jul 17, 2013 at 2:10 PM, zhjt80 <tz...@paciolan.com> wrote:

> Hi
>
> I am using activemq 5.7, mount netapp  NFS4 as share file system for
> master/slave.
> I got a issue,
> When the master is up and slave is standby, our Share file system NetApp is
> unavailable or network connection is down for 1-2 minutes,  then the master
> is up and slave is also up. They are both get the nfs lock.
>
> How could you fix avoid this problem?
>
> Is there any solution to for this?
>
> Thanks
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by zhjt80 <tz...@paciolan.com>.
The activemq.xml file


<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.xsd
  http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

    
    <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>



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

        

        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="true">
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="true"
memoryLimit="1mb">
                  <pendingQueuePolicy>
                    <vmQueueCursor/>
                  </pendingQueuePolicy>
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy>

        
        
        <persistenceAdapter>
            <kahaDB directory="${activemq.data}/kahadb"
enableJournalDiskSyncs="false" indexWriteBatchSize="10000"
indexCacheSize="1000"/>
        </persistenceAdapter>


        
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="64 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="2 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="512 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
        
        
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
        </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/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669478.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by Paul Gale <pa...@gmail.com>.
Please post the contents of your activemq.xml config file.

On Thu, Jul 18, 2013 at 12:44 PM, zhjt80 <tz...@paciolan.com> wrote:
> Could anybody help me ?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669470.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.7 master/salve nfs4 both active

Posted by zhjt80 <tz...@paciolan.com>.
Could anybody help me ?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-7-master-salve-nfs4-both-active-tp4669415p4669470.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.