# Pkg: unable to connect to sa.pkg.julialang.org

**URL:** <https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278>\
**Category:** General Usage\
**Created:** [December 5, 2022, 8:19pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278 "2022-12-05T20:19:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Post date:** [December 5, 2022, 8:19pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/1 "2022-12-05T20:19:05Z")

</div>

Cheers,

I’m having this issue under Julia 1.8.2. A clean Julia install has not been able to solve it.

```julia
(@v1.8) pkg> up
┌ Warning: could not download https://pkg.julialang.org/registries
│ exception = HTTP/2 301 (Failed to connect to sa.pkg.julialang.org port 443 after 27 ms: Connection refused) while requesting https://pkg.julialang.org/registries
└ @ Pkg.Registry /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/Pkg/src/Registry/Registry.jl:68
    Updating registry at `~/.julia/registries/General`
Unhandled Task ERROR: IOError: FDWatcher: bad file descriptor (EBADF)
Stacktrace:
 [1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
   @ Base ./task.jl:871
 [2] wait()
   @ Base ./task.jl:931
 [3] wait(c::Base.GenericCondition{Base.Threads.SpinLock})
   @ Base ./condition.jl:124
 [4] _wait(fdw::FileWatching._FDWatcher, mask::FileWatching.FDEvent)
   @ FileWatching ~/packages/julias/julia-1.8/share/julia/stdlib/v1.8/FileWatching/src/FileWatching.jl:535
 [5] wait(fdw::FileWatching.FDWatcher)
   @ FileWatching ~/packages/julias/julia-1.8/share/julia/stdlib/v1.8/FileWatching/src/FileWatching.jl:563
 [6] macro expansion
   @ ~/packages/julias/julia-1.8/share/julia/stdlib/v1.8/Downloads/src/Curl/Multi.jl:166 [inlined]
 [7] (::Downloads.Curl.var"#40#46"{Int32, FileWatching.FDWatcher, Downloads.Curl.Multi})()
   @ Downloads.Curl ./task.jl:484
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `~/.julia/environments/v1.8/Project.toml`
  No Changes to `~/.julia/environments/v1.8/Manifest.toml`
[ Info: We haven't cleaned this depot up for a bit, running Pkg.gc()...
      Active manifest files: 1 found
      Active artifact files: 0 found
      Active scratchspaces: 0 found
     Deleted no artifacts, repos, packages or scratchspaces

(@v1.8) pkg>

```

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 5, 2022, 8:27pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/2 "2022-12-05T20:27:02Z")

</div>

Are you able to download `https://pkg.julialang.org/registries` in the browser or using `curl` on the command line, e.g. with `curl -L https://pkg.julialang.org/registries`.

---

<div class="post-metadata">

**Author:** ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Post date:** [December 5, 2022, 8:49pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/3 "2022-12-05T20:49:29Z")

</div>

No, I can’t. By the way, issue is being observed since last Sunday on three different computers, each one under very distinct network installation.

```julia
(base) ciro@pc-ciro:~$ curl -L https://pkg.julialang.org/registries
curl: (7) Failed to connect to sa.pkg.julialang.org port 443: Connection refused
(base) ciro@pc-ciro:~$

```

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 5, 2022, 8:57pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/4 "2022-12-05T20:57:18Z")

</div>

Confirmed that [sa.pkg.julialang.org](http://sa.pkg.julialang.org) is not allowing connections. I’ve moved this to a new topic since it’s an unrelated issue. That server may be having issues.

---

<div class="post-metadata">

**Author:** ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Post date:** [December 5, 2022, 10:05pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/5 "2022-12-05T22:05:03Z")

</div>

Server is back. Thanks.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 6, 2022, 3:26am UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/6 "2022-12-06T03:26:53Z")

</div>

Yep, I pinged @staticfloat and he fixed it. Full disk. Thanks for the report!

---

<div class="post-metadata">

