commercialhaskell / commercialhaskell/stack
"ConnectionTimeout" when attempting to run stack setup on WSL 2
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### General summary/comments (optional)
There seems to be some issue with setting up Stack on the new WSL 2 (as far as I'm aware WSL 1 doesn't suffer from the same issue). Thinking it may have something to do with Hyper-V's NAT but I'm not sure. `wget https://s3.amazonaws.com/haddock.stackage.org/snapshots.json` seems to work fine (the JSON is downloaded successfully) so I'm not sure where the error in Stack is coming in
### Steps to reproduce
1. Start a WSL 2 distro instance
2. Install stack using the official binary and then run `stack setup`
### Expected
The GHC is installed and ready to go
### Actual
```
$ stack setup --verbose
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
2019-10-23 17:57:56.404263: [debug] Checking for project config at: /home/fluxe/stack.yaml
2019-10-23 17:57:56.404768: [debug] Checking for project config at: /home/stack.yaml
2019-10-23 17:57:56.405062: [debug] Checking for project config at: /stack.yaml
2019-10-23 17:57:56.405206: [debug] No project config file found, using defaults.
2019-10-23 17:57:56.414073: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-10-22 16:57:56.4140244 UTC]
2019-10-23 17:57:56.414587: [debug] Run from outside a project, using implicit global project config
2019-10-23 17:57:56.414716: [info] Writing implicit global project config file to: /home/fluxe/.stack/global-project/stack.yaml
2019-10-23 17:57:56.414810: [info] Note: You can change the snapshot via the resolver field there.
2019-10-23 17:57:56.415042: [debug] Downloading snapshot versions file from https://s3.amazonaws.com/haddock.stackage.org/snapshots.json
2019-10-23 17:58:26.446965: [error] HttpExceptionRequest Request {
host = "s3.amazonaws.com"
port = 443
secure = True
requestHeaders = [("Accept","application/json"),("User-Agent","The Haskell Stack")]
path = "/haddock.stackage.org/snapshots.json"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
ConnectionTimeout
```
### Stack version
```
$ stack --version
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
```
### Method of installation
* Official binary, downloaded from stackage.org or fpcomplete's package repository
Any ideas on what's going on here?
Contributor guide
Assessment
This issue has not been assessed yet.