Why does wget fail with "503 Service Unavailable" Error?

39,137

Solution 1

If the remote site doesn't accept proxies, you can use wget with --no-proxy in order to skip going through proxy. For example you are wgetting some remote file, the syntax would be:

wget --no-proxy <path of remote file>

Solution 2

You seem to have a proxy configured, which wget is attempting to connect through, but which is not available, and so the web server running on that address, is returning an HTTP 503 error response. You should contact the admin of that site, or disable the use of a proxy.

Share:
39,137

Related videos on Youtube

Jörn
Author by

Jörn

Updated on September 18, 2022

Comments

  • Jörn
    Jörn over 1 year

    I've upgraded from Ubuntu 10.04 to 12.04. Now for some files wget keeps on failing with a 503 Service Unavailable Error:

    $ wget http://repo.maven.apache.org/maven2/org/mortbay/jetty/maven-jetty-plugin/6.1.14/maven-jetty-plugin-6.1.14.jar
    --2013-04-20 01:28:44--  http://repo.maven.apache.org/maven2/org/mortbay/jetty/maven-jetty-plugin/6.1.14/maven-jetty-plugin-6.1.14.jar
    Resolving www-9z.dienste.t-systems.com (www-9z.dienste.t-systems.com)... 10.36.1.55
    Connecting to www-9z.dienste.t-systems.com (www-9z.dienste.t-systems.com)|10.36.1.55|:80... connected.
    Proxy request sent, awaiting response... 503 Service Unavailable
    2013-04-20 01:29:14 ERROR 503: Service Unavailable.
    

    However, this doesn't seem to be a general problem. For instance, wgetting google.com works fine:

    $ wget http://www.google.com
    --2013-04-20 01:35:38--  http://www.google.com/
    Resolving www-9z.dienste.t-systems.com (www-9z.dienste.t-systems.com)... 10.36.1.55
    Connecting to www-9z.dienste.t-systems.com (www-9z.dienste.t-systems.com)|10.36.1.55|:80... connected.
    Proxy request sent, awaiting response... 302 Found
    Location: http://www.google.de/ [following]
    --2013-04-20 01:35:38--  http://www.google.de/
    Reusing existing connection to www-9z.dienste.t-systems.com:80.
    Proxy request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
    Saving to: `index.html.2'
    
        [ <=>   ] 10,882      --.-K/s   in 0.02s
    
    2013-04-20 01:35:38 (524 KB/s) - `index.html.2' saved [10882]
    

    Any ideas?


    Solved! dobey was right - it was a problem with the proxy. I configured a different (correct) proxy and everything worked fine (for wget you can configure this either globally in /etc/wgetrc or individually in ~/.wgetrc with http_proxy = http://proxyhost:port/).

    The issue had nothing to do with Ubuntu or wget.

  • Jörn
    Jörn about 11 years
    I can wget google.com fine, so I don't think I have a general proxy problem.
  • dobey
    dobey about 11 years
    Perhaps the other site is blocked by the proxy then. I can't tell you for sure. You'll have to talk to the admin of the proxy you are using to resolve the problem, as the error is coming from there, and hasn't anything to do with the local wget, other than the fact that it's reporting the error to you as well.