{"record":{"id":"28b03f47953ed06f","repo":"lionsoul2014/ip2region","slug":"no-ipv6-searcher-available-for-ipv6-address","errorCode":null,"errorMessage":"no IPv6 searcher available for IPv6 address","messagePattern":"no IPv6 searcher available for IPv6 address","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"binding/nginx/src/ngx_http_ip2region_module.c","lineNumber":461,"sourceCode":"                // 处理纯IPv6地址\n                if (ip2region_conf->v6_searcher != NULL) {\n                    searcher_ptr = &ip2region_conf->v6_searcher->searcher;\n                    bytes_ip_t ip6_bytes[16];\n                    if (p != NULL) {\n                        memcpy(ip6_bytes, p, 16);\n                        err = xdb_search(searcher_ptr, ip6_bytes, 16, &region);\n                        if (err == 0) {\n                            v->data = (unsigned char *)region.value;\n                            v->len = strlen(region.value);\n                            xdb_region_buffer_free(&region);\n                            return NGX_OK;\n                        } else {\n                            ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,\n                                          \"ip2region search failed for IPv6 address\");\n                        }\n                    }\n                } else {\n                    ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,\n                                  \"no IPv6 searcher available for IPv6 address\");\n                }\n            }\n            break;\n\n#endif\n\n    }\n    // 如果搜索失败，释放 region buffer\n    xdb_region_buffer_free(&region);\n\n    ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,\n                  \"ip2region: no region found for IP address\");\n    v->not_found = 1;\n    return NGX_OK;\n}\n\n","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/lionsoul2014/ip2region/blob/c1a1fc7d5941760db3f8431dc05c48cf7f0e30a1/binding/nginx/src/ngx_http_ip2region_module.c#L443-L479","documentation":"nginx runtime warning: the request carried a native IPv6 address but no v6_searcher was configured (the ip2region v6 directive/db is absent), so the lookup is skipped and the variable stays unset; configuration is the faulting input, not the address.","triggerScenarios":"Thrown at binding/nginx/src/ngx_http_ip2region_module.c:461 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the IPv6 searcher via the module's v6 directive and a v6 xdb","Accept unset variables for IPv6 clients if v6 lookup is not required","Guard templates against empty ip2region results"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c1a1fc7d5941760db3f8431dc05c48cf7f0e30a1","analyzedAt":"2026-09-02T16:58:39.988Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}