You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jdemic <jo...@gmail.com> on 2007/09/05 17:08:49 UTC

ActiveMQ and Linux NFS

Hey All,

I'm attempting to setup activemq in a master/slave configuration as follows:

http://activemq.apache.org/shared-file-system-master-slave.html

I'm setting this up ontop of redhat es3 using the shared journal on an NFS
mount.  When i start the slave, the following occurs:

faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds for
the journal to be unlocked.

This seems like the appopriate behavior (ie, the slave is spinning on the
lock waiting for it to be released.)  The issue is, however, that activemq
exits after an hour and a half of so of attempting this.  I'm not sure if
the issue is due to some interaction between java and nfs locking or an
issue with activemq.  Curious if anyone else has experienced this.

Thanks,
-jd
-- 
View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12499985
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ and Linux NFS

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
Hi
We had the same problem with NFS, I think it's an NFS/Java issue since
there also seem to be problems with other applications.
But someone told me they've it running successful with NFS, so I
suppose it's NFS-implementation/version specific whether locking works
or not (he ran a JVM 1.5.0_08 and RHEL 3/4 with NFS share on a NetApp
SAN running NFS3).

Mario

On 9/5/07, jdemic <jo...@gmail.com> wrote:
>
> Hey All,
>
> I'm attempting to setup activemq in a master/slave configuration as follows:
>
> http://activemq.apache.org/shared-file-system-master-slave.html
>
> I'm setting this up ontop of redhat es3 using the shared journal on an NFS
> mount.  When i start the slave, the following occurs:
>
> faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds for
> the journal to be unlocked.
>
> This seems like the appopriate behavior (ie, the slave is spinning on the
> lock waiting for it to be released.)  The issue is, however, that activemq
> exits after an hour and a half of so of attempting this.  I'm not sure if
> the issue is due to some interaction between java and nfs locking or an
> issue with activemq.  Curious if anyone else has experienced this.
>
> Thanks,
> -jd
> --
> View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12499985
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: ActiveMQ and Linux NFS

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
You can specify your own jdbc adapter class (see
http://activemq.apache.org/jdbc-support.html).
What I'd do is write a mysql adapter (extend the mysql one) and
override the locking statements. You can also rename the mysql adapter
for AMQ 5 (or svn revision 518161/518164) into
MySqlPropertLockingAdaptor (or whatever). Then you configure ActiveMQ
to use this Adapter (see link above) and it should work.. in theory :)

We do the same thing for a SQL-Server locking-problem that isn't fixed
until 5.0.

Mario


On 9/5/07, jdemic <jo...@gmail.com> wrote:
>
> to further respond to my own posts,
>
> just tried to get mysql masterslave going and ran into this bug:
>
> http://www.nabble.com/Master-Slave-locking-with-MYSQL-is-not-working-with-4.1.1-tf3399897s2354.html#a9475786
>
> is there any way to get redundancy working with 4.1.1??
>
>
>
> jdemic wrote:
> >
> > To further complicate this, I just tested failover and the following
> > happened:
> >
> > - i kill -9'd activemq on the master server.
> > - on the slave server, activemq was still spinning on the filesystem lock
> > as per my last email.
> > - when i started up the master again, it started spinning on the
> > filesystem lock and no broker was active.
> > - deleting the data directory from the nfs mount and restarting activemq
> > on the master allowed me to restart the master.
> >
> > My configurations follow.  I would appreciate if someone on the activemq
> > team could get back to me, this is the second clustering option i've now
> > tried that didn't work.  The first such issue was posted here:
> > http://www.nabble.com/Slaving-issue-on-4.1.1-tf4255212s2354.html#a12110238
> > again w/o any response.
> >
> > thx,
> > -jd
> > master:
> > <beans>
> >
> >   <bean
> > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> >
> >   <broker brokerName="localhost" useJmx="false"
> > xmlns="http://activemq.org/config/1.0">
> >
> >     <persistenceAdapter>
> >         <journaledJDBC dataDirectory="/network/activemq"/>
> >     </persistenceAdapter>
> >
> >     <transportConnectors>
> >        <transportConnector name="openwire" uri="tcp://localhost:61616"
> > discoveryUri="multi
> > cast://default"/>
> >     </transportConnectors>
> >
> >   </broker>
> > </beans>
> >
> > slave:
> >
> > <beans>
> >
> >   <bean
> > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> >
> >   <broker brokerName="slave" useJmx="false"
> > xmlns="http://activemq.org/config/1.0">
> >
> >     <persistenceAdapter>
> >         <journaledJDBC dataDirectory="/network/activemq"/>
> >     </persistenceAdapter>
> >
> >     <transportConnectors>
> >        <transportConnector name="openwire" uri="tcp://localhost:61616"
> > discoveryUri="multi
> > cast://default"/>
> >     </transportConnectors>
> >
> >   </broker>
> > </beans>
> >
> > jdemic wrote:
> >>
> >> Hey All,
> >>
> >> I'm attempting to setup activemq in a master/slave configuration as
> >> follows:
> >>
> >> http://activemq.apache.org/shared-file-system-master-slave.html
> >>
> >> I'm setting this up ontop of redhat es3 using the shared journal on an
> >> NFS mount.  When i start the slave, the following occurs:
> >>
> >> faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds
> >> for the journal to be unlocked.
> >>
> >> This seems like the appopriate behavior (ie, the slave is spinning on the
> >> lock waiting for it to be released.)  The issue is, however, that
> >> activemq exits after an hour and a half of so of attempting this.  I'm
> >> not sure if the issue is due to some interaction between java and nfs
> >> locking or an issue with activemq.  Curious if anyone else has
> >> experienced this.
> >>
> >> Thanks,
> >> -jd
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12511594
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: ActiveMQ and Linux NFS

