MyCATApache/Mycat-Server · critical · ConfigException
[ node : ] in [ group: ] doesn't exist!
Error message
[ node :${s}] in [ group:${groupName}] doesn't exist! What it means
ClusterConfig.loadGroup validates that every node listed in a group's nodeList exists in the parsed `nodes` map. If any referenced dataHost/node name is not defined earlier in the schema.xml configuration, ConfigException is thrown. Mycat refuses to start with an inconsistent cluster definition.
Solutions
- Fix the nodeList entry in schema.xml so every name exactly matches an existing <dataNode name=...> definition.
- Add the missing <dataNode> definition for the referenced node before the group is loaded.
- Remove stale node names from the group's nodeList if that node is no longer used.
Example fix
// before (schema.xml) <group name="group1"><nodeList>dn1,dn9</nodeList></group> // after <group name="group1"><nodeList>dn1,dn2</nodeList></group>
Defensive patterns
Strategy: validation
Validate before calling
// Java: validate group nodeList before startup
for (String nodeName : groupNodeList.split(",")) {
if (!nodes.containsKey(nodeName.trim())) {
throw new IllegalArgumentException("nodeList references undefined node: " + nodeName);
}
} Try / catch
try { ClusterConfig.load(); } catch (ConfigException e) { LOG.error("Bad group/nodeList config: {}", e.getMessage()); throw new IllegalStateException("Fix schema.xml nodeList entries", e); } Prevention
- Keep a single source of truth for dataNode names and generate nodeList entries from it.
- Add a config lint step that cross-checks nodeList references against dataNode definitions before deployment.
- Copy node names verbatim; avoid hand-typing them into group blocks.
When it happens
Trigger: Loading schema.xml: a <group> element's nodeList attribute (comma-separated) references a node name that has no corresponding <dataNode> definition in the same file, so nodes.containsKey(s) is false.
Common situations: Typo in a node name inside nodeList; renaming or deleting a dataNode while the group still references the old name; splitting config across files and forgetting the node entry; copy-pasting group blocks from another deployment.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- SelfCheck### schema all node is empty!
- SelfCheck### schema dbnode is empty!
- SelfCheck### schema
- SelfCheck### user all node is empty!
- SelfCheck### user refered schemas is empty!
AI-assisted analysis of MyCATApache/Mycat-Server@65f8d8beb7 (2026-09-11).
Data as JSON: /api/errors/ca0e810579e448d1.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/io/mycat/config/model/ClusterConfig.java:128
if (groups.containsKey(groupName)) {
throw new ConfigException("group duplicated : " + groupName);
}
Map<String, Object> props = ConfigUtil.loadElements(e);
String value = (String) props.get("nodeList");
if (null == value || "".equals(value)) {
throw new ConfigException("group should contain 'nodeList'");
}
String[] sList = SplitUtil.split(value, ',', true);
if (null == sList || sList.length == 0) {
throw new ConfigException("group should contain 'nodeList'");
}
for (String s : sList) {
if (!nodes.containsKey(s)) {
throw new ConfigException("[ node :" + s + "] in [ group:" + groupName + "] doesn't exist!");
}
}
List<String> nodeList = Arrays.asList(sList);
groups.put(groupName, nodeList);
}
}
if (!groups.containsKey("default")) {
List<String> nodeList = new ArrayList<String>(nodes.keySet());
groups.put("default", nodeList);
}
return groups;
}
}View on GitHub (pinned to 65f8d8beb7)