jbonofre opened a new issue, #2552:
URL: https://github.com/apache/activemq/issues/2552
## 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:
```java
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact