owasp-amass/amass · error
failed to create the RDAP disk cache
Error message
failed to create the RDAP disk cache
What it means
Returned by rdapPlugin.Start when cache.NewDiskCache() returns nil, i.e. the RDAP bootstrap disk cache could not be constructed. It is a generic nil-guard on the cache constructor, so the underlying cause (filesystem or environment problem) is not captured in the error itself.
Source
Thrown at engine/plugins/api/rdap/plugin.go:75
},
}
}
func (rd *rdapPlugin) Name() string {
return rd.name
}
func (rd *rdapPlugin) Start(r et.Registry) error {
rd.log = r.Log().WithGroup("plugin").With("name", rd.name)
outdir := config.OutputDirectory()
if outdir == "" {
return errors.New("failed to obtain the Amass output directory")
}
c := cache.NewDiskCache()
if c == nil {
return errors.New("failed to create the RDAP disk cache")
}
c.Dir = filepath.Join(outdir, ".openrdap")
bs := &bootstrap.Client{Cache: c}
tlsConfig := &tls.Config{InsecureSkipVerify: true}
transport := &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: tlsConfig,
}
bs.HTTP = &http.Client{
Transport: transport,
}
httpClient := &http.Client{
Transport: transport,
}
rd.client = &rdap.Client{
HTTP: httpClient,
Bootstrap: bs,View on GitHub (pinned to 79299dce87)
Solutions
- Check the openrdap cache dependency version and update/rebuild
- Verify the process can write to the default cache directory before plugin start
- Fall back to an in-memory cache if disk cache construction fails
- Report upstream if NewDiskCache nil-returns with valid inputs
Example fix
// before
c := cache.NewDiskCache()
// after
c := cache.NewDiskCache()
if c == nil {
c = cache.NewMemoryCache()
} Defensive patterns
Strategy: fallback
Type guard
func cacheReady(c *cache.DiskCache) bool { return c != nil } Try / catch
if err := plugin.Start(registry); err != nil {
if strings.Contains(err.Error(), "disk cache") {
log.Warn("rdap plugin disabled: cache init failed")
return
}
return err
} Prevention
- Pin and test the openrdap cache dependency version
- Ensure the process has write access to the intended cache directory
- Fall back to a memory cache when disk cache creation fails
When it happens
Trigger: rdapPlugin.Start calls cache.NewDiskCache() and it returns nil — e.g. the cache library fails to allocate/initialize its default configuration.
Common situations: Incompatible or broken openrdap/cache dependency version where NewDiskCache can return nil; resource/permission problems at default cache location; defective build.
Related errors
- failed to obtain the Amass output directory
- failed to create the session manager
- failed to create the API server
- zero locations found
- failed to extract the locations
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/cc0797452fddbd01.
Report an issue: GitHub.