SMB 3.0 as shared filesystem for kahaDB in Master/Slave

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SMB 3.0 as shared filesystem for kahaDB in Master/Slave

cezkuj
Hi!

Is it possible to run ActiveMQ in Master/Slave scenario using SMB as shared
fs on Linux? Have anyone proved it to work?

I've searched this mail list and other resources and have not found a lot of
documentation on this topic. Few pages say that either it should work or it
works only for Windows SMB. I have decided to try it - in short words, it
does not work for our setup. Long description of whole setup below.

I'm trying to run ActiveMQ 5.15.0 in Master/Slave scenario with SMB3.0 (all
according to
https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux
, both VMs can use shared folder properly) as shared fs on Linux (being
concrete, docker containers running on alpine images on Centos 7.5). We use
KahaDB as storage and it works perfectly fine with NFSv4 and fails on Slave
takeover with SMB.

After installation, everything looks fine and promising. One of containers
is up and running in master mode, while the other one is "slave mode waiting
a lock to be acquired".

Then, after restart/removal of Master instance, Slave takes over lock for
very short time (in logs I can see that storage is started and lock is
acquired). Shortly after that, it fails with "localhost, no longer able to
keep the exclusive lock so giving up being a master" and everything starts
to stop one by one. Whole folder with data is corrupted and ActiveMQ fails
to start (same error with "no longer able ..." as above), even if there is
only one instance of broker using shared fs.

Any clues what is wrong there? My approach may be naive, I have only changed
shared fs from NFSv4 to SMB - everything else is the same.

Kind regards,
Cezary Kujawski



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: SMB 3.0 as shared filesystem for kahaDB in Master/Slave

Tim Bain
You're the only person I've heard of trying to use a SMB share as the
filesystem for a KahaDB master-slave configuration during the four years
I've been watching this list, so it's quite possible that the file-locking
semantics of SMB don't allow ActiveMQ to use SMB for locking (to determine
which broker is the master).

But even if it doesn't work for that, there should be no reason why you
couldn't use the SMB share for the KahaDB files, and then use something
else (a SQL database, a very small NFS4 share, even a Zookeeper cluster if
you were willing to implement the appropriate interface for it) for the
locking behavior via the pluggable storage locker capability:
http://activemq.apache.org/pluggable-storage-lockers.html

Tim

On Thu, Sep 6, 2018, 7:12 AM cezkuj <[hidden email]> wrote:

> Hi!
>
> Is it possible to run ActiveMQ in Master/Slave scenario using SMB as shared
> fs on Linux? Have anyone proved it to work?
>
> I've searched this mail list and other resources and have not found a lot
> of
> documentation on this topic. Few pages say that either it should work or it
> works only for Windows SMB. I have decided to try it - in short words, it
> does not work for our setup. Long description of whole setup below.
>
> I'm trying to run ActiveMQ 5.15.0 in Master/Slave scenario with SMB3.0 (all
> according to
>
> https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux
> , both VMs can use shared folder properly) as shared fs on Linux (being
> concrete, docker containers running on alpine images on Centos 7.5). We use
> KahaDB as storage and it works perfectly fine with NFSv4 and fails on Slave
> takeover with SMB.
>
> After installation, everything looks fine and promising. One of containers
> is up and running in master mode, while the other one is "slave mode
> waiting
> a lock to be acquired".
>
> Then, after restart/removal of Master instance, Slave takes over lock for
> very short time (in logs I can see that storage is started and lock is
> acquired). Shortly after that, it fails with "localhost, no longer able to
> keep the exclusive lock so giving up being a master" and everything starts
> to stop one by one. Whole folder with data is corrupted and ActiveMQ fails
> to start (same error with "no longer able ..." as above), even if there is
> only one instance of broker using shared fs.
>
> Any clues what is wrong there? My approach may be naive, I have only
> changed
> shared fs from NFSv4 to SMB - everything else is the same.
>
> Kind regards,
> Cezary Kujawski
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
Reply | Threaded
Open this post in threaded view
|

Re: SMB 3.0 as shared filesystem for kahaDB in Master/Slave

cezkuj
Hi!

Sad to be the only one :(.
I will try if approach suggested by you satisfies my needs (I don't want to
overcomplicate whole setup)

Thanks for response.

I will bump it when I found easiest way to solve my problem :)

Kind regards,
Cezary




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html