I am on arch linux and I installed stack through ghcup. However, running stack always results in a connection failure.
stack update --verbose
Version 2.9.1, Git revision 409d56031b4240221d656db09b2ba476fe6bb5b1 x86_64 hpack-0.35.0
2022-12-28 10:20:54.442871: [debug] Checking for project config at: /home/mechap/stack.yaml
2022-12-28 10:20:54.443596: [debug] Checking for project config at: /home/stack.yaml
2022-12-28 10:20:54.443634: [debug] Checking for project config at: /stack.yaml
2022-12-28 10:20:54.443661: [debug] No project config file found, using defaults.
2022-12-28 10:20:54.454144: [debug] (SQL) SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2022-12-27 09:20:54.453673226 UTC]
2022-12-28 10:20:54.456163: [info] Selected mirror https://hackage.haskell.org/
2022-12-28 10:20:54.456258: [info] Downloading root
2022-12-28 10:20:59.463542: [error] HttpExceptionRequest Request {
host = "hackage.haskell.org"
port = 443
secure = True
requestHeaders = [("Accept-Encoding",""),("User-Agent","Haskell pantry package")]
path = "/root.json"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
proxySecureMode = ProxySecureWithConnect
}
(ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just "hackage.haskell.org", service name: Just "443"): does not exist (Try again))
While
curl -I https://hackage.haskell.org:443/root.json
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 4216
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json
Cache-Control: public, no-transform, max-age=60
Content-MD5: MKHLRXfk9A1kOc9X0OA7Jg==
ETag: "30a1cb4577e4f40d6439cf57d0e03b26"
Accept-Ranges: bytes
Date: Wed, 28 Dec 2022 09:24:43 GMT
Via: 1.1 varnish
Age: 0
X-Served-By: cache-cdg20728-CDG
X-Cache: HIT
X-Cache-Hits: 1
X-Timer: S1672219483.965029,VS0,VE459
Vary: Accept-Encoding