Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I run:

echo $http_proxy

It output:


But when I run:


It output:

Caching =>
Conectando a||:80... Closed fd 3
falló: Expiró el tiempo de conexión.
Releasing 0x088293a8 (new refcount 1).

--2010-07-07 19:40:00--  (intento: 2)
Found in host_name_addresses_map (0x88293a8)
Conectando a||:80...

In English:

Caching =>
conecting to||:80... Closed fd 3
fail: conection time has expired.
Releasing 0x088293a8 (new refcount 1).

What I am doing wrong?

NOTE: the https_proxy and ftp_proxy have the same value. And I already try to modify /etc/wgetrc and reinit without success.

share|improve this question
Can you elucidate what's in the [...] error there? Are you seeing [proxyhost|ip_address|:port], as expected with $http_proxy set correctly? Could you share an obfuscated version of wget --debug – medina Jul 7 '10 at 21:07
ok, but it's Spanish – damian Jul 7 '10 at 21:42
up vote 1 down vote accepted

Thanks for the debug logs.

So you're clearly not using up the env proxy settings you expect based on that output.

See for some alternate methods of configuring the proxy settings.

It's not clear if you're in some kind of controlled environment, but it's also possible that the wget you're calling has been modified in some how -- perhaps there's a wrapper script that's stripping out the environment or disabling the proxy settings from being used (--no-proxy). Does file $(which wget) show it's an executable?

share|improve this answer
file $(which wget) outputs: /usr/bin/wget: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped – damian Jul 8 '10 at 13:30

Is this Ubuntu? See the workaround at .

Also, you might need to set 'proxy = on' in your .wgetrc , in addition to setting the http_proxy environment variable. I think that is vaguely suggested at .

share|improve this answer

Also, try to set $HTTP_PROXY instead.

share|improve this answer

Did you define http_proxy in /etc/wgetrc or ~/.wgetrc? Wget doesn't seem to read the environment variable, but it worked for me when I defined it in one of those files.

EDIT: I don't need to modify wgetrc if I set http_proxy in ~/.bashrc and remove no_proxy from /etc/environment.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.