Connection refused using clairctl to report on image

167 views
Skip to first unread message

Lars Asi

unread,
Aug 31, 2021, 7:37:02 AM8/31/21
to clair-dev
Hello

I played around a little with the official clair that can be found in the testing page on the clair site but that installment or package has too many things we do not need so I am trying to only run Clair v4.1.5 and a postgres database.
Clair and postgres are both running and I can get into the command line inside the clair pod on kubernetes but when issuing the command `clairctl report nginx` i get an error message of

ERR  error="Get \"http://localhost:6060/indexer/api/v1/index_report/sha256:5e95e5eb8be4322e3b3652d737371705e56809ed8b307ad68ec59ddebaaf60e4\": dial tcp 127.0.0.1:6060: connect: connection refused"

Am I missing a service or some permissions somewhere ? I added the deployments and services configurations in the attachments.

Best regards,
Lars
config.yaml
postgres.yaml
clair.yaml

Hank Donnay

unread,
Aug 31, 2021, 12:11:46 PM8/31/21
to clai...@googlegroups.com
It looks like your clair instance isn't listening on that port. There
are options to control where `clairctl` talks to, specifically the
"--host" flag or "CLAIR_API" environment variable. The help for the
`report` subcommand has them listed. Perhaps the main help text doesn't
make it clear that the subcommands have their own flags and help text.

--
hank

Lars Asi

unread,
Sep 1, 2021, 2:28:24 AM9/1/21
to clai...@googlegroups.com
Hello

Thank you for the quick response. I tried using the '--host' flag but got different error messages.
image.png
have I configured the DB correctly or is there some other reason why the report keeps failing ?

Best regards
Lars

--
You received this message because you are subscribed to the Google Groups "clair-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clair-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clair-dev/YS5UurPPE8FuM/7W%40redhat.com.

Hank Donnay

unread,
Sep 1, 2021, 1:49:02 PM9/1/21
to clai...@googlegroups.com
On Wed, Sep 01, 2021 at 09:28:10AM +0300, Lars Asi wrote:
>Thank you for the quick response. I tried using the '--host' flag but got
>different error messages.

You've put the flag after the first argument, so it's attempting to look
up 3 manifests:

* docker.io/library/ubuntu:latest
* docker.io/library/--host:latest
* docker.io/library/localhost:8080

--
hank

Reply all
Reply to author
Forward
0 new messages