Skip to content

Unable to parse docker version "1.26": illegal version string "1.26" #14279

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

Closed
php-coder opened this issue May 22, 2017 · 19 comments
Closed

Unable to parse docker version "1.26": illegal version string "1.26" #14279

php-coder opened this issue May 22, 2017 · 19 comments
Assignees
Labels
component/kubernetes kind/bug Categorizes issue or PR as related to a bug. priority/P1

Comments

@php-coder
Copy link
Contributor

I see the Unable to parse docker version "1.26": illegal version string "1.26" error in OpenShift logs.

Version
$ openshift version
openshift v3.6.0-alpha.1+a666b7c-745-dirty
kubernetes v1.6.1+5115d708d7
etcd 3.1.0
$ oc version
oc v3.6.0-alpha.1+a666b7c-745-dirty
kubernetes v1.6.1+5115d708d7
features: Basic-Auth
Unable to connect to the server: x509: certificate signed by unknown authority
Steps To Reproduce
  1. cd examples/sample-app
  2. sudo which openshift start --public-master=127.0.0.1 --volume-dir=$PWD/volumes &>logs/openshift.log
Current Result
E0522 17:37:54.975306   12527 container_manager_linux.go:90] Unable to parse docker version "1.26": illegal version string "1.26"
W0522 17:37:55.066851   12527 container_manager_linux.go:750] CPUAccounting not enabled for pid: 12131
W0522 17:37:55.066868   12527 container_manager_linux.go:753] MemoryAccounting not enabled for pid: 12131
W0522 17:37:55.066960   12527 container_manager_linux.go:750] CPUAccounting not enabled for pid: 12527
W0522 17:37:55.066965   12527 container_manager_linux.go:753] MemoryAccounting not enabled for pid: 12527
Expected Result

There is no such error.

Additional Information
$ docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-9.git14cc629.fc27.x86_64
 Go version:      go1.8.1
 Git commit:      14cc629/1.13.1
 Built:           Thu Apr 13 18:28:00 2017
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-9.git14cc629.fc27.x86_64
 Go version:      go1.8.1
 Git commit:      14cc629/1.13.1
 Built:           Thu Apr 13 18:28:00 2017
 OS/Arch:         linux/amd64
 Experimental:    false
$ rpm -qa | grep docker
docker-common-1.13.1-9.git14cc629.fc27.x86_64
docker-rhel-push-plugin-1.13.1-9.git14cc629.fc27.x86_64
docker-1.13.1-9.git14cc629.fc27.x86_64
$ cat /etc/redhat-release 
Fedora release 25 (Twenty Five)
@pweil- pweil- added component/kubernetes kind/bug Categorizes issue or PR as related to a bug. priority/P1 labels May 22, 2017
@dcbw
Copy link
Contributor

dcbw commented May 24, 2017

Backport of upstream kubernetes/kubernetes#44068 seems required.

@derekwaynecarr
Copy link
Member

That backport came in #14158

@stevekuznetsov
Copy link
Contributor

Docker API version is not and has not been a Semantic Version. Not sure that is the correct backport -- that was just to not parse the Docker package version as semantic.

@derekwaynecarr
Copy link
Member

I would like to fix 1.13, but for reference, docker 1.12.6 is the actually supported version at this time.

@stevekuznetsov
Copy link
Contributor

From the changes by @soltysh in #14158 we see this change:

-	version, err := utilversion.ParseSemantic(v.Version)
+	version, err := utilversion.ParseSemantic(v.APIVersion)

Which is incorrectly parsing the API version of Docker as a semantic version -- it is not. Why is that working upstream?

@derekwaynecarr
Copy link
Member

looks like an error in the port from upstream.

@soltysh
Copy link
Contributor

soltysh commented Jun 2, 2017

Should be fixed right now.

@soltysh soltysh closed this as completed Jun 2, 2017
@soltysh
Copy link
Contributor

soltysh commented Jun 7, 2017

It looks like it's still not fixed, I'm getting:

E0607 11:20:46.278094   19536 docker_manager.go:2159] Failed to create pod infra container: RunContainerError; Skipping pod "kapua-broker-1-deploy_redhat-iot(452e2961-4b73-11e7-a79c-0ec6a458e57a)": runContainer: docker: failed to parse docker version "17.03.1-ce": illegal zero-prefixed version component "03" in "17.03.1-ce"

