Watchtower: Docker API version mismatch with DSM 6.1

Created on 25 Feb 2017  路  34Comments  路  Source: containrrr/watchtower

Just tried the image under DSM 6.1:

when starting the container i get the error log:
Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.23
and the container quits of course.

Most helpful comment

I have the same issue with a QNAP Container Station which is a docker/lxc wrapper.

All 34 comments

Currently all testings have been done against docker 1.12 and above, therefore the api version used is 1.24. I will need to check if all api calls and data is available in 1.23, maybe we could set the minimal required api version to 1.23.

Hi,

I'm having the same problem

Nick

I have the same issue with a QNAP Container Station which is a docker/lxc wrapper.

I believe Synology (and I suspect QNAP too) has not updated to the new docker version because it would break the custom GUI they built for it and is why they only update docker via system updates.

I've contacted Synology about updating the Docker Package. Reply was not too excited. They stated that they will update but basically no-one should hold their breath for that update to come. If watchtower would be able to work with the older api that would be a big point....

disappointing.. they are quite behind on those updates too.

@udochrist In the meantime, here are the steps to get it to work on Synology with an older version of Watchtower.

Steps:

  1. Symlink /var/run/docker.sock to /volume1/docker/docker.sock: sudo ln -s /var/run/docker.sock /volume1/docker/docker.sock
  1. docker run command: sudo docker run -d --name watchtower -v /volume1/docker/docker.sock:/var/run/docker.sock centurylink/watchtower --interval 82800 --cleanup

Note: The symlink to docker.sock is important (vs pointing to /var/run/docker.sock directly) to make it restartable in the Synology GUI.

@desimaniac, thanks for the workaround. We should mention, that using an older version has some other problems, like networks don't get reconnected, it doesn't work with private registries...

Oh ok. I did not know that. For the few containers I have setup, it seems to be working ok.

@stffabi The wiki instructions I created need to be modified as the symlinks are not persisting after reboot. So either I can make those changes if I am allowed to edit it or it should be taken off completely so no misinformation exists.

OK: I'm confused. I re-tried that using v2tec/watchtower. Same issue. API Versions don't match.
I've yet to try the centurylink/watchtower version but it seems that image does not provide the same features (i.e. to specify which container to watch) as v2tec.
there does not seem to be an official version/repo of the watchtower... sigh.

This is the official repo of Watchtower. It used to be called centurylink/watchtower, but it was renamed to v2tec/watchtower. When you do the docker command with centurylink/watchtower, it's just calling up the older version.

@desimaniac Could you post your changes to the wiki as a separate issue? I'll then take those over to the official wiki. Unfortunately it seems like github doesn't support PR for the wiki...

@stffabi Could you just not make the wiki editable? Other repositories have it publicly editable (e.g. HTPC Manager). If not, I will create a separate issue for it.

@desimaniac wiki is editable again.

With the v2tec version (not the centurylink ver, which is the one in the wiki I might add) the symlink work around does not function on DSM. You get a server / client API version mismatch and a watchtower fatal error.

Was there a working solution? I am attempting to use watchtower on a QNAP as well, same issue.

No currently not, the v2tec images use a fixed minimal API version, with which it has been tested. I've scheduled this for milestone 0.2.0 to check if we could downgrade to API version 1.23

@stffabi Updated the wiki. Thanks

@sgtsquiggs I had a friend who had success with webhippie/watchtower on Synology without any API mismatch errors and without having to use the older centurylink/watchtower (like in the wiki). You may try that out if you like.

馃檹 @stffabi will try!

while webhippie/watchtower did work, unfortunately it was updated yesterday and so now no longer allows you to specify the api version (you can but it just errors on the client/server api version)....anyone have a better solution?
When this was working it was great!

Synology just updated their version of Docker with the last DSM update. should that fix this issue?

@woodpost maybe, do you know what docker version they are using now?

docker version, after the Synology update :

Client:
Version: 1.11.2
API version: 1.23
Go version: go1.8
Git commit: 5be46ee-synology
Built: Fri May 12 16:36:47 2017
OS/Arch: linux/amd64

Server:
Version: 1.11.2
API version: 1.23
Go version: go1.8
Git commit: 5be46ee-synology
Built: Fri May 12 16:36:47 2017
OS/Arch: linux/amd64

@gitrulez I think Docker version needs to be >1.12 and the API > 1.24 for it to work.

Did somebody tests with DSM 6.2 beta (https://www.synology.com/en-global/beta/DSM62Beta)?

Docker

Upgraded Docker daemon to version 17.05.0-ce, supporting Docker Swarm (DSM 6.2 only) and new official Docker features through command line interface for better container virtualization.
Upgraded Docker-compose to version 1.14.0.
Supports Overlay network setting with SSH command line (DSM 6.2 is required).
Added support for v2 registries and exporting images.

After updating to Synology DSM 6.2 beta, and afterwards updating the docker package it seems to work now. After the first update via watchtower, all container settings especially environment variables look correct.

docker version after the update:

Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.8
Git commit: c41a871-synology
Built: Thu Sep 7 16:13:36 2017
OS/Arch: linux/amd64

Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.8
Git commit: c41a871-synology
Built: Thu Sep 7 16:13:36 2017
OS/Arch: linux/amd64
Experimental: false

Package was updated today on DSM 6.1 as well. Still need to check if it works now though.

Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.8
 Git commit:   e9bcf19-synology
 Built:        Wed Nov  1 17:00:28 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.8
 Git commit:   e9bcf19-synology
 Built:        Wed Nov  1 17:00:28 2017
 OS/Arch:      linux/amd64
 Experimental: false

17.05.0-ce should work without any problems, currently watchtower demands at least the api version 1.24

Therefore you should be good with your version 馃槃

Great to see Synology updated their docker version.

hmm, i just updated to the new DSM (6.1.4-15217) and updated the Docker package. the behaviour now is a little different, but it still didn't quite work. it used to nuke the variables, and then populate it with bogus variables. now it just nukes the variables.

did it work for anyone else?

@woodpost you are now seeing issue #84 . Maybe we should move your discussion over to that thread, as this might be interested for the other people over there as well.

I'm running Docker (17.05.0-0349) on my Synology DS216+ (DSM 6.1.4-15217) und just launched a watchtower container. It successfully updated my plex container. (Env Vars and everything are still correct and have not changed!)

@Gabweb thanks for sharing your successful experience. I'm going to close this issue, because synology now has an update in place to a newer docker version which works with watchtower.

@woodpost and all other people who have problems with missing environment variables after the update, please post your information in #84 . So we could track that down over there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

meandthedevil picture meandthedevil  路  6Comments

7imbrook picture 7imbrook  路  7Comments

MakerTim picture MakerTim  路  6Comments

regystro picture regystro  路  5Comments

darox picture darox  路  5Comments