Can you reproduce this locally (i.e. both primary & backup running on the
same machine pointing to a shared directory)? If so, that indicates a
problem with the broker itself. If not, that indicates a problem with
either your configuration or environment (e.g. file-locking on NFS not
working properly).

I just did a quick proof-of-concept with 2 brokers on the same machine in a
share-store configuration and everything worked fine. I started the
primary, and it activated properly. Then I started the backup, and it
remained passive. I stopped the primary, and the backup activated as
expected. I restarted the primary which initiated a fail-back so the backup
restarted as passive and the primary activated.

Without more details on your environment and/or configuration I can't
really say what your problem might be.


Justin

On Thu, Mar 7, 2024 at 2:48 PM Gunawan, Rahman (GSFC-703.H)[Halvik Corp]
<rahman.guna...@nasa.gov.invalid> wrote:

> There are 2 issues here:
> 1. When backup server started, it immediately obtain the lock and shutdown
> primary.  Thus, there is no standby mode, just in case primary failed.
> 2. Even I added <allow-failback>true</allow-failback>, it still didn't
> shutdown backup server when primary is up.
>
> I'm using artemis 2.32.0.
>
> Regards,
> Rahman Gunawan
> NASA/SEWP
> Software Developer
>
> -----Original Message-----
> From: Justin Bertram <jbert...@apache.org>
> Sent: Thursday, March 7, 2024 3:40 PM
> To: users@activemq.apache.org
> Subject: [EXTERNAL] [BULK] Re: Shared store config
>
> CAUTION: This email originated from outside of NASA.  Please take care
> when clicking links or opening attachments.  Use the "Report Message"
> button to report suspicious messages to the NASA SOC.
>
>
>
>
> I believe you need to set <allow-failback>true</allow-failback> on the
> backup. See the documentation [1] for more details.
>
>
> Justin
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/ha.html#failing-back-to-primary-server
>
> On Thu, Mar 7, 2024 at 2:31 PM Gunawan, Rahman (GSFC-703.H)[Halvik Corp] <
> rahman.guna...@nasa.gov.invalid> wrote:
>
> > I have been using NFS 4.1 for shared store config.  However; when I
> > started backup server, the primary went down immediately.  But when I
> > restart primary, the secondary didn't go down.  Below is my config:
> > Primary broker.xml:
> > <ha-policy>
> >          <shared-store>
> >             <master>
> >                <failover-on-shutdown>true</failover-on-shutdown>
> >                <wait-for-activation>true</wait-for-activation>
> >             </master>
> >          </shared-store>
> >       </ha-policy>
> >
> > Backup broker.xml:
> > <ha-policy>
> >          <shared-store>
> >             <slave>
> >                <failover-on-shutdown>true</failover-on-shutdown>
> >             </slave>
> >          </shared-store>
> >       </ha-policy>
> >
> > Regards,
> > Rahman Gunawan
> > NASA/SEWP
> > Software Developer
> >
> >
>

Reply via email to