Ubuntu – error 503: service unavailable when using apt-get update behind proxy

aptPROXY

I am using a transparent proxy (other box). When I try to do an 'apt-get update' I get these warnings (in german):

...

W: Fehlschlag beim Holen von http://security.ubuntu.com/ubuntu/dists/maverick-security/restricted/source/Sources.gz  503  Service Unavailable

W: Fehlschlag beim Holen von http://security.ubuntu.com/ubuntu/dists/maverick-security/universe/source/Sources.gz  503  Service Unavailable

W: Fehlschlag beim Holen von http://security.ubuntu.com/ubuntu/dists/maverick-security/multiverse/source/Sources.gz  503  Service Unavailable

W: Fehlschlag beim Holen von http://security.ubuntu.com/ubuntu/dists/maverick-security/main/binary-i386/Packages.gz  503  Service Unavailable

W: Fehlschlag beim Holen von http://security.ubuntu.com/ubuntu/dists/maverick-security/restricted/binary-i386/Packages.gz  503  Service Unavailable

W: Fehlschlag beim Holen von http://security.ubuntu.com/ubuntu/dists/maverick-security/universe/binary-i386/Packages.gz  503  Service Unavailable

E: Einige Indexdateien konnten nicht heruntergeladen werden, sie wurden ignoriert oder alte an ihrer Stelle benutzt.

I changed ~.bashrc:

http_proxy=http://192.168.120.199:8080
https_proxy=https://192.168.120:8080
export http_proxy
export https_proxy

I wrote on commandline:

export http_proxy=http://proxyusername:proxypassword@proxyaddress:proxyport
sudo apt-get update

And I edited /etc/apt/apt.conf:

Acquire::http::proxy "http://192.168.120.199:8080/";
Acquire::ftp::proxy "http://192.168.120.199:8080/";

Nothing has worked.

Does anyone knows how to make apt-get working through a transparent proxy?

Regards,

ubuntu2man

Best Answer

I don't think that you can do anything with this on your box. 503 is the answer from the proxy. If you were sure, it's the good proxy what you set (192.168.120.199:8080) then it's not your problem, but the administrator's of the proxy. If it's you, then it's another question but then you need to ask about the proxy, what kind of proxy software it is, and so on. This is the case, if you are very sure you set up things well. However you wrote: export http_proxy=http://proxyusername:proxypassword@proxyaddress:proxyport Now I am totally confused, do you need password based authentication? If no, why did you wrote username/password there? And what was "proxyaddress:proxyport, the same as you wrote about before, 192.168.120.199:8080?

If I were you, I would kill all of these modifications in files you mentioned, and I would try only to set up http_proxy and etc parameters. When it works, you have time to modify things if you don't want to set up manually each time. So, revert those modifications, and type only this:

http_proxy=http://192.168.120.199:8080

export http_proxy

apt-get update

It will work, if your proxy is really 192.168.120.199 on port 8080 and it really does not need authentication, and your proxy administrator granted some kind of access to your machine or not rejecting it.

Also please note that what you wrote about is not a transparent proxy. Transparent proxy is something what you don't even need to set up, since the outgoing traffic is automatically "grabbed" and redirected to force through the proxy (that's why it's "transparent": you don't even need to specify it). What you have to set manually: that's not a transparent proxy.