watchtower: DOCKER_API_VERSION question/bug
Describe the bug
Hello,
I recently started using the repo you are updating. Thank you for the work put in ! There is an interesting issue. If you don’t set the environment variable DOCKER_API_VERSION to anything then you get this warning: “The DOCKER_API_VERSION environment variable is set to a version lower than 1.44. This may cause unexpected behavior while recreating docker containers.”
If you set it up to 1.44, then the entire image doesn’t go up with this error: “Error respond from daemon: client version 1.44 is too new. Maximum supported API version is 1.41”
Is the warning relevant? I’ve noticed that the images that get update don’t get built afterwards, thinking maybe this is the issue?
Please let me know if there are any more details that i can provide to help in this regarding.
Steps to reproduce
- Stop container
- DOCKER_API_VERSION to 1.44
- Start container
Expected behavior
No warning displayed
Screenshots
No response
Environment
- Platform: Synology
- Architecture: not sure
- Docker Version: using Container Manager
Your logs
With version 1.44 as variable:
watchtower
date stream content
2025/02/04 09:37:14 stderr time="2025-02-04T09:37:14+02:00" level=info msg="Waiting for the notification goroutine to finish" notify=no
2025/02/04 09:37:14 stderr time="2025-02-04T09:37:14+02:00" level=error msg="Error response from daemon: client version 1.44 is too new. Maximum supported API version is 1.41"
2025/02/04 09:37:14 stderr time="2025-02-04T09:37:14+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:37:14 stderr time="2025-02-04T09:37:14+02:00" level=debug msg="Making sure everything is sane before starting"
2025/02/04 09:37:13 stderr time="2025-02-04T09:37:13+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
2025/02/04 09:37:10 stderr time="2025-02-04T09:37:10+02:00" level=info msg="Waiting for the notification goroutine to finish" notify=no
2025/02/04 09:37:10 stderr time="2025-02-04T09:37:10+02:00" level=error msg="Error response from daemon: client version 1.44 is too new. Maximum supported API version is 1.41"
2025/02/04 09:37:10 stderr time="2025-02-04T09:37:10+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:37:10 stderr time="2025-02-04T09:37:10+02:00" level=debug msg="Making sure everything is sane before starting"
2025/02/04 09:37:09 stderr time="2025-02-04T09:37:09+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
2025/02/04 09:37:07 stderr time="2025-02-04T09:37:07+02:00" level=info msg="Waiting for the notification goroutine to finish" notify=no
2025/02/04 09:37:07 stderr time="2025-02-04T09:37:07+02:00" level=error msg="Error response from daemon: client version 1.44 is too new. Maximum supported API version is 1.41"
2025/02/04 09:37:07 stderr time="2025-02-04T09:37:07+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:37:07 stderr time="2025-02-04T09:37:07+02:00" level=debug msg="Making sure everything is sane before starting"
2025/02/04 09:37:06 stderr time="2025-02-04T09:37:06+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
2025/02/04 09:37:04 stderr time="2025-02-04T09:37:04+02:00" level=info msg="Waiting for the notification goroutine to finish" notify=no
2025/02/04 09:37:04 stderr time="2025-02-04T09:37:04+02:00" level=error msg="Error response from daemon: client version 1.44 is too new. Maximum supported API version is 1.41"
2025/02/04 09:37:04 stderr time="2025-02-04T09:37:04+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:37:04 stderr time="2025-02-04T09:37:04+02:00" level=debug msg="Making sure everything is sane before starting"
2025/02/04 09:37:03 stderr time="2025-02-04T09:37:03+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
2025/02/04 09:37:00 stderr time="2025-02-04T09:37:00+02:00" level=info msg="Waiting for the notification goroutine to finish" notify=no
2025/02/04 09:37:00 stderr time="2025-02-04T09:37:00+02:00" level=error msg="Error response from daemon: client version 1.44 is too new. Maximum supported API version is 1.41"
2025/02/04 09:37:00 stderr time="2025-02-04T09:37:00+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:37:00 stderr time="2025-02-04T09:37:00+02:00" level=debug msg="Making sure everything is sane before starting"
2025/02/04 09:36:59 stderr time="2025-02-04T09:36:59+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
With version 1.41 as variable:
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=info msg="Note that the first check will be performed in 20 hours, 21 minutes, 43 seconds"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=info msg="Scheduling first run: 2025-02-05 06:00:00 +0200 EET"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=info msg="Checking all containers (except explicitly disabled with label)"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=info msg="Using notifications: smtp"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=info msg="Watchtower 2.1.2"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=debug msg="Watchtower HTTP API skipped."
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=debug msg="There are no additional watchtower containers"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=debug msg="Retrieving running, stopped and exited containers"
2025/02/04 09:38:16 stderr time="2025-02-04T09:38:16+02:00" level=debug msg="Making sure everything is sane before starting"
2025/02/04 09:38:15 stderr time="2025-02-04T09:38:15+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
2025/02/04 09:38:15 stderr time="2025-02-04T09:38:15+02:00" level=warning msg="The DOCKER_API_VERSION environment variable is set to a version lower than 1.44. This may cause unexpected behavior while recreating docker containers."
Docker compose file:
version: "3"
services:
watchtower:
container_name: watchtower
restart: unless-stopped
image: beatkind/watchtower:latest
environment:
WATCHTOWER_NOTIFICATIONS: "email"
WATCHTOWER_NOTIFICATION_EMAIL_FROM:
WATCHTOWER_NOTIFICATION_EMAIL_TO:
WATCHTOWER_NOTIFICATION_EMAIL_SERVER:
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT:
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER:
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD:
# every day at 6 am
WATCHTOWER_SCHEDULE: 0 0 6 * * *
# testing
#WATCHTOWER_SCHEDULE: "*/6 * * * *"
TZ: 'Europe/Bucharest'
WATCHTOWER_CLEANUP: "true"
DOCKER_API_VERSION: "1.41"
WATCHTOWER_ROLLING_RESTART: "true"
WATCHTOWER_INCLUDE_STOPPED: "true"
WATCHTOWER_DEBUG: "true"
# DOCKER_HOST: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 31 (14 by maintainers)
Give me 15 min, i’ll test out the beta version. It’s the least i can do.
Hey - Just tagging along here as began using the Fork,
Synology user here as well using the same Docker version as the OP - 24.0.2 (API 1.43) I noticed on my run last night I am OK from a general checking and pulling of the Images however, it fails to then create them
These are all containers created via docker compose, some are on the same user defined bridge while others are completely independent.
Happy to provide whatever other information would be useful.
v2.2.0 is released
@SteffoSpieler:
This solution for that lies in DOCKER_API_VERSION.
If you set that to 1.43 it should work. In latest-dev the minimum version for docker api is set to 1.44 by default.
Hello, first of all, thanks for keeping this fork up to date!
As @bogdans92 , I have also started using this repo recently and had the exact same problem: images get pulled, but the containers do not get recreated afterwards. In my notifications, I also get the DOCKER_API_VERSION message.
In my case, I am running docker on nixOS. This is the output for
docker version:And this is the output from
beatkind/watchtower’s container startup:I believe I have an updated version of docker, so I wouldn’t know what is wrong here. Let me know if I can help with any other additional details. Thanks again!