Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal fails to update or install packages #2499

Closed
svalaskevicius opened this issue Mar 27, 2015 · 7 comments
Closed

cabal fails to update or install packages #2499

svalaskevicius opened this issue Mar 27, 2015 · 7 comments

Comments

@svalaskevicius
Copy link

it fails to download some of the requirements:

Notice: installing into a sandbox located at
/Users/svalaskevicius/priv/dev/hob/.cabal-sandbox
Ready to install entropy-0.3.6
Downloading entropy-0.3.6...
Sending:
GET /packages/archive/entropy/0.3.6/entropy-0.3.6.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.22.2.0 (osx; x86_64)

Creating new connection to hackage.haskell.org
Waiting for install task to finish...
Received:
HTTP/1.1 400 Bad Request
Server: nginx/1.6.2
Content-Type: text/html
Content-Length: 172
Accept-Ranges: bytes
Date: Fri, 27 Mar 2015 11:20:59 GMT
Via: 1.1 varnish
Connection: close
X-Served-By: cache-fra1246-FRA
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1427455259.417105,VS0,VE135

cabal update failed as well:

 ~/p/d/hob custom-editor:! [11:22]> cabal update -v3
Using a sandbox located at /Users/svalaskevicius/priv/dev/hob/.cabal-sandbox
Downloading the latest package list from hackage.haskell.org
Sending:
GET /packages/archive/00-index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.22.2.0 (osx; x86_64)
If-None-Match: "c01284a433519e1ea88c616cae9e6eb3"

Creating new connection to hackage.haskell.org
Received:
HTTP/1.1 400 Bad Request
Server: nginx/1.6.2
Content-Type: text/html
Content-Length: 172
Accept-Ranges: bytes
Date: Fri, 27 Mar 2015 11:22:45 GMT
Via: 1.1 varnish
Connection: close
X-Served-By: cache-ams4145-AMS
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1427455365.262740,VS0,VE244

cabal: Failed to download
http://hackage.haskell.org/packages/archive/00-index.tar.gz : ErrorMisc "Error
HTTP code: 400"

Downloading the file manually works ok.

Sorry if this is not correct place to report the issue, if thats the case, please can you let me know where should I report it instead?

Thanks!

@23Skidoo
Copy link
Member

Most likely some configuration problem on your end or a bug in the HTTP library.

Try compiling and running this test program. If it fails, then this is not a Cabal issue.

Related: #2035.

@svalaskevicius
Copy link
Author

yes, it does fail too:

 ~/tmp [15:59]> ./Test2035
Trying to download http://hackage.haskell.org/packages/archive/00-index.tar.gz
Sending:
GET /packages/archive/00-index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.18.0.5


Creating new connection to hackage.haskell.org
Received:
HTTP/1.1 400 Bad Request
Server: nginx/1.6.2
Content-Type: text/html
Content-Length: 172
Accept-Ranges: bytes
Date: Sat, 28 Mar 2015 15:59:28 GMT
Via: 1.1 varnish
Connection: close
X-Served-By: cache-lcy1128-LCY
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1427558367.919172,VS0,VE230


Test2035: Error HTTP code: 400

could you maybe help in redirecting the report to the interested parties? (should I raise an issue in https://github.com/haskell/HTTP ? )

Thanks,
Sarunas

@svalaskevicius
Copy link
Author

the system call trace:

write(0x3, "GET /packages/archive/00-index.t\0", 0x20)       = 32 0
write(0x3, "ar.gz HTTP/1.1\r\nHost: hackage.haskell.org\r\nUser-Agent: cabal-ins\0", 0x40)       = 64 0
write(0x3, "tall/1.18.0.5\r\n\r\n\0", 0x11)      = 17 0
read(0x3, "\0", 0x7FF0)      = -1 Err#35

<wait for return>

read(0x3, "HTTP/1.1 400 Bad Request\r\nServer: nginx/1.6.2\r\nContent-Type: text/html\r\nContent-Length: 172\r\nAccept-Ranges: bytes\r\nDate: Sat, 28 Mar 2015 17:35:43 GMT\r\nVia: 1.1                    varnish\r\nConnection: close\r\nX-Served-By: cache-ord1720-ORD\r\nX-Cache: MISS\r\nX-Cache-Hits: 0\r\nX-T", 0x7FF0)       = 293 0

@svalaskevicius
Copy link
Author

also, the same in nc works ok:

printf "GET /packages/archive/00-index.tar.gz HTTP/1.1\r\nHost: hackage.haskell.org\r\nUser-Agent: cabal-install/1.18.0.5\r\n\r\n" | nc hackage.haskell.org 80
HTTP/1.1 301 Moved Permanently
...

could it be because of the different syscalls to send the request (in several parts)?

@23Skidoo
Copy link
Member

@svalaskevicius

(should I raise an issue in https://github.com/haskell/HTTP ? )

Yes, please do. Closing, since this is not a Cabal bug.

@svalaskevicius
Copy link
Author

interestingly enough, it started working a few minutes/hours ago.. maybe there was something wrong with the hackage server?

thanks for your help!

@ravshanof
Copy link

any updates on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants