Unable to initialize fs cache #9502
Closed
sebastianvoss
started this conversation in
Bugs
Replies: 3 comments 1 reply
-
|
@sebastianvoss thanks for the report! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
track #9503 there is a workaround for a while: $ trivy k8s --report=summary --scanners=vuln --cache-backend memory |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Not sure if this is the correct place to drop this but we are running into this same error message with the latest version of the operator (0.30.0) and trivy version 0.69.1. {
"level": "error",
"ts": "2026-02-17T12:27:02Z",
"logger": "reconciler.scan job",
"msg": "Scan job container",
"job": "trivy-operator-tst/scan-vulnerabilityreport-65d48894d7",
"container": "dbup-struct",
"status.reason": "Error",
"status.message": "2026-02-17T12:26:49Z\tINFO\tLoaded\tfile_path=\"/etc/trivy/trivy-config.yaml\"\n2026-02-17T12:26:49Z\tINFO\tAdding schema version to the DB repository for backward compatibility\trepository=\"registry.user-np01.k8s.cbsp.nl/docker.io/aquasec/trivy-java-db:1\"\n2026-02-17T12:26:49Z\tWARN\t\"--slow\" is deprecated. Use \"--parallel 1\" instead.\n2026-02-17T12:26:49Z\tINFO\t[image] Container image config scanners\tscanners=[secret]\n2026-02-17T12:26:49Z\tINFO\t[vuln] Vulnerability scanning is enabled\n2026-02-17T12:26:49Z\tINFO\t[secret] Secret scanning is enabled\n2026-02-17T12:26:49Z\tINFO\t[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning\n2026-02-17T12:26:49Z\tINFO\t[secret] Please see https://trivy.dev/docs/v0.69/guide/scanner/secret#recommendation for faster secret detection\n2026-02-17T12:26:54Z\tERROR\tFailed to acquire cache or database lock, see https://trivy.dev/docs/v0.69/guide/references/troubleshooting#database-and-cache-lock-errors for troubleshooting\n2026-02-17T12:26:54Z\tFATAL\tFatal error\trun error: image scan error: scan error: unable to initialize a scan service: unable to initialize cache: unable to initialize fs cache: cache may be in use by another process: timeout\n",
"stacktrace": "github.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).completedContainers\n\t/home/runner/work/trivy-operator/trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:454\ngithub.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).SetupWithManager.(*ScanJobController).reconcileJobs.func1\n\t/home/runner/work/trivy-operator/trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:103\nsigs.k8s.io/controller-runtime/pkg/reconcile.TypedFunc[...].Reconcile\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.22.1/pkg/reconcile/reconcile.go:134\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.22.1/pkg/internal/controller/controller.go:216\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.22.1/pkg/internal/controller/controller.go:461\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.22.1/pkg/internal/controller/controller.go:421\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func1.1\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.22.1/pkg/internal/controller/controller.go:296"
}Filtering out status.message: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When running
trivy k8s --report=summary --include-namespaces some-ns --scanners=vuln --timeout=15m --cache-dir=~/tmp/trivy-cacheresults in error.I already checked the docs and there is no other
trivyprocess running. The cache directory is writable and has enough space.Desired Behavior
Scan should work without errors
Actual Behavior
Reproduction Steps
Run `trivy k8s --report=summary`Target
Kubernetes
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
Operating System
macOS 15.7
Version
Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions