clairctl icon indicating copy to clipboard operation
clairctl copied to clipboard

problem with docker api version

Open ehaselwanter opened this issue 8 years ago • 9 comments

is it possible to relax on the the docker version running?

clairctl analyze --local  node:latest
panic: Error response from daemon: client is newer than server (client API version: 1.26, server API version: 1.23)

ehaselwanter avatar May 10 '17 18:05 ehaselwanter

Hello thanks for reporting. I have to upgrade the docker dependencies in the vendor. I use the docker api. I Will try to fix it soon.

Le mer. 10 mai 2017 20:42, Edmund Haselwanter [email protected] a écrit :

is it possible to relax on the the docker version running?

clairctl analyze --local node:latest panic: Error response from daemon: client is newer than server (client API version: 1.26, server API version: 1.23)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jgsqware/clairctl/issues/38, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJrq65YiKayWuD630nAZZhejSLQhFaBks5r4gUVgaJpZM4NXEN4 .

jgsqware avatar May 10 '17 18:05 jgsqware

well. client is newer than server, so clairctl is not able to talk to an older api. I do not see how an upgrade of clairctl can fix this. or is an upgraded version able to talk to older docker-engines?

ehaselwanter avatar May 11 '17 07:05 ehaselwanter

anyway. I just tested the 'upgrade the engine' path. this worked

working against api:

docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:42:29 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:42:29 2017
 OS/Arch:      linux/amd64
 Experimental: false

NOT working:

docker version
Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:34:23 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:34:23 2016
 OS/Arch:      linux/amd64

ehaselwanter avatar May 11 '17 07:05 ehaselwanter

not clairctl is talking with the docker-engine. but I get:

clairctl analyze --local  **********
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4f4ce0]

goroutine 1 [running]:
net/url.(*URL).String(0x0, 0x1a, 0x0)
	/usr/local/Cellar/go/1.8.1/libexec/src/net/url/url.go:726 +0x40
github.com/jgsqware/clairctl/clair.insertRegistryMapping(0xc420019597, 0x40, 0xc42034c7c0, 0x1a)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/clair/push.go:93 +0x7a
github.com/jgsqware/clairctl/clair.(*layering).pushAll(0xc4203420a0, 0xc42000e6c0, 0x4)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/clair/layering.go:53 +0x2cd
github.com/jgsqware/clairctl/clair.Push(0xd45660, 0xc420348eb0, 0xd40e20, 0xc420016580, 0xc420348eb0, 0xd40e20)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/clair/push.go:35 +0x40f
github.com/jgsqware/clairctl/cmd.glob..func1(0xd84e80, 0xc420346300, 0x1, 0x2)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/cmd/analyze.go:41 +0x266
github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra.(*Command).execute(0xd84e80, 0xc420346120, 0x2, 0x2, 0xd84e80, 0xc420346120)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra/command.go:636 +0x231
github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xd85b40, 0xc42018ff78, 0x40493c, 0xc42001a0b8)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra/command.go:722 +0x339
github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra.(*Command).Execute(0xd85b40, 0x0, 0x0)
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra/command.go:681 +0x2b
github.com/jgsqware/clairctl/cmd.Execute()
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/cmd/root.go:32 +0x31
main.main()
	/Users/ehaselwanter/gocode/src/github.com/jgsqware/clairctl/main.go:20 +0x20

I did build it on a Mac with

env  GOOS=linux go build

ehaselwanter avatar May 11 '17 07:05 ehaselwanter

Hi @jgsqware , I really appreciate your work. I m not an expert on linux and docker technologies but I have the same problem with: - docker 1.9.1 -Debian8. -golang version 1.8.

Best regards,

Raty918 avatar May 11 '17 13:05 Raty918

Has anyone tried to set the DOCKER_API_VERSION environment variable ?

jdel avatar May 12 '17 13:05 jdel

Could you retry with the last built version?

jgsqware avatar May 29 '17 11:05 jgsqware

I'm getting this with version 1.2.8

palfrey avatar Aug 21 '17 17:08 palfrey

https://github.com/moby/moby/issues/25498#issuecomment-323811351 claims they've fixed this in some way in the Docker API, but it's not exactly clear....

palfrey avatar Aug 21 '17 18:08 palfrey