StartCommand exits with no logged error after 10-minute default timeout when a slave broker legitimately waits for the lock under startAsync=true
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Problem
A broker started via ./activemq start, configured with startAsync=true and running as a slave, disappears after roughly 10 minutes with nothing logged.
Root cause
BrokerService.DEFAULT_START_TIMEOUT is 10 minutes. StartCommand calls broker.waitUntilStarted() with that timeout, then throws if it returns false:
if (!broker.waitUntilStarted()) {
throw new Exception(broker.getStartException());
}
Before startAsync existed, this was never an issue, because start() itself blocked until the broker became master, so waitUntilStarted() returned almost immediately either way.
With startAsync=true, start() returns right away, and a slave broker can legitimately wait on the lock far longer than 10 minutes — that is expected behavior, not a failure. When the timeout is hit, waitUntilStarted() returns false with no start exception set, and StartCommand treats that as a startup failure and exits the process. Because there's no recorded exception, nothing is logged, which makes the process exit look silent and unexplained.
Environment
startAsync=true- Broker running as slave, waiting on the lock beyond the default 10-minute start timeout
Suggested fix
StartCommand should keep waiting as long as broker.getStartException() is null, and only throw/exit when there is an actual recorded start exception.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1.5k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 85
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/activemq
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/activemq#2558 · 2 comments ·
Maintainers usually reply within 1 day
-
Stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/activemq#1999 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 74/100
apache/activemq#1871 · 2 comments ·
Maintainers usually reply within 1 day
-
Topic expiry task loads the whole JDBC topic store into the heap on PostgreSQL (AMQ-6067 fix is ineffective with pgjdbc)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
apache/activemq#2630 · 3 comments ·
Maintainers usually reply within 1 day
Similar issues
-
[Bug] Logo style setting missing and `classic` style not applied across multiple platforms (v3.1.0)Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Stirling-Tools/Stirling-PDF#8382 · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 4 days
-
enhancement untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opensearch-project/sql#5842 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
openhab/openhab-addons#21882 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
YunaiV/ruoyi-vue-pro#1273 ·
Maintainers usually reply within 3 days