Posted by jdemic <jo...@gmail.com>.
to further respond to my own posts,

just tried to get mysql masterslave going and ran into this bug:

http://www.nabble.com/Master-Slave-locking-with-MYSQL-is-not-working-with-4.1.1-tf3399897s2354.html#a9475786

is there any way to get redundancy working with 4.1.1??



jdemic wrote:
> 
> To further complicate this, I just tested failover and the following
> happened:
> 
> - i kill -9'd activemq on the master server.
> - on the slave server, activemq was still spinning on the filesystem lock
> as per my last email.
> - when i started up the master again, it started spinning on the
> filesystem lock and no broker was active.  
> - deleting the data directory from the nfs mount and restarting activemq
> on the master allowed me to restart the master.
> 
> My configurations follow.  I would appreciate if someone on the activemq
> team could get back to me, this is the second clustering option i've now
> tried that didn't work.  The first such issue was posted here:
> http://www.nabble.com/Slaving-issue-on-4.1.1-tf4255212s2354.html#a12110238
> again w/o any response.  
> 
> thx,
> -jd
> master:
> <beans>
> 
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> 
>   <broker brokerName="localhost" useJmx="false"
> xmlns="http://activemq.org/config/1.0">
> 
>     <persistenceAdapter>
>         <journaledJDBC dataDirectory="/network/activemq"/>
>     </persistenceAdapter>
> 
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multi
> cast://default"/>
>     </transportConnectors>
> 
>   </broker>
> </beans>
> 
> slave:
> 
> <beans>
> 
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> 
>   <broker brokerName="slave" useJmx="false"
> xmlns="http://activemq.org/config/1.0">
> 
>     <persistenceAdapter>
>         <journaledJDBC dataDirectory="/network/activemq"/>
>     </persistenceAdapter>
> 
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multi
> cast://default"/>
>     </transportConnectors>
> 
>   </broker>
> </beans>
> 
> jdemic wrote:
>> 
>> Hey All,
>> 
>> I'm attempting to setup activemq in a master/slave configuration as
>> follows:
>> 
>> http://activemq.apache.org/shared-file-system-master-slave.html
>> 
>> I'm setting this up ontop of redhat es3 using the shared journal on an
>> NFS mount.  When i start the slave, the following occurs:
>> 
>> faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds
>> for the journal to be unlocked.
>> 
>> This seems like the appopriate behavior (ie, the slave is spinning on the
>> lock waiting for it to be released.)  The issue is, however, that
>> activemq exits after an hour and a half of so of attempting this.  I'm
>> not sure if the issue is due to some interaction between java and nfs
>> locking or an issue with activemq.  Curious if anyone else has
>> experienced this.
>> 
>> Thanks,
>> -jd
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12511594
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ and Linux NFS

Posted by jdemic <jo...@gmail.com>.
To further complicate this, I just tested failover and the following
happened:

- i kill -9'd activemq on the master server.
- on the slave server, activemq was still spinning on the filesystem lock as
per my last email.
- when i started up the master again, it started spinning on the filesystem
lock and no broker was active.  
- deleting the data directory from the nfs mount and restarting activemq on
the master allowed me to restart the master.

My configurations follow.  I would appreciate if someone on the activemq
team could get back to me, this is the second clustering option i've now
tried that didn't work.  The first such issue was posted here:
http://www.nabble.com/Slaving-issue-on-4.1.1-tf4255212s2354.html#a12110238
again w/o any response.  

thx,
-jd
master:
<beans>

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

  <broker brokerName="localhost" useJmx="false"
xmlns="http://activemq.org/config/1.0">

    <persistenceAdapter>
        <journaledJDBC dataDirectory="/network/activemq"/>
    </persistenceAdapter>

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multi
cast://default"/>
    </transportConnectors>

  </broker>
</beans>

slave:

<beans>

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

  <broker brokerName="slave" useJmx="false"
xmlns="http://activemq.org/config/1.0">

    <persistenceAdapter>
        <journaledJDBC dataDirectory="/network/activemq"/>
    </persistenceAdapter>

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multi
cast://default"/>
    </transportConnectors>

  </broker>
</beans>

jdemic wrote:
> 
> Hey All,
> 
> I'm attempting to setup activemq in a master/slave configuration as
> follows:
> 
> http://activemq.apache.org/shared-file-system-master-slave.html
> 
> I'm setting this up ontop of redhat es3 using the shared journal on an NFS
> mount.  When i start the slave, the following occurs:
> 
> faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds
> for the journal to be unlocked.
> 
> This seems like the appopriate behavior (ie, the slave is spinning on the
> lock waiting for it to be released.)  The issue is, however, that activemq
> exits after an hour and a half of so of attempting this.  I'm not sure if
> the issue is due to some interaction between java and nfs locking or an
> issue with activemq.  Curious if anyone else has experienced this.
> 
> Thanks,
> -jd
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12511046
Sent from the ActiveMQ - User mailing list archive at Nabble.com.