unbridled-41 opened a new issue, #4006:
URL: https://github.com/apache/rocketmq-dashboard/issues/4006
## Problem
The Clients page (`GET /api/clients`) fails with HTTP 502 "Failed to query
consumer connections from all groups" whenever every non-system consumer group
of the instance is offline — a normal state (consumer applications stopped,
dev/test cluster, nightly windows) — instead of returning an empty connection
list. The producer connections already collected in the same request are
discarded too. The explicit producer-group lookup (`GET
/api/producer/connection?...&producerGroup=G`) fails the same way for an
offline group.
## Evidence
`rocketmq-tools` 5.5.0 (pinned by `server/pom.xml`), verified via `javap -c`
on `DefaultMQAdminExtImpl`:
- `examineConsumerConnectionInfo(String)` throws `new MQClientException(206,
"Not found the consumer group connection")` when
`ConsumerConnection.getConnectionSet().isEmpty()`.
- `examineProducerConnectionInfo(String, String)` throws `new
MQClientException("Not found the producer group connection", null)` for an
empty connection set.
`RocketMQClientProvider.findConsumerConnections`
(`server/src/main/java/org/apache/rocketmq/studio/provider/apache/RocketMQClientProvider.java:313-334`)
counts those per-group answers as scan failures, so an all-offline cluster is
indistinguishable from all brokers being unreachable and trips the all-failed
guard at line 332. The provider's own convention is that normal "nothing here"
states return empty, not 502 (comment at `:175-177`, `isTopicNotExist`
handling).
## Impact
Any cluster whose consumers are simply not running shows a hard failure on
the Clients page and loses the producer connections fetched in the same
request, instead of an empty/partial list.
## Expected behavior
An offline group is a normal "no connections right now" answer: the consumer
scan should treat it as a successful empty result (all-offline ⇒ empty list),
and the explicit producer-group query should return an empty list. Genuine
broker failures keep returning 502, and partial scans keep returning partial
results.
## Related work
This refines the all-failed heuristic introduced for #1142/#1143
(distinguish failed scans from empty results); it does not change it for real
failures. The same "normal absence → empty" convention was already applied to
NO_MESSAGE key queries (#3305) and topic-route absence (#3359).
## PR
#4002
--
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]