Introduction
Problem
VCS workflow runs are not being triggered in TFE. No run attempts are visible in the TFE UI, even after new commits have been added to a connected VCS repository.
Attempting to reconnect your Workspace to the VCS yields the following error:
There was an error fetching some of your repositories. Not Found
Attempting to create a new VCS connection yields the following error:
You don't have permission to access that OAuth Client. Please check the configuration in your VCS provider
Reviewing the Atlas logs reveals the following error:error=OAuth::Problem message=timestamp_refused token_id=2
Cause
This can be caused by NTP drift on the Terraform Enterprise server. Run timedatectl status
to view the current system time to identify drift. Additionally, verify if the system's NTP daemon is running by checking the value of NTP enabled
/NTP service
in the output of timedatectl status
:
$ timedatectl status
Local time: Wed 2023-04-19 14:51:22 UTC
Universal time: Wed 2023-04-19 14:51:22 UTC
RTC time: Wed 2023-04-19 14:51:22
Time zone: UTC (UTC, +0000)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
Solution:
This can be resolved by syncing the system clock by enabling the system's NTP daemon with timedatectl set-ntp true
.
It is also possible system time on a self-hosted VCS installation could be out of sync as well. Be sure to check system time on TFE and the VCS host if applicable.