txthinking/brook · error
--blockCIDR6List must be with absolute path
Error message
--blockCIDR6List must be with absolute path
What it means
This is a CLI startup validation guard in the brook command: when --blockCIDR6List is given as a relative filesystem path the command refuses to start, because the block list file must be addressable unambiguously regardless of the working directory (the same pattern also allows http:// or https:// URLs). The input at fault is a relative --blockCIDR6List value; pass an absolute path (or an http(s) URL).
Source
Thrown at cli/brook/main.go:273
p := prometheus.NewPrometheus(c.String("prometheus"), c.String("prometheusPath"), m)
p.TouchBrook()
g.Add(&runnergroup.Runner{
Start: func() error {
return p.ListenAndServe()
},
Stop: func() error {
return p.Shutdown()
},
})
}
if c.String("blockDomainList") != "" && !strings.HasPrefix(c.String("blockDomainList"), "http://") && !strings.HasPrefix(c.String("blockDomainList"), "https://") && !filepath.IsAbs(c.String("blockDomainList")) {
return errors.New("--blockDomainList must be with absolute path")
}
if c.String("blockCIDR4List") != "" && !strings.HasPrefix(c.String("blockCIDR4List"), "http://") && !strings.HasPrefix(c.String("blockCIDR4List"), "https://") && !filepath.IsAbs(c.String("blockCIDR4List")) {
return errors.New("--blockCIDR4List must be with absolute path")
}
if c.String("blockCIDR6List") != "" && !strings.HasPrefix(c.String("blockCIDR6List"), "http://") && !strings.HasPrefix(c.String("blockCIDR6List"), "https://") && !filepath.IsAbs(c.String("blockCIDR6List")) {
return errors.New("--blockCIDR6List must be with absolute path")
}
if c.String("blockDomainList") != "" || c.String("blockCIDR4List") != "" || c.String("blockCIDR6List") != "" || len(c.StringSlice("blockGeoIP")) != 0 {
p, err := block.NewBlock(c.String("blockDomainList"), c.String("blockCIDR4List"), c.String("blockCIDR6List"), c.StringSlice("blockGeoIP"), c.Int("blockListUpdateInterval"))
if err != nil {
return err
}
p.TouchBrook()
if c.Int("blockListUpdateInterval") != 0 {
g.Add(&runnergroup.Runner{
Start: func() error {
p.Update()
return nil
},
Stop: func() error {
p.Stop()
return nil
},
})View on GitHub (pinned to 5cd13ef3b1)
Solutions
- Use an absolute path: --blockCIDR6List /etc/brook/cidr6.txt
- Use an http(s) URL for the list
- Make the launch script emit absolute paths
Example fix
// before brook server -l :9999 --blockCIDR6List cidr6.txt // after brook server -l :9999 --blockCIDR6List /etc/brook/cidr6.txt
Defensive patterns
Strategy: validation
Validate before calling
if v := blockCIDR6List; v != "" && !strings.HasPrefix(v, "http://") && !strings.HasPrefix(v, "https://") && !filepath.IsAbs(v) {
return fmt.Errorf("--blockCIDR6List must be URL or absolute path, got %q", v)
} Prevention
- Apply the URL-or-absolute-path rule to all three block list flags
- Standardize list storage location across environments
- Add flag validation to deployment scripts before rollout
When it happens
Trigger: --blockCIDR6List cidr6.txt or another relative path lacking an http(s):// prefix while non-empty.
Common situations: Relative paths in compose/unit files; forgetting the scheme for hosted lists; mismatch between dev and production working directories.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- --blockDomainList must be with absolute path
- --blockCIDR4List must be with absolute path
- --pid must be with absolute path
- --log must be with absolute path
- --cert must be with absolute path
AI-assisted analysis of txthinking/brook@5cd13ef3b1 (2026-09-06).
Data as JSON: /api/errors/b8d1f1fb35a64897.
Report an issue: GitHub.