Closed jamatute closed 6 years ago
This actually seems like your clair server returns a HTML document (invalid character '<' looking for beginning of value
) instead of a valid JSON response. Make sure you have setup the server correctly.
The second error message (transport is closing
) is just the result of klar trying V1 first and falling back to V3 on any error. Since clair has not been released with APIv3 yet the server is closing the connection.
Closing because of inactivity, I hope the latest release fixed it. Let me know if the issue needs to be reopened.
I ran on the same issue while trying klar today.
The issue is more clear with traces:
<---- HTTP RESPONSE:
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 279
Content-Type: text/html
Date: Tue, 10 Jul 2018 08:19:13 GMT
Server: nginx/1.4.6 (Ubuntu)
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
ImageV1 decode error
Can't pull image: invalid character '<' looking for beginning of value
But while the issue seems clear, I was not able to find how to setup Clair on http, or klar to send https requests. I'll dig through the documentations of both tools, but any hint, if you have one, would help. Thanks!
OK, found it. I mixed the two klar options DOCKER_INSECURE and REGISTRY_INSECURE. The second one seemed to be the one I needed because the registry is on https with self signed certificate. I will update the issue with further findings...
Hi,
I'm exposing Clair behind port 80 instead of 6060, If I specify the port the APIv1 fails with a parsing error and the APIv3 gives an
transport is closing
errorThe port is open but Clair logs doesn't show any activity
Klar version: 2.0 Clair version/image: quay.io/coreos/clair-git:latest Kubernetes version: v1.7.8-gke.0
Thanks