watchtower: Watchtower is stuck - "Waiting for running update to be finished"

Describe the bug Watchtower prints in logs Waiting for running update to be finished... and does nothing. I know there are containers to be updated, but it’s stuck.

I’ve tried killing/stopping/rebooting the container, it doesn’t help. It just prints again the same error.

The issue is “fixed” by recreating the container and deleting its internal data.

My docker-compose

version: "2"
services:
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    restart: unless-stopped
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /etc/localtime:/etc/localtime:ro
    environment:
        - WATCHTOWER_NOTIFICATIONS=email
        - WATCHTOWER_NOTIFICATION_EMAIL_FROM=foo
        - WATCHTOWER_NOTIFICATION_EMAIL_TO=bar
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=thebestsmtpserver
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=blip
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=blop
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
        - WATCHTOWER_SCHEDULE=0 0 0 * * *
        - WATCHTOWER_CLEANUP=true
        - WATCHTOWER_TIMEOUT=30s
        - WATCHTOWER_NOTIFICATIONS_LEVEL=info
        - WATCHTOWER_NO_STARTUP_MESSAGE=true
        - TZ=Europe/Rome

To Reproduce I don’t really know how to reproduce, I think it’s a random issue.

Expected behavior Watchtower should not be stuck.

Screenshots immagine

Environment

  • Platform: Debian 10
  • Architecture: x64
  • Docker version: 19.03.8

Logs from running watchtower with the --debug option

Additional context I think it’s not the first time that happens.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (16 by maintainers)

Most upvoted comments

Like previously stated, the message “Waiting for running update to be finished” means that it’s waiting to shut down. At that point, no more scheduled checks will be done.

It looks like it’s just not hitting the cron scheduled times. Could you set WATCHTOWER_NO_STARTUP_MESSAGE=false, so that the offset to the first scheduled run is displayed?

I don’t know if it is the case, but due to COVID-19 (more people are at home overloading our infrastructure), most DNS servers nearby my location have malfunctioned, making requests take much longer than usual (timeouts had been constant, also).

Some colleagues reported having trouble while fetching docker images. You could try another DNS if the problem persists.

My internet connection is super fast (1Gbps) and when Watchtower works fine, it’s fast as well: last month it updated 9 containers and restarted them in just 1 minute and 28 seconds.

If this message appears when I turn off the server, watchtower was actually stuck for other reasons. Now it’s fine, and nothing has changed other than recreating the container. I will keep you posted if occurs again and I won’t recreate the container.