on recent master.

@soltysh
Copy link
Contributor

soltysh commented Jun 7, 2017

It looks like this line need to be switched to utilversion.ParseGeneric(version) as well, trying...

@soltysh
Copy link
Contributor

soltysh commented Jun 7, 2017

@derekwaynecarr are you aware of any changes that happened upstream, I'm missing here?

@soltysh
Copy link
Contributor

soltysh commented Jun 7, 2017

I think I spoke too soon, since I'm using oc cluster up for that it picked the v3.6.0-alpha.1 which does not have that fix in place. Double checking this...

@oprudkyi
Copy link
Contributor

oprudkyi commented Jun 7, 2017

Since #13865 is closed, copying here what was wrong with new docker in that issue :
even if openshift is able to run, new pods aren't created with error

open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory

@soltysh
Copy link
Contributor

soltysh commented Jun 7, 2017

The problem is that oc cluster up is picking the last released version of OpenShift. Since only 3.6 has the necessary fix and latest released version at the time of speaking is v3.6.0-alpha.1 which does not have that fix there are two possible fixes:

  1. downgrade to older docker (1.12 worked for me)
  2. use oc cluster up --version=latest which specifies to use the latest available images which have that fix.

@soltysh soltysh closed this as completed Jun 7, 2017
@soltysh
Copy link
Contributor

soltysh commented Jun 9, 2017

Now that https://github.com/openshift/origin/releases/tag/v3.6.0-alpha.2 is released the oc cluster up downloaded from there will use the newest released images, as well.

@caleblloyd
Copy link

@soltysh I don't think this has been fixed yet.

Openshift Version:

$ oc version
oc v3.6.0-alpha.2+3c221d5
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
openshift v3.6.0-alpha.2+bbb9647-550
kubernetes v1.6.1+5115d708d7

Docker Version:

$ docker version
Client:
 Version:      17.06.0-ce-rc5
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   b7e4173
 Built:        Tue Jun 20 07:13:24 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.0-ce-rc5
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   b7e4173
 Built:        Tue Jun 20 07:12:15 2017
 OS/Arch:      linux/amd64
 Experimental: false

Still getting this error:

$ oc new-app --docker-image=nginx
$ oc get pods
NAME             READY     STATUS    RESTARTS   AGE
nginx-1-deploy   0/1       Error     0          4m
$ oc logs nginx-1-deploy
error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory

@soltysh
Copy link
Contributor

soltysh commented Jun 27, 2017

@caleblloyd how do you run openshift, if through docker, make sure to use alpha-2 images. It's the server that needs to be fixed.

@caleblloyd
Copy link

@soltysh I tried both oc cluster up --version=latest and oc cluster up --version="v3.6.0-alpha.2" and both yield the error mentioned

@soltysh
Copy link
Contributor

soltysh commented Jun 28, 2017

It looks like in your case it's this: https://docs.openshift.org/latest/admin_guide/manage_scc.html#enable-dockerhub-images-that-require-root because I've just tried with:

[1046] vagrant@dev:~ 
$ oc version
oc v3.6.0-alpha.2+3c221d5
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
openshift v3.6.0-alpha.2+3c221d5
kubernetes v1.6.1+5115d708d7

and

$ docker version
Client:
 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:23:59 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.2-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:23:59 2017
 OS/Arch:      linux/amd64
 Experimental: false

on my fedora 25 machine and it worked just fine, but with that scc tweak as described in the link. The reason for that is that nginx is trying to expose port 80, which is a root operation and you need to set appropriate access right to do so. Personally, I always check with oc run hello --image=openshift/hello-openshift which runs a simple go web server returning Hello OpenShift! on port 8080.

@caleblloyd
Copy link

@soltysh thank you. I did get OpenShift working fine inside of a Ubuntu 16.04 VM using Docker 17.06-ce.

The problem open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory that I am encountering only happens inside of an LXD container now, and is unrelated to this issue so I have opened #14959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/kubernetes kind/bug Categorizes issue or PR as related to a bug. priority/P1
Projects
None yet
Development

No branches or pull requests

8 participants