**Author:** ![Cloves\_Almeida](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cloves_almeida/32/22785_2.png) [@Cloves\_Almeida](https://discourse.julialang.org/u/Cloves_Almeida)\
**Post date:** [March 8, 2023, 5:20pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/7 "2023-03-08T17:20:22Z")

</div>

Just to let know [sa.pkg.julialang.org](http://sa.pkg.julialang.org) seems to be dead again. @staticfloat

```julia
(@v1.9) pkg> up Revise
┌ Warning: could not download https://pkg.julialang.org/registries
│ exception = RequestError: HTTP/2 301 (Could not resolve host: sa.pkg.julialang.org) while requesting https://pkg.julialang.org/registries

```

Looks like DNS issue. Output from `dig`

```julia
➜ dig sa.pkg.julialang.org

; <<>> DiG 9.16.1-Ubuntu <<>> sa.pkg.julialang.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 58241
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;sa.pkg.julialang.org. IN A

;; Query time: 1630 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Mar 08 14:19:53 -03 2023
;; MSG SIZE rcvd: 49

```

---

<div class="post-metadata">

**Author:** ![ogoid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ogoid/32/30218_2.png) [@ogoid](https://discourse.julialang.org/u/ogoid)\
**Post date:** [March 12, 2023, 11:00pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/8 "2023-03-12T23:00:22Z")

</div>

I’m having the same issue right now. Seems to be only with [sa.pkg.julialang.org](http://sa.pkg.julialang.org); other domains, like [us-west.pkg.julialang.org](http://us-west.pkg.julialang.org), are working fine.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [March 13, 2023, 3:35am UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/9 "2023-03-13T03:35:16Z")

</div>

@staticfloat ^

---

<div class="post-metadata">

**Author:** ![staticfloat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/staticfloat/32/34_2.png) [@staticfloat](https://discourse.julialang.org/u/staticfloat)\
**Post date:** [March 13, 2023, 7:47pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/10 "2023-03-13T19:47:16Z")

</div>

Hmmm, I’m not having the issue. When you have this issue, can you please show the output of the following:

```julia
$ dig @1.1.1.1 sa.pkg.julialang.org
$ curl -vL https://sa.pkg.julialang.org/meta

```

---

<div class="post-metadata">

**Author:** ![ogoid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ogoid/32/30218_2.png) [@ogoid](https://discourse.julialang.org/u/ogoid)\
**Post date:** [April 22, 2023, 1:30pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/11 "2023-04-22T13:30:17Z")

</div>

@staticfloat, sorry for the long delay. I just saw your reply today, as I came back because I’m having the same issue again.

```julia
user@hostname ~ [60]> dig @1.1.1.1 sa.pkg.julialang.org

; <<>> DiG 9.18.13 <<>> @1.1.1.1 sa.pkg.julialang.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17250
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;sa.pkg.julialang.org. IN	A

;; ANSWER SECTION:
sa.pkg.julialang.org.	1799	IN	CNAME	pkgserver-sa.ip.cflo.at.
pkgserver-sa.ip.cflo.at. 3600	IN	A	15.228.68.108

;; Query time: 380 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Sat Apr 22 10:27:35 -03 2023
;; MSG SIZE rcvd: 102

user@hostname ~> curl -vL https://sa.pkg.julialang.org/meta
* Trying 52.90.48.121:443...
* Connected to sa.pkg.julialang.org (52.90.48.121) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: none
* CApath: /var/cache/ca-certs/anchors
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES256-GCM-SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: CN=us-east.pkg.julialang.org
* start date: Mar 5 16:17:08 2023 GMT
* expire date: Jun 3 16:17:07 2023 GMT
* subjectAltName does not match sa.pkg.julialang.org
* SSL: no alternative certificate subject name matches target host name 'sa.pkg.julialang.org'
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, close notify (256):
curl: (60) SSL: no alternative certificate subject name matches target host name 'sa.pkg.julialang.org'
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

```

For some reason curl is not resolving the domain to the same server? My system/router resolver seems to be pointing to the correct address:

```julia
user@hostname ~> nslookup sa.pkg.julialang.org
Server: 192.168.15.1
Address:	192.168.15.1#53

Non-authoritative answer:
sa.pkg.julialang.org	canonical name = pkgserver-sa.ip.cflo.at.
Name:	pkgserver-sa.ip.cflo.at
Address: 15.228.68.108

```

---

<div class="post-metadata">

**Author:** ![staticfloat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/staticfloat/32/34_2.png) [@staticfloat](https://discourse.julialang.org/u/staticfloat)\
**Post date:** [April 22, 2023, 4:34pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/12 "2023-04-22T16:34:37Z")

</div>

Are you certain you haven’t done something like overridden the resolver in /etc/hosts or similar?

---

<div class="post-metadata">

**Author:** ![ogoid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ogoid/32/30218_2.png) [@ogoid](https://discourse.julialang.org/u/ogoid)\
**Post date:** [April 22, 2023, 5:48pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278/13 "2023-04-22T17:48:25Z")

</div>

Oh, yeah! This is the old address I’ve set in /etc/hosts previously when the domain was failing to resolve. Removing the line fixed the issue.

Sorry for disturbing you.
