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

analyze-local-images: says “the resource cannot be found” #27

Closed
stapelberg opened this issue Nov 23, 2015 · 4 comments
Closed

analyze-local-images: says “the resource cannot be found” #27

stapelberg opened this issue Nov 23, 2015 · 4 comments
Labels
kind/bug things are not as they seem

Comments

@stapelberg
Copy link
Contributor

I was trying to use the new analyze-local-images program, but it doesn’t seem to work for me:

In one terminal, I start clair:

$ docker run -it -p 6060:6060 -p 6061:6061 quay.io/coreos/clair --db-path=/db/bolt
2015-11-23 21:37:05.493710 I | database: database at /db/bolt does not exist yet, creating it
2015-11-23 21:37:05.499966 I | api: starting API on port 6060.
2015-11-23 21:37:05.500029 I | updater: updater service started. lock identifier: 78143d76-b946-45b5-86d5-e80dd72c9dce
2015-11-23 21:37:05.500291 I | api: starting Health API on port 6061.
2015-11-23 21:37:05.502117 I | updater: updating vulnerabilities
2015-11-23 21:37:05.502210 I | updater/fetchers: fetching Debian vulneratibilities
2015-11-23 21:37:05.502467 I | updater/fetchers: fetching Ubuntu vulneratibilities
2015-11-23 21:37:05.502744 I | updater/fetchers: fetching Red Hat vulneratibilities
2015-11-23 21:40:37.745528 E | worker: layer cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff: failed to extract data from /tmp/analyze-local-image-197689302/cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/layer.tar: the resource cannot be found
2015-11-23 21:40:37.745605 I | api: 404 POST /v1/layers (390.349µs)
2015-11-23 21:40:58.800581 E | worker: layer 902b87aaaec929e80541486828959f14fa061f529ad7f37ab300d4ef9f3a0dbf: failed to extract data from /tmp/analyze-local-image-040123037/902b87aaaec929e80541486828959f14fa061f529ad7f37ab300d4ef9f3a0dbf/layer.tar: the resource cannot be found
2015-11-23 21:40:58.800611 I | api: 404 POST /v1/layers (175.692µs)

In another one, I run analyze-local-images:

$ analyze-local-images debian:jessie      
Saving debian:jessie
Getting image's history
Analyzing 2 layers
- Analyzing 902b87aaaec929e80541486828959f14fa061f529ad7f37ab300d4ef9f3a0dbf
2015/11/23 22:40:58 - Could not analyze layer: Got response 404 with message {"Message":"the resource cannot be found"}

My docker version:

$ docker version
Client:
 Version:      1.8.3
 API version:  1.20
 Go version:   go1.5.1
 Git commit:   f4bf5c7
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.3
 API version:  1.20
 Go version:   go1.5.1
 Git commit:   f4bf5c7
 Built:        
 OS/Arch:      linux/amd64

I’m not sure what’s going wrong here. Can you advise please?

@Quentin-M
Copy link
Contributor

Hi.

Probably because your host's /tmp is not mounted on the Clair's docker container. I guess that it is missing from the README.md at that point.

@stapelberg
Copy link
Contributor Author

That doesn’t seem to be the problem, because mounting /tmp doesn’t fix it:

$ docker run -v /tmp:/tmp -it -p 6060:6060 -p 6061:6061 quay.io/coreos/clair --db-path=/db/bolt   
2015-11-24 07:54:09.572882 I | database: database at /db/bolt does not exist yet, creating it
2015-11-24 07:54:09.576508 I | api: starting API on port 6060.
2015-11-24 07:54:09.576536 I | updater: updater service started. lock identifier: a2608065-95ca-4a88-be31-eb895ae98cf7
2015-11-24 07:54:09.576640 I | api: starting Health API on port 6061.
2015-11-24 07:54:09.580434 I | updater: updating vulnerabilities
2015-11-24 07:54:09.580497 I | updater/fetchers: fetching Debian vulneratibilities
2015-11-24 07:54:09.580689 I | updater/fetchers: fetching Ubuntu vulneratibilities
2015-11-24 07:54:09.580922 I | updater/fetchers: fetching Red Hat vulneratibilities
2015-11-24 07:54:17.042746 I | api: 201 POST /v1/layers (160.920783ms)
2015-11-24 07:54:17.043895 E | worker: layer 9a61b6b1315e6b457c31a03346ab94486a2f5397f4a82219bee01eead1c34c2e: failed to extract data from /tmp/analyze-local-image-434964201/9a61b6b1315e6b457c31a03346ab94486a2f5397f4a82219bee01eead1c34c2e/layer.tar: the resource cannot be found
2015-11-24 07:54:17.043945 I | api: 404 POST /v1/layers (712.489µs)
$ analyze-local-images debian:jessie
Saving debian:jessie
Getting image's history
Analyzing 2 layers
- Analyzing 902b87aaaec929e80541486828959f14fa061f529ad7f37ab300d4ef9f3a0dbf
- Analyzing 9a61b6b1315e6b457c31a03346ab94486a2f5397f4a82219bee01eead1c34c2e
2015/11/24 08:54:17 - Could not analyze layer: Got response 404 with message {"Message":"the resource cannot be found"}

@Quentin-M
Copy link
Contributor

That issue must have been fixed by 9391417. Closing.

@stapelberg
Copy link
Contributor Author

Yep, verifying debian:jessie works now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug things are not as they seem
Development

Successfully merging a pull request may close this issue.

3 participants