Dear Pierre, Justin, I encountered the "no longer able to keep etc" many times in last years, with also different AMQ releases.. They are often caused by factors independent from AMQ which in my case were e.g.
* high DB (postgres) read/write latency * DB on heavy load e.g. CPU/RAM/connections * spikes to 100% CPU on the AMQ machine(s) * spikes to 100% RAM on the AMQ machine(s) and so on! So I suggest you to verify the performance of the machines and of the remote DB, if any. Distinti Saluti / Kind Regards M.G. ________________________________ Da: Justin Bertram <jbert...@apache.org> Inviato: mercoledì 27 novembre 2024 17:47 A: users@activemq.apache.org <users@activemq.apache.org> Oggetto: Re: The master node of activemq reboots by itself > But in cluster architecture, the lease-database-locker is necessary to avoid multiple brokers running against the same logical database, no ? That's correct. To be clear, it's perfectly reasonable to use the lease-database-locker. You just need to ensure that the broker can maintain its lease if you don't want it to shut itself down. Refer to the documentation for the lease-database-locker to understand better how it works and how you might ensure it maintains its lease. Justin On Wed, Nov 27, 2024 at 10:36 AM GIRONA Pierre <pierre.gir...@sodiaal.fr.invalid> wrote: > But in cluster architecture, the lease-database-locker is necessary to > avoid multiple brokers running against the same logical database, no ? > > > > [image: cid:image001.png@01D9E63C.D620F290] > > [image: Description : ligne_bleue] > > > *Pierre GIRONA *Référent Middleware > > Centre de compétences DIAE - Data, Intégration & Architecture d’Entreprise > DSI Groupe > > > > 78 rue de la Villette 69425 Lyon Cedex 03 > > Mob. +33 (0)6 73 33 18 50 > > E-mail : pierre.gir...@sodiaal.fr - web : > https://urldefense.com/v3/__http://www.sodiaal.fr__;!!Ck4v2Rc!n_gF_nd1oRm56wTVe1WU0jr10jW9sRJpFLviyPpDqaWI7-FQh5g335eYMKaMhcPR387Coingz2mU6D9y5kUFMw$ > > Avant d'imprimer, merci de penser à l'environnement. > > > > *De :* Justin Bertram <jbert...@apache.org> > *Envoyé :* mercredi 27 novembre 2024 17:07 > *À :* users@activemq.apache.org > *Objet :* Re: The master node of activemq reboots by itself > > > > You've configured the lease-database-locker: <persistenceAdapter> > <jdbcPersistenceAdapter dataDirectory="activemq-data" > dataSource="#postgres-ds" lockKeepAlivePeriod="5000"> <locker> > <lease-database-locker > > You've configured the lease-database-locker: > > > > <persistenceAdapter> > <jdbcPersistenceAdapter dataDirectory="activemq-data" > dataSource="#postgres-ds" lockKeepAlivePeriod="5000"> > <locker> > <lease-database-locker leaseHolderId="i-12890abcdead90" > lockAcquireSleepInterval="10000"/> > </locker> > </jdbcPersistenceAdapter> > </persistenceAdapter> > > > > I recommend taking a look at the documentation for this [1] to understand > better how it works. > > > > > > Justin > > > > [1] > https://urldefense.com/v3/__https://activemq.apache.org/components/classic/documentation/pluggable-storage-lockers*lease-database-locker__;Iw!!Ck4v2Rc!n_gF_nd1oRm56wTVe1WU0jr10jW9sRJpFLviyPpDqaWI7-FQh5g335eYMKaMhcPR387Coingz2mU6D-KE_z-mQ$ > <https://urldefense.com/v3/__https:/activemq.apache.org/components/classic/documentation/pluggable-storage-lockers*lease-database-locker__;Iw!!CpwJqyuz!HH-qvx_syuWjxlz8AUcN73_Gep9bHNPwH8zumxDTmAeJMVf3nWa47-AD3UjtyfLkywlH0ujW7VIjj8tmeC5fS_Q$> > > > > On Wed, Nov 27, 2024 at 9:56 AM GIRONA Pierre < > pierre.gir...@sodiaal.fr.invalid> wrote: > > Hi Justin, > > > > Thanks for your reply. > > > > But how I ensure that the broker is able to maintain its lock ? > > > > You can find attached activemq configuration files. Do you see anything > configured incorrectly? > > > > > > Regards, > > > > [image: cid:image001.png@01D9E63C.D620F290] > > [image: Description : ligne_bleue] > > > *Pierre GIRONA *Référent Middleware > > Centre de compétences DIAE - Data, Intégration & Architecture d’Entreprise > DSI Groupe > > > > 78 rue de la Villette 69425 Lyon Cedex 03 > > Mob. +33 (0)6 73 33 18 50 > > E-mail : pierre.gir...@sodiaal.fr - web : > https://urldefense.com/v3/__http://www.sodiaal.fr__;!!Ck4v2Rc!n_gF_nd1oRm56wTVe1WU0jr10jW9sRJpFLviyPpDqaWI7-FQh5g335eYMKaMhcPR387Coingz2mU6D9y5kUFMw$ > > Avant d'imprimer, merci de penser à l'environnement. > > > > *De :* Justin Bertram <jbert...@apache.org> > *Envoyé :* mercredi 27 novembre 2024 16:47 > *À :* users@activemq.apache.org > *Objet :* Re: The master node of activemq reboots by itself > > > > This seems like an environmental issue of some kind. The error message > clearly states: BROKER_PROD_1, no longer able to keep the exclusive lock so > giving up being a master So, the broker lost its exclusive lock which means > it will shut itself > > This seems like an environmental issue of some kind. The error message > clearly states: > > > > BROKER_PROD_1, no longer able to keep the exclusive lock so giving up > being a master > > > > So, the broker lost its exclusive lock which means it will shut itself > down to avoid split brain. This lock is what the master and the slave > compete for to ensure only one broker is active at a time. You should > ensure that the broker is able to maintain its lock or this will happen. > > > > > > Justin > > > > On Wed, Nov 27, 2024 at 2:22 AM GIRONA Pierre < > pierre.gir...@sodiaal.fr.invalid> wrote: > > Hello, > > > > I have a problem with activeMQ. My configuration is in cluster mode and > once a month or so, the master node reboots by itself. > > Have you ever had this problem? > > > > You can find attached the log files of each nodes. The node 1 restart on > 2024-11-14 at 17:21:21,946 with this error : > > > > BROKER_PROD_1, no longer able to keep the exclusive lock so giving up > being a master | org.apache.activemq.broker.LockableServiceSupport | > ActiveMQ JDBC PA Scheduled Task > > > > Thanks for your help. > > > > [image: Description : ligne_bleue] > > > *Pierre GIRONA *Référent Middleware > > Centre de compétences DIAE - Data, Intégration & Architecture d’Entreprise > DSI Groupe > > > > 78 rue de la Villette 69425 Lyon Cedex 03 > > Mob. +33 (0)6 73 33 18 50 > > E-mail : pierre.gir...@sodiaal.fr - web : > https://urldefense.com/v3/__http://www.sodiaal.fr__;!!Ck4v2Rc!n_gF_nd1oRm56wTVe1WU0jr10jW9sRJpFLviyPpDqaWI7-FQh5g335eYMKaMhcPR387Coingz2mU6D9y5kUFMw$ > > Avant d'imprimer, merci de penser à l'environnement. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org > For additional commands, e-mail: users-h...@activemq.apache.org > For further information, visit: > https://urldefense.com/v3/__https://activemq.apache.org/contact__;!!Ck4v2Rc!n_gF_nd1oRm56wTVe1WU0jr10jW9sRJpFLviyPpDqaWI7-FQh5g335eYMKaMhcPR387Coingz2mU6D8Yqy2hEg$ > <https://urldefense.com/v3/__https:/activemq.apache.org/contact__;!!CpwJqyuz!H3gWvgSYGwxLO6tnW6SJXexhEj-WPm3gUGTLyNJG7qUmV6VvJZinxfXIsn9q6vBYmKHexwGDRLpcUL1A_Wue4y0$> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org > For additional commands, e-mail: users-h...@activemq.apache.org > For further information, visit: > https://urldefense.com/v3/__https://activemq.apache.org/contact__;!!Ck4v2Rc!n_gF_nd1oRm56wTVe1WU0jr10jW9sRJpFLviyPpDqaWI7-FQh5g335eYMKaMhcPR387Coingz2mU6D8Yqy2hEg$ > <https://urldefense.com/v3/__https:/activemq.apache.org/contact__;!!CpwJqyuz!HH-qvx_syuWjxlz8AUcN73_Gep9bHNPwH8zumxDTmAeJMVf3nWa47-AD3UjtyfLkywlH0ujW7VIjj8tmPChDdWA$> > >