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

Klar not able to connect to clair server #182

Open
jeannotjunior opened this issue May 10, 2021 · 0 comments
Open

Klar not able to connect to clair server #182

jeannotjunior opened this issue May 10, 2021 · 0 comments

Comments

@jeannotjunior
Copy link

jeannotjunior commented May 10, 2021

Hello all,

I have some issues using Klar to analyse some images with clair.

My setup :
I have deployed a clair and database instance on an Openshift cluster.
I use clair:v2.1.7
with 6060 and 6061 as target port
and Postgres:9.6 with port 5432

My config.yaml


clair:
--
  | database:
  | type: pgsql
  | options:
  | source: "host=clair-postgresql port=5432 user=clair password=clair dbname=clair sslmode=disable statement_timeout=60000"
  | cachesize: 16384
  | paginationkey: "XxoPtCUzrUv4JV5dS+yQ+MdW7yLEJnRMwigVY/bpgtQ="
  | api:
  | addr: 6060
  | healthaddr: 6061
  | timeout: 900s
  | servername:
  | cafile:
  | keyfile:
  | certfile:
  | worker:
  | namespace_detectors:
  | - os-release
  | - lsb-release
  | - apt-sources
  | - alpine-release
  | - redhat-release
  | feature_listers:
  | - apk
  | - dpkg
  | - rpm
  | updater:
  | interval: 2h
  | enabledupdaters:
  | - debian
  | - ubuntu
  | - rhel
  | - oracle
  | - alpine
  | notifier:
  | attempts: 3
  | renotifyinterval: 2h
  | http:
  | endpoint:
  | servername:
  | cafile:
  | keyfile:
  | certfile:
  | proxy:

I did configure a route to be able to communicate with the clair pod using Klar on my local machine.
here is the output of the corresponding curl

curl -X GET -I http://myclairroute/health
HTTP/1.1 200 OK
Server: clair
Date: Mon, 10 May 2021 12:02:13 GMT
Content-Length: 0
Set-Cookie: "some_set_of_letter_and_numbers"; path=/; HttpOnly
Cache-control: private

here the output of Klar

CLAIR_ADDR=http://myclairroute CLAIR_OUTPUT=Low CLAIR_THRESHOLD=10   klar alpine:latest
Analysing 1 layers
Failed to analyze using API v1: push image http://registry-1.docker.io/v2/library/alpine:latest to Clair failed: can't push layer to Clair: Post http://http://myclairroute:6060/v1/layers: dial tcp ip_of_the_route:6060:  getsockopt: no route to host 

Failed to analyze using API v3: push image http://registry-1.docker.io/v2/library/alpine:latest to Clair failed: roc error: code - unavailable desc = SubConns are in TransientFailure 

Failed to analyze, exiting 

I can ping http://myclairroute from my local machine without any problem , although it is worth mentioning that I need to be. connected to a vpn to do so.

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

1 participant