Skip to content

Fix local system clock being ahead of the repository server's timestamp, #96

Closed

Description

@cwiklik

When deploying agent/tool from source, the Docker build may fail with this error:

E: Release file for http://deb.debian.org/debian/dists/bookworm-updates/InRelease is not valid yet (invalid for another 1min 37s). Updates for this repository will not be applied.

Apparently, the local system clock may sometimes run ahead of the repository server's time and refusing to use artifacts.

The fix is to sync local time using the following RUN command in the Dockerfile:

RUN apt-get update && apt-get install -y tzdata && \
    ln -fs /usr/share/zoneinfo/UTC /etc/localtime && \
    dpkg-reconfigure -f noninteractive tzdata

Where:
apt-get install -y tzdata
Installs the tzdata package, which contains time zone data. The -y flag automatically answers "yes" to prompts.

ln -fs /usr/share/zoneinfo/UTC /etc/localtime
Creates a symbolic link to set the system time zone to UTC.

dpkg-reconfigure -f noninteractive tzdata
Reconfigures the tzdata package without prompting the user (non-interactive mode), applying the new time zone setting.

Activity

  1. self-assigned this
    on Aug 4, 2025
  2. pdettori commented on Aug 20, 2025

    @pdettori
    Member

    @cwiklik is this something we need to do for the example agents?

  3. cwiklik commented on Aug 20, 2025

    @cwiklik
    ContributorAuthor

    This error happened more than once (Maya and Hai saw this). I am not exactly sure if the fix I proposed above addresses the issue. The error is related to out of sync time between local system and remote debian repo. In the error I see: bookworm-updates/InRelease , doesnt this come from the base python image? An example Dockerfile has this in it:

    FROM quay.io/pdettori/python:3.11-slim-bookworm
    ARG RELEASE_VERSION="main" 
    
  4. pdettori commented on Sep 3, 2025

    @pdettori
    Member

    we should add someone in the troubleshooting section or use a different base image

  5. maia-iyer commented on Sep 3, 2025

    @maia-iyer
    Contributor

    For me, a similar problem arises where my clock is behind. Sometimes, it appears my system clock stops, and I manually reset the time in settings and that syncs the time.

  6. rubambiza commented on Dec 15, 2025

    @rubambiza
    Contributor

    Rarely experienced issue. Will reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions