Closed garethahealy closed 1 month ago
Can you show activemq_systemd_wait_for_port and activemq_systemd_wait_for_log? The master systemd unit at point should indeed wait for "AMQ221031: backup announced" (which is in the logs)
Also, can you try with:
activemq_systemd_wait_for_log_ha_string: 'AMQ221109\\\\|AMQ221001\\\\|AMQ221034'
amq_broker_systemd_wait_for_port == False | amq_broker_systemd_wait_for_log == True
/etc/systemd/system/amq1.service
ExecStartPost=/usr/bin/timeout 60 sh -c 'tail -n 15 -f /opt/amq/amq1/log/artemis.log | sed "/AMQ221109\\\\|AMQ221001/ q" && /bin/sleep 10'
/etc/systemd/system/amq2.service
ExecStartPost=/usr/bin/timeout 60 sh -c 'tail -n 15 -f /opt/amq/amq2/log/artemis.log | sed "/AMQ221109\\\\|AMQ221001/ q" && /bin/sleep 10'
fixes the issue:
amq_broker_systemd_wait_for_log_ha_string: 'AMQ221109\\\\|AMQ221001\\\\|AMQ221034'
Thanks, I'll update the default!
SUMMARY
So I think I've hit a bug with how the system service is configured.
Looking in the logs for master, I can see it stopping and then trying to start:
I believe it because of the
ExecStartPost
Running those tail commands returns nothing, so systemctl fails.
I think this scenario is valid, being able to restart the master via systemctl so it becomes the slave.