jeessy2/ddns-go · error
未能获取域名 %s 对应的 IPv4 地址
Error message
未能获取域名 %s 对应的 IPv4 地址
What it means
A validation guard inside getDesiredOriginRecords: the domain was matched against eo.Domains.Ipv4Domains, so an IPv4 origin record is expected, but eo.Domains.Ipv4Addr is empty — the resolver/config layer never populated the IPv4 address for this domain. The error fires before any EdgeOne API call, failing the origin-record build for addUpdateOriginGroups.
Source
Thrown at dns/edgeone_origin.go:160
return "", fmt.Errorf("在 EdgeOne 中未找到站点: %s", domain.DomainName)
}
for _, zone := range zoneResult.Response.Zones {
if zone.ZoneName == domain.DomainName {
return zone.ZoneId, nil
}
}
return "", fmt.Errorf("在 EdgeOne 中未找到站点: %s", domain.DomainName)
}
func (eo *EdgeOne) getDesiredOriginRecords(domainTuple *config.DomainTuple) ([]EdgeOneOriginRecord, error) {
domain := domainTuple.Primary
domainName := domain.String()
weight := eo.getOriginWeight(domain)
records := make([]EdgeOneOriginRecord, 0, 2)
if eo.hasDomain(eo.Domains.Ipv4Domains, domainName) {
if eo.Domains.Ipv4Addr == "" {
return nil, fmt.Errorf("未能获取域名 %s 对应的 IPv4 地址", domain)
}
records = append(records, EdgeOneOriginRecord{
Record: eo.Domains.Ipv4Addr,
Type: edgeoneOriginRecordType,
Weight: weight,
})
}
if eo.hasDomain(eo.Domains.Ipv6Domains, domainName) {
if eo.Domains.Ipv6Addr == "" {
return nil, fmt.Errorf("未能获取域名 %s 对应的 IPv6 地址", domain)
}
records = append(records, EdgeOneOriginRecord{
Record: eo.Domains.Ipv6Addr,
Type: edgeoneOriginRecordType,
Weight: weight,
})
}
if len(records) == 0 {View on GitHub (pinned to 5874c2e666)
Solutions
- Check why the IPv4 address resolution step left eo.Domains.Ipv4Addr empty for this domain (DNS A-record lookup failure or skipped resolution)
- Verify the domain actually has an A record / IPv4 origin configured upstream
- If the domain is IPv6-only, remove it from Ipv4Domains so the guard is not triggered
- Re-run after ensuring the address-population step executes before addUpdateOriginGroups
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at dns/edgeone_origin.go:160 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jeessy2/ddns-go@5874c2e666 (2026-09-03).
Data as JSON: /api/errors/3be8682d35183037.
Report an issue: GitHub.