{"record":{"id":"ac4ca1580f221c96","repo":"fish2018/pansou","slug":"s-ac4ca1","errorCode":null,"errorMessage":"[%s] 所有域名均不可用","messagePattern":"\\[(.+?)\\] 所有域名均不可用","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/qiwei/qiwei.go","lineNumber":184,"sourceCode":"\t\treturn []model.SearchResult{}, nil\n\t}\n\n\treturn plugin.FilterResultsByKeyword(results, keyword), nil\n}\n\nfunc (p *QiweiPlugin) searchSuggestWithFallback(client *http.Client, keyword string) ([]suggestItem, string, error) {\n\tvar lastErr error\n\tfor _, host := range p.hostCandidates() {\n\t\titems, err := p.searchSuggest(client, host, keyword)\n\t\tif err == nil {\n\t\t\tp.setActiveHost(host)\n\t\t\treturn items, host, nil\n\t\t}\n\t\tlastErr = err\n\t}\n\n\tif lastErr == nil {\n\t\tlastErr = fmt.Errorf(\"[%s] 所有域名均不可用\", p.Name())\n\t}\n\treturn nil, \"\", lastErr\n}\n\nfunc (p *QiweiPlugin) searchSuggest(client *http.Client, host, keyword string) ([]suggestItem, error) {\n\tsearchURL := fmt.Sprintf(\"%s/index.php/ajax/suggest?mid=1&limit=%d&wd=%s\", host, searchSuggestLimit, url.QueryEscape(keyword))\n\tbody, err := p.fetchBody(client, searchURL, host+\"/\", searchTimeout)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif isVerifyPage(body) {\n\t\tif err := p.solveVerification(client, searchURL, body); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"[%s] 搜索验证失败: %w\", p.Name(), err)\n\t\t}\n\t\tbody, err = p.fetchBody(client, searchURL, host+\"/\", searchTimeout)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/qiwei/qiwei.go#L166-L202","documentation":"This error is returned by searchSuggestWithFallback in plugin/qiwei/qiwei.go:184 when the qiwei plugin fails to get suggestion results from every configured qiweiHosts domain. The loop iterates all host candidates, calling searchSuggest on each; when every attempt returns an error, the loop ends and the last error is propagated (or, only if there were no hosts and thus no attempt was made, this generic 'all domains unavailable' error is constructed). It is the plugin's aggregate 'nothing worked' signal to the caller searchImpl.","triggerScenarios":"All configured hosts (www.qmp4.com and mirrors) fail searchSuggest — each returns a network error, timeout, verification page, or non-JSON/abnormal suggest response. Practically this fires after the loop over hostCandidates() exhausts every host with err != nil.","commonSituations":"The upstream qiwei sites are down, blocked, or rate-limiting the server's IP; all mirrors simultaneously serve anti-bot verification pages; the server has no outbound internet/DNS; the hardcoded host list is stale after the sites change domains (the most common long-term cause, since hosts are hardcoded in qiweiHosts).","solutions":["Check basic outbound connectivity from the deployment (curl https://www.qmp4.com/index.php/ajax/suggest?mid=1&limit=10&wd=test) to rule out network/DNS/firewall issues.","If the response is a verification/anti-bot page on every host, reduce request rate or route through a proxy with clean cookies; the plugin's cookie jar may be flagged.","Update the qiweiHosts list in plugin/qiwei/qiwei.go if the sites have rotated domains.","Retry later — transient upstream outages produce this across all mirrors at once; pansou aggregates other plugins so one failing plugin is tolerable."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Go: probe connectivity to the primary host before invoking the plugin search\nfunc reachable(u string) bool {\n    c := &http.Client{Timeout: 5 * time.Second}\n    resp, err := c.Get(u)\n    if err != nil { return false }\n    resp.Body.Close()\n    return resp.StatusCode < 500\n}\n// if !reachable(\"https://www.qmp4.com\") { skip qiwei plugin / use other sources }","typeGuard":null,"tryCatchPattern":"results, err := plugin.Search(keyword, ext)\nif err != nil {\n    log.Printf(\"qiwei unavailable: %v; falling back to other plugins\", err)\n    return fallbackSearch(keyword) // continue with remaining sources\n}","preventionTips":["Monitor qiwei host reachability and keep the qiweiHosts list current when domains rotate","Don't run qiwei as the only source; pansou aggregates plugins so a total qiwei outage degrades gracefully","Check egress network/DNS from the deployment environment, not just from a dev machine"],"tags":["network","upstream","all-hosts-failed","scraping"],"backgroundTag":"upstream-api-error","analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}