lionsoul2014/ip2region · error
failed to create v6 searcher pool: %w
Error message
failed to create v6 searcher pool: %w
What it means
Go service factory: NewSearcherPool failed while pre-creating the v6 searcher pool; the wrapped error identifies the first searcher that could not be created (bad path, permissions, or corrupt xdb).
Source
Thrown at binding/golang/service/ip2region.go:78
}
// check and init the v6 pool or in-memory searcher
var v6Pool *SearcherPool
var v6InMemSearcher *xdb.Searcher
if v6Config == nil {
v6Pool = nil
v6InMemSearcher = nil
} else if v6Config.cachePolicy == BufferCache {
v6Pool = nil
v6InMemSearcher, err = xdb.NewWithBuffer(v6Config.ipVersion, v6Config.cBuffer)
if err != nil {
return nil, fmt.Errorf("failed to create v6 in-memory searcher: %w", err)
}
} else {
v6InMemSearcher = nil
v6Pool, err = NewSearcherPool(v6Config)
if err != nil {
return nil, fmt.Errorf("failed to create v6 searcher pool: %w", err)
}
}
return &Ip2Region{
v4Pool: v4Pool,
v4InMemSearcher: v4InMemSearcher,
v6Pool: v6Pool,
v6InMemSearcher: v6InMemSearcher,
}, nil
}
// create the ip2region search service with the specified v4 & v6 xdb path.
// with default cache policy VIndexCache and default searchers = 20
func NewIp2RegionWithPath(v4XdbPath string, v6XdbPath string) (*Ip2Region, error) {
var err error
// create v4 config with default config itemsView on GitHub (pinned to c1a1fc7d59)
Solutions
- Fix the v6 xdb path/permissions reported by the wrapped error
- Regenerate a valid v6 database
- Retry service creation once the underlying cause is resolved
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at binding/golang/service/ip2region.go:78 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of lionsoul2014/ip2region@c1a1fc7d59 (2026-09-02).
Data as JSON: /api/errors/70df7bebfedf0f40.
Report an issue: GitHub.