Open Mechap opened 1 year ago
@Mechap, thanks for reporting. That is odd. I see that Stack thinks that the URL does not exist but curl
can return the HTTP-header. I do not have experience with networks, but could it be a firewall problem?
It could also be related to my proxy config. I think it uses 0.0.0.0:0 because I didn't set proxy environment variables.
@Mechap, all I can suggest for the moment is (a) to search the issues here for key words. People do have network issues from time to time and the advice they received may help you; and/or (b) post on the Haskell Community. It will likely reach a wider audience than here.
Maybe a duplicate of #5921
I have the same problem, on NixOS. Stack has been unusable for me for a month or so now.
$ stack build
Exception while reading snapshot from https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/11.yaml:
HttpExceptionRequest Request {
host = "raw.githubusercontent.com"
port = 443
secure = True
requestHeaders = [("User-Agent","Haskell pantry package")]
path = "/commercialhaskell/stackage-snapshots/master/lts/17/11.yaml"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
proxySecureMode = ProxySecureWithConnect
}
ConnectionTimeout
Fails like this every time.
curl
can fetch the address https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/11.yaml
just fine.
I just installed the latest from nixpkgs.
$ nix profile install 'nixpkgs/nixos-unstable#stack'
$ stack --version
2.9.1 x86_64 hpack-0.35.1
Can also consistently reproduce the issue with:
... and I stopped trying at that point.
I can't even begin to speculate why, but I fixed the problem by disabling ipv6 on my router.
FWIW I encountered this error on a Linux machine on my home network (behind NAT). Once I disabled ipv6 altogether through systemctl, things proceeded normally.
I can't even begin to speculate why, but I fixed the problem by disabling ipv6 on my router.
Just ran into the same issue and the same solution worked for me. I am torn between relief and disgust.
Does anyone know if Network.Socket.getAddrInfo
works with IPv6? Like, if looking for a host name returns ONLY an IPv6 and no IPv4? 🤔
I have a similar error on NixOS:
❯ stack init --resolver nightly -v
2.15.5 x86_64 hpack-0.36.0
2024-06-13 11:37:34.585105: [debug] No project config file found, using defaults.
2024-06-13 11:37:34.592873: [debug] Use of Casa server enabled: (CasaRepoPrefix "https://casa.stackage.org", 1280).
2024-06-13 11:37:34.594989: [debug] (SQL) SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2024-06-12 09:37:34.594962767 UTC]
2024-06-13 11:37:34.595915: [debug] Using resolver: nightly specified on command line
2024-06-13 11:37:34.596001: [debug] Downloading snapshot versions file from https://stackage-haddock.haskell.org/snapshots.json
2024-06-13 11:38:04.629361: [error] HttpExceptionRequest Request {
host = "stackage-haddock.haskell.org"
port = 443
secure = True
requestHeaders = [("Accept","application/json"),("User-Agent","The Haskell Stack")]
path = "/snapshots.json"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
proxySecureMode = ProxySecureWithConnect
}
ConnectionTimeout
IPv6 sounds like a likely culprit.
On NixOS, a workaround is setting this in your config:
networking.enableIPv6 = false;
(Of course that's quite a sledgehammer and you'd typically want to revert this setting soon.)
I am on arch linux and I installed stack through ghcup. However, running stack always resutlts in a connection failure.
Steps to reproduce
Run command
stack update
Expected
It should run without errors.
Actual
Stack version