jeessy2/ddns-go · error
找到多个名称匹配的源站组,请改用 GroupId 指定唯一源站组
Error message
找到多个名称匹配的源站组,请改用 GroupId 指定唯一源站组
What it means
When identifying the origin group by OriginGroupName (no GroupId given), multiple groups in the zone can match the name filter. The library refuses to guess: if the name doesn't exactly match exactly one group and more than one group was returned, it errors asking the user to specify GroupId. Ambiguity here would cause ddns-go to update the wrong group's origin records.
Source
Thrown at dns/edgeone_origin.go:255
groupId := params.Get("GroupId")
for _, group := range result.Response.OriginGroups {
if group.GroupId == groupId {
return group, nil
}
}
return EdgeOneOriginGroup{}, fmt.Errorf("在 EdgeOne 中未找到源站组 GroupId=%s", groupId)
}
groupName := params.Get("OriginGroupName")
for _, group := range result.Response.OriginGroups {
if group.Name == groupName {
return group, nil
}
}
if len(result.Response.OriginGroups) == 1 {
return result.Response.OriginGroups[0], nil
}
return EdgeOneOriginGroup{}, fmt.Errorf("找到多个名称匹配的源站组,请改用 GroupId 指定唯一源站组")
}
func (eo *EdgeOne) modifyOriginGroup(originGroup EdgeOneOriginGroup, domainTuple *config.DomainTuple, zoneId string, records []EdgeOneOriginRecord) {
if sameEdgeOneOriginRecords(originGroup.Records, records) {
util.Log("你的IP %s 没有变化, EdgeOne 源站组 %s", strings.Join(edgeOneOriginRecordValues(records), ","), originGroup.Name)
return
}
var status EdgeOneStatus
err := eo.request(
"ModifyOriginGroup",
struct {
ZoneId string `json:"ZoneId"`
GroupId string `json:"GroupId"`
Records []EdgeOneOriginRecord `json:"Records"`
}{
ZoneId: zoneId,
GroupId: originGroup.GroupId,View on GitHub (pinned to 5874c2e666)
Solutions
- Use ?GroupId=<id> in the domain config to unambiguously select the origin group.
- Rename origin groups in the EdgeOne console so names are unique, then match the param exactly to one group's Name.
- Set OriginGroupName to the exact full Name as shown in EdgeOne, not a substring.
- Delete duplicate origin groups that are no longer used.
Example fix
// before (ambiguous name) domain.example.com?OriginGroupName=my-origin // after (unique id) domain.example.com?GroupId=og-1a2b3c4d
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the configured name uniquely matches exactly one group before syncing:
// DescribeOriginGroup with Filters=[{Name:"origin-group-name",Values:["<name>"]}] must return TotalCount == 1
// otherwise switch config to ?GroupId=<id> Prevention
- Keep origin group names unique within the EdgeOne site
- Always specify ?GroupId= when more than one group could match
- Avoid partial names; use the exact full group Name
- Periodically audit for leftover duplicate groups
When it happens
Trigger: addUpdateOriginGroups -> getOriginGroup with ?OriginGroupName=<name>; no returned group's Name exactly equals the param, OriginGroups has more than one entry (the len==1 fallback doesn't apply), so the ambiguous-name branch triggers.
Common situations: Two origin groups share similar names and the param is a partial/substring name; groups renamed over time leaving duplicates; user expected fuzzy matching but the code only accepts an exact Name match before falling back to the single-result case.
Related errors
AI-assisted analysis of jeessy2/ddns-go@5874c2e666 (2026-09-03).
Data as JSON: /api/errors/f5bd64ed70254ab6.
Report an issue: GitHub.