louislam/uptime-kuma · error · Error
No RabbitMQ nodes configured
Error message
No RabbitMQ nodes configured
What it means
JSON.parse(monitor.rabbitmqNodes) succeeded but produced an empty array (e.g. the literal string '[]'). With no nodes there is nothing to iterate, so the guard at rabbitmq.js:21 throws before the loop. This is distinct from error 103: the value was valid JSON, just semantically empty.
Source
Thrown at server/monitor-types/rabbitmq.js:21
const { axiosAbortSignal } = require("../util-server");
const axios = require("axios");
class RabbitMqMonitorType extends MonitorType {
name = "rabbitmq";
/**
* @inheritdoc
*/
async check(monitor, heartbeat, server) {
let baseUrls = [];
try {
baseUrls = JSON.parse(monitor.rabbitmqNodes);
} catch (error) {
throw new Error("Invalid RabbitMQ Nodes");
}
if (baseUrls.length === 0) {
throw new Error("No RabbitMQ nodes configured");
}
const errors = [];
for (let i = 0; i < baseUrls.length; i++) {
const baseUrl = baseUrls[i];
const nodeIndex = i + 1;
try {
await this.checkSingleNode(monitor, baseUrl, `${nodeIndex}/${baseUrls.length}`);
// If checkSingleNode succeeds (doesn't throw), set heartbeat to UP
heartbeat.status = UP;
heartbeat.msg =
baseUrls.length === 1
? "Node is reachable and there are no alerts in the cluster"
: `One of the ${baseUrls.length} nodes is reachable and there are no alerts in the cluster`;
return;
} catch (error) {View on GitHub (pinned to 6b5ea01557)
Solutions
- Add at least one RabbitMQ management URL to the monitor's node list.
- Confirm the value is a non-empty JSON array, e.g. ["http://rabbit-1:15672"].
- Re-open the monitor editor and ensure a node is present before saving.
Example fix
// before monitor.rabbitmqNodes = "[]"; // after monitor.rabbitmqNodes = "[\"http://rabbit-1:15672\"]";
Defensive patterns
Strategy: validation
Validate before calling
function requireRabbitNodes(raw) {
const arr = parseRabbitNodes(raw); // reuse error 103 helper
if (arr.length === 0) throw new Error('At least one RabbitMQ node URL is required');
return arr;
} Type guard
function hasAtLeastOneNode(arr) { return Array.isArray(arr) && arr.length > 0; } Try / catch
try {
await rabbitmqMonitor.check(monitor, heartbeat, server);
} catch (e) {
if (/No RabbitMQ nodes configured/.test(e.message)) {
// prompt the user; nothing to retry
}
throw e;
} Prevention
- Disable the Save button when the node list is empty.
- Default to a single node placeholder the user edits.
- Run the empty-list validation in a pre-save hook on the model.
When it happens
Trigger: monitor.rabbitmqNodes equals '[]' or a JSON array that evaluates to length 0 after parsing.
Common situations: User added the RabbitMQ monitor but never added a node, or removed all nodes and saved. A UI bug that serializes an empty list could also produce it.
Related errors
- RabbitMQ Nodes must be valid JSON: ${e.message}
- Invalid RabbitMQ Nodes
- Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds
- Retry interval cannot be less than ${MIN_INTERVAL_SECOND} se
- Response max length cannot be less than 0
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/273aab928b9d967d.
Report an issue: GitHub.