-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release file for repository is not valid yet #4114
Comments
What do the following commands return? date What is your Windows timezone? Any interesting errors in sudo dmesg? |
Thanks for the reply!
The only thing that catches my eye in
|
Interesting, not only is the hour wrong, the minutes is way off as well... Thanks, does Ameria/Los_Angeles match your Windows time zone (Pacific)? |
It does indeed! For what it's worth, I was also selfhosting a build with WSL 2 about a month ago (I work at Microsoft 😄), and I encountered the same issue, sorry for not reporting it to the team sooner! |
Can repro. My windows computer is in CET, but WSL2 gives a completely different utc time altho |
This seems to have to do with clock drift. If you shut down wsl and restart, is the problem solved? wsl.exe --shutdown |
That does seem to resolve the issue for now. Running |
Laptop? Did it sleep? Maybe related this. WAG. |
Running into this same issue when running Definitely some clock drift issue as the date command is returning the wrong time. Shutting down WSL2 ( |
Yeah this does seem to be a re-occurring thing for me, running a shutdown is a quick fix though. Feel free to let me know if there's any more data that I can provide! |
You could also try |
apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update will work around it temporarily. |
i am getting below error i dont kow how to fix this i am running on WSL1. any suggestion would be appreciable Get:1 http://deb.debian.org/debian buster InRelease [122 kB] |
I used to have this problem with Docker for Windows. Whenever the machine hibernated, when it came back I had to go to Hyper-v Manager and disable and reenable Time sync, than it would be back to regular time. |
Still happening:
Solution (workaround): Output: Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://packages.cloud.google.com/apt gcsfuse-bionic InRelease
Hit:5 http://packages.cloud.google.com/apt cloud-sdk InRelease
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Reading package lists... Done
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 7h 34min 8s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 7h 35min 30s). Updates for this repository will not be applied.
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 7h 33min 8s). Updates for this repository will not be applied.
|
The big problem with |
This bug has given me HUGE frustration. I'm coming off of two days of hunting a bug. I was trying to interact with Google BigQuery from code running inside a docker container. And I couldn't for the life of me find out why on earth I can't authenticate. For the longest time I thought the problem was introduced during the latest library update. But how the hell am I supposed to think of the possibility that the problem is in fact that during authentication you need a correct clock otherwise during the request of a token you get an error response because a fucked up timer fucks up the expiry mechanism. Two days of my working life gone! Oh the hours I have spent trying to debug the library. fml. How is this stupid bug not fixed a whole year later? I'm sorry for the language, but this has just been so frustrating. |
Guys, please, help! Moreover, I am thinking of returning to WSL1 if that will be possible. OS: Windows 2004 (build 19041.329) Pro. |
A couple of points to add to this:
|
https://github.com/stuartleeks/wsl-clock is quite a clever work around. |
None of the above worked for me, but putting this in my WSL .bashrc is working so far (you have to apt install ntpdate). I run it in the background because it takes 7-10 seconds to run. hth sudo ntpdate ntp.ubuntu.com & |
Worked for me, which we should first |
Confirmed that on Win 10 WSL 2 I had to use the following after hibernation:
Cheers |
I think this is a duplicate of #5324 |
thanks for answer this one worked for me |
Another quick fix:
Working on WSL2, Ubuntu 20.04 LTS. |
Why does WSL ntpd fail upon resuming from hibernation? |
Even better, added to This lost me hours of work last night as I tried to troubleshoot a mysterious auth error from Terraform as it was trying to deploy an Azure Storage Account. Shows up in the form of a "bad authorization header" error message. |
It's not good enough for me. I need to have a cron job that execute it each 5 minutes. Basic things are so complicated when Windows is close by. |
Hi all, I created a script that creates a scheduled task to automatically update the time of WSL when you either restore from sleep or you restore a "Saved" Hyper-V VM.
Change Thanks to all the other comments/suggestions that helped me create this script 😄 . |
I have the same issue on Windows 11 22H2, WSL2, Ubuntu 22.04 while updating packages:
It could be fixed with |
This problem was killing me so a chucked a tantrum and wrote a little daemon for it: I hope you find it useful. |
I guess my question will be then, do we need this daemon or similar in all
will distro?
e.g. lately I had recovery issues after hibernation with docker desktop
(docker and docker-data) and rancher desktop (similar 2 distro).
cheers
Manu
…On Fri, 17 Mar 2023, 11:50 Matt Nourse, ***@***.***> wrote:
This problem was killing me so a chucked a tantrum and wrote a little
daemon for it:
https://github.com/matthewnourse/polite-hwclock-hctosys
I hope you find it useful.
—
Reply to this email directly, view it on GitHub
<#4114 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4R3AGHU5YMHNCAH2LHJJ3W4OKLRANCNFSM4HX2YDZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
/dupe #10006 We're migrating all clock skew issues to a megathread so we can keep the top comment up to date with any updates and work arounds. Thank you for filing this! |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
This might occur when there is another OS dual booted on the computer. For example, there will be a 3-hour clock offset between Ubuntu and Windows dual boot setup. I used the configuration changes recommended by @leon-strong. |
I'm not dual booting. Why do WSL and native Windows have split clocks? |
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If you have a feature request, please post to the UserVoice.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to [email protected]. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".
Please fill out the below information:
Your Windows build number: Microsoft Windows [Version 10.0.18917.1000]
What you're doing and what's happening: Attempting to run a
sudo apt update
within a WSL 2 installation. Seeing thing following error[sudo] password for xander: Hit:1 https://packages.microsoft.com/repos/azure-cli bionic InRelease Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Reading package lists... Done E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 10h 29min 48s). Updates for this repository will not be applied. E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 11h 0min 22s). Updates for this repository will not be applied.
Based on my own searching, I suspect the WSL clock may be falling out of sync with my windows machine? Though trying to cat
/etc/localtime
causes WSL to hangWhat's wrong / what should be happening instead: apt should run an update with no error output
Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).For WSL launch issues, please collect detailed logs.
See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: