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

Cannot generate SBOM when using external_url and reverse proxy #20864

Closed
hydezhao opened this issue Aug 21, 2024 · 2 comments
Closed

Cannot generate SBOM when using external_url and reverse proxy #20864

hydezhao opened this issue Aug 21, 2024 · 2 comments

Comments

@hydezhao
Copy link

hydezhao commented Aug 21, 2024

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior:
Actual:
I've installed Harbor and configured with external_url and a reverse proxy, and i've installed Harbor Trivy adapter on another machine. The vulnerability scan is working while the SBOM generation is failing with following errors:

2024-08-21T06:59:38Z [ERROR] [/pkg/scan/sbom/sbom.go:106]: error when create accessory from image Get "https://harbor.mycompany.com/v2/": dial tcp x.x.x.x:443: i/o timeout
2024-08-21T06:59:38Z [ERROR] [/pkg/scan/job.go:307]: handler failed at PostScan, report 72ed0d4f-e6e1-4e3e-8630-bb6f600ddba3, error Get "https://harbor.mycompany.com/v2/": dial tcp x.x.x.x:443: i/o timeout
What did you expect to happen:

Expected:
SBOM can be generated without error.

Steps to reproduce the problem:
Please provide the steps to reproduce this problem.

Versions:
Harbor version: 2.11.1
Harbor Scanner Adapter for Trivy version: 2.11.1
Harbor installation process (Installer script, Helm chart, etc.): installer

  • harbor version: 2.11.1
  • docker engine version: 27.1.1

Additional context:

  • Harbor config files: You can get them by packaging harbor.yml and files in the same directory, including subdirectory.
  • Log files: You can get them by package the /var/log/harbor/ .
@hydezhao
Copy link
Author

I found out that my iptables was blocking harbor-jobservice from calling harbor via its external_url https://harbor.mycompany.com, when i change the iptables config to authorize this flux, SBOM well generated.

While I think it should always be fixed, jobservice should use the internal url to call core service.

@Solfood
Copy link

Solfood commented Aug 22, 2024

Ran into this as well. Looks like it was fixed in #20565.

Updating to 2.11.1 fixed for me.

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

3 participants