Cabal can't open a TCP connection

Dear ghc-devs Cabal can't open a TCP connection from my Linux box. It used to work fine. Here's what it says: cabal -v3 update Downloading the latest package list from hackage.haskell.org Sending: GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1 User-Agent: cabal-install/1.16.0.2 Host: hackage.haskell.org proxy uri host: , port: Creating new connection to cabal: openTCPConnection: host lookup failure for "" simonpj@cam-05-unx:~/code/HEAD$ cabal --version cabal-install version 1.16.0.2 using version 1.16.0.3 of the Cabal library simonpj@cam-05-unx:~/code/HEAD$ Can anyone help me work out what to do? git works just fine, so the internet is connected all right. Thanks Simon

On 2014-05-08 at 14:03:22 +0200, Simon Peyton Jones wrote:
Dear ghc-devs Cabal can't open a TCP connection from my Linux box. It used to work fine. Here's what it says:
[...]
proxy uri host: , port: Creating new connection to cabal: openTCPConnection: host lookup failure for ""
my best guess: your proxy settings seem off

| my best guess: your proxy settings seem off I think that's a good guess. On this machine we used to have to use a proxy (so $http_proxy had a URL in it), but now we don't (so $http_proxy is empty). Maybe that's confusing Cabal. On a machine that doesn't need to use a proxy server, what should $http_proxy be set to? Simon | -----Original Message----- | From: Herbert Valerio Riedel [mailto:hvriedel@gmail.com] | Sent: 08 May 2014 13:41 | To: Simon Peyton Jones | Cc: ghc-devs@haskell.org; Simon Marlow | Subject: Re: Cabal can't open a TCP connection | | On 2014-05-08 at 14:03:22 +0200, Simon Peyton Jones wrote: | > Dear ghc-devs | > Cabal can't open a TCP connection from my Linux box. It used to work | fine. Here's what it says: | | [...] | | > proxy uri host: , port: | > Creating new connection to | > cabal: openTCPConnection: host lookup failure for "" | | my best guess: your proxy settings seem off

On Thu, May 8, 2014 at 8:22 PM, Simon Peyton Jones
On a machine that doesn't need to use a proxy server, what should $http_proxy be set to?
It's a Maybe (Maybe String) problem. Blame Cabal for not ignoring an empty http_proxy. The *nix programs I've tried treat empty as unset. The solution is: unset HTTP_PROXY. -- Kim-Ee

Spot on, Kim-Ee. Thanks. unsetting http_proxy fixed it.
I’m fwding to cabal-devel: it would be great that if “http_proxy” was set to “”, then it behaved just as if it was un-set. The current behaviour is very confusing (to me anyway).
Simon
From: Kim-Ee Yeoh [mailto:ky3@atamo.com]
Sent: 08 May 2014 14:48
To: Simon Peyton Jones
Cc: Herbert Valerio Riedel; Simon Marlow; ghc-devs@haskell.org
Subject: Re: Cabal can't open a TCP connection
On Thu, May 8, 2014 at 8:22 PM, Simon Peyton Jones

I think this fix would belong in the HTTP library. I've opened https://github.com/haskell/HTTP/issues/66 - the only argument against making the change I can see is that it might not be consistent with other tools, but that doesn't seem to be the case. If noone has an opposing view I'll probably implement it soon. On 08/05/2014 17:20, Simon Peyton Jones wrote:
Spot on, Kim-Ee. Thanks. unsetting http_proxy fixed it.
I’m fwding to cabal-devel: it would be great that if “http_proxy” was set to “”, then it behaved just as if it was un-set. The current behaviour is very confusing (to me anyway).
Simon
*From:*Kim-Ee Yeoh [mailto:ky3@atamo.com] *Sent:* 08 May 2014 14:48 *To:* Simon Peyton Jones *Cc:* Herbert Valerio Riedel; Simon Marlow; ghc-devs@haskell.org *Subject:* Re: Cabal can't open a TCP connection
On Thu, May 8, 2014 at 8:22 PM, Simon Peyton Jones
mailto:simonpj@microsoft.com> wrote: On a machine that doesn't need to use a proxy server, what should $http_proxy be set to?
It's a Maybe (Maybe String) problem. Blame Cabal for not ignoring an empty http_proxy. The *nix programs I've tried treat empty as unset.
The solution is: unset HTTP_PROXY.
-- Kim-Ee
------------------------------------------------------------------------
*Från: *Simon Peyton Jones mailto:simonpj@microsoft.com *Skickat: *2014-05-08 14:04 *Till: *ghc-devs@haskell.org mailto:ghc-devs@haskell.org *Kopia: *Simon Marlow mailto:marlowsd@gmail.com *Ämne: *Cabal can't open a TCP connection
Dear ghc-devs
Cabal can’t open a TCP connection from my Linux box. It used to work fine. Here’s what it says:
cabal -v3 update
Downloading the latest package list from hackage.haskell.org
Sending:
GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1
User-Agent: cabal-install/1.16.0.2
Host: hackage.haskell.org
proxy uri host: , port:
Creating new connection to
cabal: openTCPConnection: host lookup failure for ""
simonpj@cam-05-unx:~/code/HEAD$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library
simonpj@cam-05-unx:~/code/HEAD$
Can anyone help me work out what to do? git works just fine, so the internet is connected all right.
Thanks
Simon
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (4)
-
Ganesh Sittampalam
-
Herbert Valerio Riedel
-
Kim-Ee Yeoh
-
Simon Peyton Jones