Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed with code 1 #1

Closed
DBV89 opened this issue Feb 28, 2025 · 4 comments
Closed

Command failed with code 1 #1

DBV89 opened this issue Feb 28, 2025 · 4 comments
Assignees

Comments

@DBV89
Copy link

DBV89 commented Feb 28, 2025

At the stage of connection to Linux VM - Ubuntu 22.04, the system checks for the presence of scanners, but as a result of the error -Command failed with code 1
main.log

@mescobarcl mescobarcl self-assigned this Feb 28, 2025
@mescobarcl
Copy link
Collaborator

Hi, Can you connect via SSH to the Ubuntu server and execute:

trivy --version
grype --version
trivy image --download-db-only
grype db update

Could you then test the connection again?

In the logs, I see SSH timeouts, from network 192.168.x.x to 172.20.x.x

I'm installing Ubuntu 22.04.1 to simulate the error and see what is happening.

@DBV89
Copy link
Author

DBV89 commented Feb 28, 2025

root@ubn:/home/cloudadmin# trivy --version
Version: 0.59.1
root@ubn:/home/cloudadmin# grype --version
grype 0.87.0
root@ubn:/home/cloudadmin# trivy image --download-db-only
2025-02-28T13:20:52Z INFO [vulndb] Need to update DB
2025-02-28T13:20:52Z INFO [vulndb] Downloading vulnerability DB...
2025-02-28T13:20:52Z INFO [vulndb] Downloading artifact... repo="mirror.gcr.io/aquasec/trivy-db:2"
60.12 MiB / 60.12 MiB [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 21.28 MiB p/s 3.0s
2025-02-28T13:20:57Z INFO [vulndb] Artifact successfully downloaded repo="mirror.gcr.io/aquasec/trivy-db:2"
root@ubn:/home/cloudadmin# grype db update
✔ Vulnerability DB [no update available]
No vulnerability database update available
root@ubn:/home/cloudadmin#

I will reconfigure the system so that all components are on the same network, but I am not recording any network problems now. I will double-check the network.

@DBV89
Copy link
Author

DBV89 commented Feb 28, 2025

Changes in the network were made, now all components are located in one broadcast domain, but it did not help.
Rocky Linux did not help initially, either. After several attempts and checks, the procedure for updating the scanner databases helped me; only then was the check performed correctly.

trivy image --download-db-only
grype db update

Image

I will continue to perform the test.

@DBV89
Copy link
Author

DBV89 commented Mar 3, 2025

The test was completed successfully, thanks for your help.

@DBV89 DBV89 closed this as completed Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants