clairctl icon indicating copy to clipboard operation
clairctl copied to clipboard

dockerdist: cannot instanciate new v2 repository on http://docker-distro:5000 client quit unexpectedly

Open shiva022 opened this issue 8 years ago • 3 comments

Hello team, I setup clair long ago with the help of https://github.com/coreos/clair with docker setup. Then to scan the Image I configure analyse-local-image. Everything was working fine. However, Now, I am trying to configure Clairctl. I downloaded the source code https://github.com/jgsqware/clairctl from & compiled it. I copied the clairctl.yml.default file in separate directory with the name of clairctl.yml & made below changes: vim clairtctl.yml

clair: port: 6060 healthPort: 6061 uri: http://172.17.0.2 report: path: ./reports format: html docker: insecure-registries: - "docker-distro:5000"

I have clair running on one container which is actually on a RHEL7.3 guest machine on virtualbox (UBUNTU). On the same machine I have download the source code of clairctl and built it. My self certificate private registry is running on another virtual machine (RHEL7.3); which can be accessed through a authenticated http user from any docker host.

Now, when I am trying to push/pull/analyze any image It returns the following error:

clairctl --log-level Debug analyze docker-distro:5000/registry:newone --config /root/test/clairctl.yml
2017-03-20 08:46:28.307569 D | config: Using config file: /root/test/clairctl.yml 2017-03-20 08:46:28.307829 D | dockerdist: Downloading manifest for docker-distro:5000/registry:newone 2017-03-20 08:46:28.307949 D | dockerdist: Retrieving repository client 2017-03-20 08:46:28.408700 D | dockerdist: endpoint.TLSConfig.InsecureSkipVerify: true 2017-03-20 08:46:28.412496 D | dockerdist: cannot instanciate new v2 repository on http://docker-distro:5000 client quit unexpectedly 2017-03-20 08:46:28.412555 C | cmd: retrieving manifest for "docker-distro:5000/registry:newone": Get http://docker-distro:5000/v2/: malformed HTTP response "\x15\x03\x01\x00\x02\x02"


I think I need to provide the .crt file also http authentication is require. Kindly guide me. Its urgent

Looking forward to hearing from you.

shiva022 avatar Mar 20 '17 13:03 shiva022

Also find the below log of running clair:

