While working with Kubernetes for non-ActiveMQ things I've observed
situations where a deployment starts a replacement pod before the prior pod
was fully terminated. Might that be what's going on, a race condition where
your two programs competing for the lock are the previous and current pods
from this one deployment?

Tim

On Tue, Aug 10, 2021, 12:36 PM Jean-Baptiste Onofré <j...@nanthrax.net> wrote:

> The lock file is located in the kahadb folder (by default it's
> $ACTIVEMQ_HOME/data/kahadb/lock file).
>
> Regards
> JB
>
> On 10/08/2021 19:15, Fabrice Triboix wrote:
> > Hi JB,
> >
> > I think the timeout is too long and Kubernetes kills the pod. What is
> the location of the lock file?
> >
> > Cheers,
> >
> >    Fabrice
> >
> > ________________________________
> > From: Jean-Baptiste Onofré <j...@nanthrax.net>
> > Sent: 10 August 2021 18:04
> > To: users@activemq.apache.org <users@activemq.apache.org>
> > Subject: Re: How to disable KahaDB lock?
> >
> > CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
> >
> >
> > There's a timeout on the lock and so. Even if you kill the activemq
> > process, it should not be a problem.
> >
> > When you say "terminated", you mean killed right ?
> >
> > Regards
> > JB
> >
> > On 10/08/2021 18:15, Fabrice Triboix wrote:
> >> Hi JB,
> >>
> >> Thanks for your answer. Please note I don't know much about ActiveMQ
> and I work as a DevOps. I just want ActiveMQ to start every time, even if
> it is restarted after a crash. At the moment, I get this error about KahaDB
> lock and I know for a fact that this broker is the only broker that
> accesses this KahaDB. I can only conclude that ActiveMQ exited abnormally
> and didn't release the lock, and that consequently every time it is
> restarted it complains about the lock and goes into slave move.
> >>
> >> In our setup, ActiveMQ might be terminated at any time and without
> warning. When it is subsequently restarted, it must work.
> >>
> >> Could you please let me know how to do that?
> >>
> >> Thanks,
> >>
> >>     Fabrice
> >>
> >> ________________________________
> >> From: JB Onofré <j...@nanthrax.net>
> >> Sent: 10 August 2021 16:53
> >> To: users@activemq.apache.org <users@activemq.apache.org>
> >> Subject: Re: How to disable KahaDB lock?
> >>
> >> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
> >>
> >>
> >> Hi
> >>
> >> No as soon  as a broker start with kahadb it lock kahadb.
> >>
> >> Imho you have a file system issue or config: I never had locking issue
> with kahadb.
> >>
> >> You can always remove the lock manually but I would check if you don’t
> have another process or so.
> >>
> >> Regards
> >> JB
> >>
> >>> Le 10 août 2021 à 17:46, Fabrice Triboix <fabrice.trib...@armedia.com>
> a écrit :
> >>>
> >>> Hi everyone,
> >>>
> >>> It seems that when ActiveMQ terminates uncleanly, it leaves a lock on
> the Kaha DB. Next time it starts, it complains that the DB is locked and
> goes in slave mode.
> >>>
> >>> In my setup, I am 100% certain that a given broker will access one and
> only one KahaDB, so I would like to configure ActiveMQ so that it doesn't
> put a lock on KahaDB. Is that possible? If yes, how?
> >>>
> >>> Thanks a lot for your help!
> >>>
> >>>    Fabrice
> >>
>

Reply via email to