{"record":{"id":"cd99c6bd47302a14","repo":"Billionmail/BillionMail","slug":"failed-to-set-cloudxns-dns-verification","errorCode":null,"errorMessage":"Failed to set CloudXNS DNS verification: {}","messagePattern":"Failed to set CloudXNS DNS verification: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/service/acme/acme.go","lineNumber":419,"sourceCode":"\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set HTTP verification: {}\", err.Error()))\n\t\t}\n\t} else if vtype == \"dns\" && dnsProvider != \"\" {\n\t\t// Set DNS verification - same as in the standard ApplySSL function\n\t\tswitch dnsProvider {\n\t\tcase \"tencentcloud\":\n\t\t\terr = SetDnsTencentcloud(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set Tencent Cloud DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"alidns\":\n\t\t\terr = SetDnsAliyun(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set Alibaba Cloud DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"cloudxns\":\n\t\t\terr = SetDnsCloudxns(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set CloudXNS DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"azuredns\":\n\t\t\terr = SetDnsAzuredns(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set AzureDNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"cloudflare\":\n\t\t\terr = SetDnsCloudflare(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set Cloudflare DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"godaddy\":\n\t\t\terr = SetDnsGodaddy(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set Godaddy DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tdefault:\n\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Unsupported DNS provider: {}\", dnsProvider))","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/service/acme/acme.go#L401-L437","documentation":"For vtype == \"dns\" with dnsProvider == \"cloudxns\", SetDnsCloudxns builds a lego CloudXNS (now Baidu/other successor services) DNS provider using dnsProviderToken and registers it for the dns-01 challenge. The error means that provider setup failed. Note CloudXNS has been discontinued/merged — its lego provider may no longer authenticate against a live API, making this error common even with 'correct' tokens.","triggerScenarios":"ApplySSLWithExistingServer (via Apply, StartRenew, ApplyLetsEncryptCertWithHttp, ApplyConsoleCert) with vtype=\"dns\", dnsProvider=\"cloudxns\", and an invalid API key/secret pair, or with valid credentials against the defunct CloudXNS endpoint.","commonSituations":"Domains migrated off CloudXNS after the service wound down; legacy tokens stored from years ago; choosing cloudxns from a dropdown while the zone is actually hosted elsewhere.","solutions":["Migrate the DNS zone to a supported provider and pick a current dnsProvider (cloudflare, alidns, tencentcloud, etc.) instead of cloudxns","If CloudXNS credentials still apply to the successor service, update dnsProviderToken with the new API key/secret","Check the wrapped err text to distinguish malformed token format from endpoint/auth rejection"],"exampleFix":"// before\ndnsProvider = \"cloudxns\"\n// after\ndnsProvider = \"cloudflare\" // or another active provider the zone is hosted on","handlingStrategy":"fallback","validationCode":"if dnsProvider == \"cloudxns\" {\n    log.Warn(\"cloudxns is discontinued; prefer cloudflare/alidns/tencentcloud\")\n    if strings.TrimSpace(dnsProviderToken) == \"\" {\n        return errors.New(\"cloudxns token missing\")\n    }\n}","typeGuard":"func providerSupported(p string) bool {\n    switch p {\n    case \"tencentcloud\", \"alidns\", \"cloudxns\", \"azuredns\", \"cloudflare\", \"godaddy\":\n        return true\n    }\n    return false\n}","tryCatchPattern":"cert, _, err := ApplySSLWithExistingServer(ctx, ...)\nif err != nil && strings.Contains(err.Error(), \"CloudXNS\") {\n    // retry with an active provider hosting the zone\n    return ApplySSLWithExistingServer(ctx, domain, \"dns\", \"cloudflare\", cfToken, ...)\n}","preventionTips":["Treat cloudxns as legacy; migrate zones to a supported provider","Keep the provider list in the UI aligned with active services only","Check zone host before selecting the provider"],"tags":["acme","dns-01","cloudxns","deprecated-service"],"backgroundTag":"dns-provider-auth-failed","analyzedSha":"fc36c76c050c3775c5e899faf7403cf0262d2744","analyzedAt":"2026-09-05T21:28:54.019Z","contentChangedAt":"2026-09-05T21:28:54.019Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}