2017-03-20 05:21:05.497699 I | pgsql: running database migrations goose: no migrations to run. current version: 20151222113213 2017-03-20 05:21:05.966535 I | pgsql: database migration ran successfully 2017-03-20 05:21:05.966873 I | notifier: notifier service is disabled 2017-03-20 05:21:05.966903 I | api: starting main API on port 6060. 2017-03-20 05:21:05.967196 I | api: starting health API on port 6061. 2017-03-20 05:21:05.967294 I | updater: updater service started. lock identifier: 562e0e8e-bc1e-4ac0-b25c-01b9431f8c33 2017-03-20 05:21:11.462738 I | api: 172.17.0.1:34640 "GET /health" 200 (3.064914ms) 2017-03-20 05:26:22.569080 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 05:26:22.569128 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:33161/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 05:26:22.570470 I | api: 172.17.0.1:44086 "POST /v1/layers" 400 (119.630096ms) 2017-03-20 05:26:44.256125 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 05:26:44.256165 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:33116/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 05:26:44.256479 I | api: 172.17.0.1:44106 "POST /v1/layers" 400 (88.409697ms) 2017-03-20 05:28:34.343334 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 05:28:34.343381 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:45086/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 05:28:34.343685 I | api: 172.17.0.1:44126 "POST /v1/layers" 400 (79.901226ms) 2017-03-20 05:33:23.418557 W | detectors: could not download layer: got status code 404, expected 2XX 2017-03-20 05:33:23.418619 E | worker: layer cac2bb4c0c91ffa2821e9fecd2f8ccb32de91a33bfe079ae8c114170946c4dd2: failed to extract data from http://172.17.0.1:46654/local/library/ubuntu/blobs/cac2bb4c0c91ffa2821e9fecd2f8ccb32de91a33bfe079ae8c114170946c4dd2/layer.tar: could not find layer 2017-03-20 05:33:23.419481 I | api: 172.17.0.1:44136 "POST /v1/layers" 400 (3.959529ms) 2017-03-20 05:35:29.386415 W | detectors: could not download layer: got status code 404, expected 2XX 2017-03-20 05:35:29.386470 E | worker: layer cac2bb4c0c91ffa2821e9fecd2f8ccb32de91a33bfe079ae8c114170946c4dd2: failed to extract data from http://172.17.0.1:37432/local/library/ubuntu/blobs/cac2bb4c0c91ffa2821e9fecd2f8ccb32de91a33bfe079ae8c114170946c4dd2/layer.tar: could not find layer 2017-03-20 05:35:29.386809 I | api: 172.17.0.1:44142 "POST /v1/layers" 400 (2.214089ms) 2017-03-20 05:35:51.743560 W | detectors: could not download layer: got status code 404, expected 2XX 2017-03-20 05:35:51.743599 E | worker: layer cac2bb4c0c91ffa2821e9fecd2f8ccb32de91a33bfe079ae8c114170946c4dd2: failed to extract data from http://172.17.0.1:39656/local/library/ubuntu/blobs/cac2bb4c0c91ffa2821e9fecd2f8ccb32de91a33bfe079ae8c114170946c4dd2/layer.tar: could not find layer 2017-03-20 05:35:51.744368 I | api: 172.17.0.1:44148 "POST /v1/layers" 400 (2.712409ms) 2017-03-20 05:41:09.659242 I | api: 172.17.0.1:34840 "GET /health" 200 (24.193µs) 2017-03-20 05:42:32.713706 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 05:42:32.713760 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:44016/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 05:42:32.714588 I | api: 172.17.0.1:44168 "POST /v1/layers" 400 (72.286565ms) 2017-03-20 06:04:06.673234 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 06:04:06.673289 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:39623/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 06:04:06.674380 I | api: 172.17.0.1:44192 "POST /v1/layers" 400 (78.003236ms) 2017-03-20 06:19:57.275281 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 06:19:57.275806 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:44003/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 06:19:57.276917 I | api: 172.17.0.1:44240 "POST /v1/layers" 400 (76.52228ms) 2017-03-20 06:21:37.958623 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 06:21:37.958680 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:44029/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 06:21:37.959841 I | api: 172.17.0.1:44260 "POST /v1/layers" 400 (80.346481ms) 2017-03-20 07:07:07.160735 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 07:07:07.161262 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:41440/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 07:07:07.162053 I | api: 172.17.0.1:44318 "POST /v1/layers" 400 (84.211101ms) 2017-03-20 07:09:32.024092 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 07:09:32.024149 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:42636/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 07:09:32.024418 I | api: 172.17.0.1:44338 "POST /v1/layers" 400 (90.208192ms) 2017-03-20 07:12:49.062725 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 07:12:49.062802 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:42907/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 07:12:49.063188 I | api: 172.17.0.1:44358 "POST /v1/layers" 400 (77.441947ms) 2017-03-20 07:18:49.255271 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 07:18:49.255326 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:35668/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 07:18:49.255610 I | api: 192.168.43.159:41032 "POST /v1/layers" 400 (80.044537ms) 2017-03-20 07:29:27.537837 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 07:29:27.537892 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:41765/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 07:29:27.538846 I | api: 192.168.43.159:41098 "POST /v1/layers" 400 (82.375173ms) 2017-03-20 07:31:18.635284 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 07:31:18.635618 E | worker: layer sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: failed to extract data from http://172.17.0.1:39919/v2/nfs/blobs/sha256:d24bc6f195c3546ffad21f479176fecee0b8a6770b852e35d6c45186608de767: could not find layer 2017-03-20 07:31:18.636069 I | api: 192.168.43.159:41120 "POST /v1/layers" 400 (91.532996ms) 2017-03-20 09:05:17.478658 I | main: Received interruption, gracefully stopping ... 2017-03-20 09:05:17.479261 I | api: health API stopped 2017-03-20 09:05:47.737240 I | pgsql: running database migrations goose: no migrations to run. current version: 20151222113213 2017-03-20 09:05:47.743287 I | pgsql: database migration ran successfully 2017-03-20 09:05:47.743658 I | notifier: notifier service is disabled 2017-03-20 09:05:47.743687 I | api: starting main API on port 6060. 2017-03-20 09:05:47.743962 I | api: starting health API on port 6061. 2017-03-20 09:05:47.744063 I | updater: updater service started. lock identifier: cd8c3376-4a03-43aa-8b4d-6fb14eec1ee7 2017-03-20 09:16:39.967257 W | detectors: could not download layer: got status code 401, expected 2XX 2017-03-20 09:16:39.967303 E | worker: layer sha256:45a2e645736c4c66ef34acce2407ded21f7a9b231199d3b92d6c9776df264729: failed to extract data from http://172.17.0.1:45323/v2/pradeeppandey/nginx/blobs/sha256:45a2e645736c4c66ef34acce2407ded21f7a9b231199d3b92d6c9776df264729: could not find layer 2017-03-20 09:16:39.968654 I | api: 192.168.43.159:41316 "POST /v1/layers" 400 (5.108807598s) 2017-03-20 09:18:17.530197 I | api: 192.168.43.159:41328 "POST /v1/layers" 201 (1.628158ms) 2017-03-20 09:18:17.535478 I | api: 192.168.43.159:41330 "POST /v1/layers" 201 (1.780656ms) 2017-03-20 09:18:17.540543 I | api: 192.168.43.159:41332 "POST /v1/layers" 201 (3.713227ms) 2017-03-20 09:18:17.543719 I | api: 192.168.43.159:41334 "POST /v1/layers" 201 (1.280544ms) 2017-03-20 09:18:17.547910 I | api: 192.168.43.159:41336 "POST /v1/layers" 201 (3.12402ms) 2017-03-20 09:18:17.784457 I | api: 192.168.43.159:41338 "GET /v1/layers/d2a1e72da0f09969459b950626da6398dc9a0711c12c692f860c3df7ee74a8af?vulnerabilities" 200 (234.26457ms) 2017-03-20 09:18:17.789665 I | api: 192.168.43.159:41338 "GET /v1/layers/0459fbf05eac8b485c45e876c9b000d4b075b4b558acf5bd22d1c20e9a479a5d?vulnerabilities" 200 (4.609855ms) 2017-03-20 09:18:17.793779 I | api: 192.168.43.159:41338 "GET /v1/layers/e17e0a0c79b5065e779ce1572ee4e7616f537de386679d98da0c2fc605a2d0d1?vulnerabilities" 200 (2.986404ms) 2017-03-20 09:18:17.798128 I | api: 192.168.43.159:41338 "GET /v1/layers/bc3e9c05053c59b74806d229e26addb18e00cd86fde70bb58b4b37f369984dd8?vulnerabilities" 200 (3.916256ms) 2017-03-20 09:18:17.801792 I | api: 192.168.43.159:41338 "GET /v1/layers/e417b0008e1f967e1b1d69a697c6202e433da3ce43cb00bc4b34bf96a5026f3e?vulnerabilities" 200 (2.816488ms) 2017-03-20 09:22:13.540867 W | detectors: could not download layer: got status code 404, expected 2XX 2017-03-20 09:22:13.540916 E | worker: layer 68ce305a512b7b5694385dea461983088639b156b30b02f464074189ccde7ebf: failed to extract data from http://172.17.0.1:37285/local/library/nfs/blobs/68ce305a512b7b5694385dea461983088639b156b30b02f464074189ccde7ebf/layer.tar: could not find layer 2017-03-20 09:22:13.541235 I | api: 192.168.43.159:41340 "POST /v1/layers" 400 (2.17234ms) 2017-03-20 09:23:42.051212 W | detectors: could not download layer: got status code 404, expected 2XX 2017-03-20 09:23:42.051257 E | worker: layer 68ce305a512b7b5694385dea461983088639b156b30b02f464074189ccde7ebf: failed to extract data from http://172.17.0.1:33379/local/library/nfs/blobs/68ce305a512b7b5694385dea461983088639b156b30b02f464074189ccde7ebf/layer.tar: could not find layer 2017-03-20 09:23:42.051530 I | api: 192.168.43.159:41344 "POST /v1/layers" 400 (2.981071ms) 2017-03-20 09:24:08.462524 I | api: 192.168.43.159:41348 "POST /v1/layers" 201 (1.17056ms) 2017-03-20 09:24:08.465995 I | api: 192.168.43.159:41350 "POST /v1/layers" 201 (2.410606ms) 2017-03-20 09:24:08.468425 I | api: 192.168.43.159:41352 "POST /v1/layers" 201 (1.077119ms) 2017-03-20 09:24:08.472120 I | api: 192.168.43.159:41354 "POST /v1/layers" 201 (2.534758ms) 2017-03-20 09:24:08.474635 I | api: 192.168.43.159:41356 "POST /v1/layers" 201 (1.136586ms) 2017-03-20 09:24:08.479952 I | api: 192.168.43.159:41358 "GET /v1/layers/d2a1e72da0f09969459b950626da6398dc9a0711c12c692f860c3df7ee74a8af?vulnerabilities" 200 (4.20299ms) 2017-03-20 09:24:08.483630 I | api: 192.168.43.159:41358 "GET /v1/layers/0459fbf05eac8b485c45e876c9b000d4b075b4b558acf5bd22d1c20e9a479a5d?vulnerabilities" 200 (2.660459ms) 2017-03-20 09:24:08.487963 I | api: 192.168.43.159:41358 "GET /v1/layers/e17e0a0c79b5065e779ce1572ee4e7616f537de386679d98da0c2fc605a2d0d1?vulnerabilities" 200 (3.858567ms) 2017-03-20 09:24:08.491646 I | api: 192.168.43.159:41358 "GET /v1/layers/bc3e9c05053c59b74806d229e26addb18e00cd86fde70bb58b4b37f369984dd8?vulnerabilities" 200 (2.813762ms) 2017-03-20 09:24:08.496599 I | api: 192.168.43.159:41358 "GET /v1/layers/e417b0008e1f967e1b1d69a697c6202e433da3ce43cb00bc4b34bf96a5026f3e?vulnerabilities" 200 (4.456578ms) 2017-03-20 09:24:43.782184 I | api: 192.168.43.159:41360 "POST /v1/layers" 201 (1.158781ms) 2017-03-20 09:24:43.786419 I | api: 192.168.43.159:41362 "POST /v1/layers" 201 (2.779295ms) 2017-03-20 09:24:43.791342 I | api: 192.168.43.159:41364 "POST /v1/layers" 201 (2.489769ms) 2017-03-20 09:24:43.796914 I | api: 192.168.43.159:41366 "POST /v1/layers" 201 (3.073113ms) 2017-03-20 09:24:43.801112 I | api: 192.168.43.159:41368 "POST /v1/layers" 201 (1.574958ms) 2017-03-20 09:24:43.811966 I | api: 192.168.43.159:41370 "GET /v1/layers/d2a1e72da0f09969459b950626da6398dc9a0711c12c692f860c3df7ee74a8af?vulnerabilities" 200 (8.546346ms) 2017-03-20 09:24:43.818975 I | api: 192.168.43.159:41370 "GET /v1/layers/0459fbf05eac8b485c45e876c9b000d4b075b4b558acf5bd22d1c20e9a479a5d?vulnerabilities" 200 (4.04423ms) 2017-03-20 09:24:43.824493 I | api: 192.168.43.159:41370 "GET /v1/layers/e17e0a0c79b5065e779ce1572ee4e7616f537de386679d98da0c2fc605a2d0d1?vulnerabilities" 200 (4.446132ms) 2017-03-20 09:24:43.831529 I | api: 192.168.43.159:41370 "GET /v1/layers/bc3e9c05053c59b74806d229e26addb18e00cd86fde70bb58b4b37f369984dd8?vulnerabilities" 200 (5.503122ms) 2017-03-20 09:24:43.839431 I | api: 192.168.43.159:41370 "GET /v1/layers/e417b0008e1f967e1b1d69a697c6202e433da3ce43cb00bc4b34bf96a5026f3e?vulnerabilities" 200 (6.664015ms) 2017-03-20 09:25:59.139041 W | detectors: could not download layer: got status code 404, expected 2XX 2017-03-20 09:25:59.139121 E | worker: layer 68ce305a512b7b5694385dea461983088639b156b30b02f464074189ccde7ebf: failed to extract data from http://172.17.0.1:43258/local/library/nfs/blobs/68ce305a512b7b5694385dea461983088639b156b30b02f464074189ccde7ebf/layer.tar: could not find layer 2017-03-20 09:25:59.140220 I | api: 192.168.43.159:41372 "POST /v1/layers" 400 (51.386743ms) 2017-03-20 12:08:59.350799 I | api: 192.168.43.159:54618 "GET /health" 200 (12.449738ms)

shiva022 avatar Mar 20 '17 13:03 shiva022

Any input please.

shiva022 avatar Mar 21 '17 10:03 shiva022

Could you try with the tag 1.2.7?

jgsqware avatar Jun 16 '17 15:06 jgsqware