Error: Some registries failed to update

Help! Why?

┌ Error: Some registries failed to update:
│     — C:\Users\name\.julia\registries\General.toml — failed to download from https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e. Exception: RequestError: HTTP/1.1 301 Moved Permanently (Recv failure: Connection was reset) while requesting https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e
└ @ Pkg.Registry D:\Software\julia-1.10.3\share\julia\stdlib\v1.10\Pkg\src\Registry\Registry.jl:510

Can you reach that URL from your browser? Can you post the output of curl -LI https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e (or something similar that works in your Windows terminal).

1 Like

Yes I can.

$ curl -LI https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e
HTTP/2 301
server: Varnish
retry-after: 0
location: https://kr.pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e
x-geo-continent: AS
x-geo-country: CN
x-geo-region: HA
accept-ranges: bytes
date: Mon, 13 May 2024 08:40:54 GMT
via: 1.1 varnish
x-served-by: cache-tyo11940-TYO
x-cache: HIT
x-cache-hits: 0
x-timer: S1715589655.757640,VS0,VE1
content-length: 0

HTTP/2 301
server: nginx/1.25.4
date: Mon, 13 May 2024 08:40:55 GMT
content-type: text/html
content-length: 169
location: https://storage.julialang.net/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e.tar.gz

curl: (35) OpenSSL SSL_connect: Connection was reset in connection to storage.julialang.net:443

I have installed a new Julia version (v1.10.3, from v1.9.0) without deleting the original C:\Users\name\.julia folder. Is this the reason?

No, that should not matter. Can you reach the last redirect URL there (https://storage.julialang.net/registry/23338594-aafe-5451-b93e-139f81909106/e8d546e7403e5b6c65432c458789731899ca255e.tar.gz) in the browser?

1 Like

Yes, I can.

语言基础/环境配置 - Roadmap (juliacn.com)

1 Like

It was fine at least until I upgraded the Julia version (not sure if it worked properly after the upgrade), and I wonder what the underlying factors were causing the problem.

It still doesn’t work well even when I retry after deleting the .julia folder.

Thanks, but I’m sorry that I still don’t quite understand what the problem is.

Depending on when you updated Julia, this might be a red herring because the server was also updated recently, see Changes to PkgServers storage backend - #4 by fredrikekre for some more information.

It looks like you can not connect to https://storage.julialang.net. Perhaps you are behind a firewall and/or proxy of some sort that don’t allow it.

This is (almost) never a solution and you should never use this “tool” so lightly since you may have data in there that will be lost.

1 Like

The date I downloaded Julia v1.10.3 is 2024/5/10. The last modification date of the .julia\registries\General.tar.gz and General.toml are both 2024/5/11. I’m sure everything went well at least before 2024/5/10.

But I can connect to the URL from the browser when my proxy is turned on. Is it reasonable?

Thanks for your kind reminder! I just changed the name of the folder .julia temporarily for a test. :handshake: :handshake:

Changing JULIA_PKG_SERVER , does the error become different?

1 Like

Although it’s still unclear why the original URL suddenly lost connection, your solution has brought me an unprecedented experience in using Julia. I can’t thank you any more!

Now I’m just wondering if the mirror site can keep up with the updates of the packages? Is it synchronized with the official Julia website, or is there a delay?

Usually the delay is within 1 day like you can view on the Mirrors (nju.edu.cn) page.

1 Like

Thanks!!!