Open chary1112004 opened 9 months ago
@chary1112004 is the pod still running can you get it output
kubectl logs <pod name> -n trivy-system
@chary1112004 is the pod still running can you get it output
kubectl logs <pod name> -n trivy-system
You mean about scan-job
pod or trivy-operator
pod?
If you mean about trivy-operator
pod then yes, it is still running
@chary1112004 is the pod still running can you get it output
kubectl logs <pod name> -n trivy-system
You mean about
scan-job
pod ortrivy-operator
pod? If you mean abouttrivy-operator
pod then yes, it is still running
I mean for the scan-job
@chary1112004 is the pod still running can you get it output
kubectl logs <pod name> -n trivy-system
You mean about
scan-job
pod ortrivy-operator
pod? If you mean abouttrivy-operator
pod then yes, it is still runningI mean for the scan-job
yes, scan-job is in status Completed 0/1. However I do not store log of this pod.
I'm facing the same issue, possibly related to https://github.com/aquasecurity/trivy-operator/issues/591. It seems the pod is terminated before the stdout buffer is flushed, resulting in the unexpected EOF. I tried both setting scanJobCompressLogs to false
and true
, doesn't seem to make a difference as the output still needs to be flushed before the container is stopped. Running the same command locally does output the full json.
kubectl logs -n trivy-system pod/scan-vulnerabilityreport-85fd8c6947-rfr66 -c <container>
... omitted
{
"VulnerabilityID": "DLA-3412-1",
"VendorIDs": [
"DLA-3412-1"
],
"PkgID": "tzdata@2021a-0+deb10u6",
"PkgName": "tzdata",
"PkgIdentifier": {
"PURL": "pkg:deb/debian/tzdata@2021a-0%2Bdeb10u6?arch=all\u0026distro=debian-%
The other issue suggests adding a sleep to allow the full report to be outputted, but it seems this cannot be configured. Probably a better solution would be to use sync
.
Having the same issue here although my error is a bit different
{"level":"error","ts":"2024-09-05T02:56:27Z","msg":"Reconciler error","controller":"job","controllerGroup":"batch","controllerKind":"Job","Job":{"name":"scan-vulnerabilityreport-7955c58bd","namespace":"security-tools"},"namespace":"security-tools","name":"scan-vulnerabilityreport-7955c58bd","reconcileID":"416f2e4e-a244-408c-a2e6-fbdc6fb644b4","error":"unexpected end of JSON input","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:222"}
What steps did you take and what happened:
Hi,
We are facing issue the vulnerability report no data and log file contains Unexpected EOF
value file:
Any suggestion to resolve this issue would be very much appreciated!
Thanks!
Environment:
trivy-operator version
): 0.20.1kubectl version
): 1.25