This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debian "apt" programs fail through proxy

I have a Linux system behind the Astaro firewall (7.005) using the HTTP proxy in Transparent mode.  Up until last night, it was running Debian Lenny (Test) for AMD64.  Last night I switched to Kubuntu 7.04 for AMD64 (based on Debian, of course).  With both, the apt tools don't work through the proxy.  It took me quite a while to figure out what was going on (at first I thought that the Debian developers broke something!).

When I realized that the proxy was causing it, I tried disabling just about everything in the proxy, and I added the update sites to the list of exceptions.  It doesn't seem to be any particular feature in the proxy, but the proxy itself.  When I disable it, and use a packet filter rule instead, all of the apt tools ("aptitude update", synaptic, etc.) work just fine.

What's odd about the way it breaks is that it doesn't completely fail; some package downloads fail with MD5 checksum errors, sometimes they fail with some error about having the wrong size, and sometimes there are other errors.  Usually, even just an "aptitude update" fails, and even if it works, it takes a VERY long time to work.

For now, I have a workaround, but I don't like it much.  I changed the proxy to be in Standard mode, and set my browsers on the Windows XP and Linux systems to point to the proxy correctly.  Then, I made a rule to allow port 80 traffic from the Linux box so that I can still get the proxy benefits like content filtering and anti-virus checking, but allow my updates to work.

Like I said, I'm not happy about this situation, and I'm hoping that I can get this issue resolved so that the Debian "apt" tools will work through the Astaro HTTP proxy.  I find it hard to believe I'm the only person in the world using Astaro 7.005 with the HTTP proxy with Debian systems behind it.  Maybe I'm screwing something up somewhere.

Any ideas?  Maybe a fix is on the way in a new version of Astaro?


This thread was automatically locked due to age.
Parents
  • Add following line to /etc/apt/apt.conf:

    Acquire::http:[:P]ipeline-Depth "0";
  • Thank you.  That has helped.  Now, it makes it all the way through the "aptitude update", but I end up with this error at the end:

    Fetched 39.9kB in 3s (13.0kB/s)
    Reading package lists... Done
    W: GPG error: http://archive.ubuntu.com feisty-backports Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key 
    W: You may want to run apt-get update to correct these problems

    That error goes away if I disable the HTTP proxy and just use a packet filter rule.
  • Well, it looks like the HTTP proxy cache is causing this error.  I tried turning it off, and it worked great.  So, I did some more research into the apt.conf file, and found a "No-Cache" option for the http control under Acquire.  I set this, turned caching back on in Astaro, and it seems to be working fine.  As a test, I ran Synaptic, search for "kstars", and installed it successfully.  So, my apt.conf file now looks like this:

    Acquire {
         http {
              Pipeline-Depth "0";
         };
         Retries "2";
         No-Cache;
    };
     
    (I threw the "Retries "2"; in there just to help it along, but it's probably not necessary.)

    Thanks again!
  • @Chibana,

    Thanks for your post it helped me!

     I only have Mandriva systems on my network who uses the proxy with no problems. I have no proxy on my DMZ (CentOS boxes). But since a couple days I have that nice little eeePC what uses apt-get. And guess what, yeah no upgrades possible till I read your post.

    For the moment I just disabled the cache and the upgrade are fine.

    In the packet filter logs I saw strange port TCP 8080 wanted to go back from the Astaro box to the eeePC, what isn't allowed [;)]

    Will see if I can hack the apt-get on that eeePC.

    Cheers,
    bt

    btw, your not the only one with this issue [:)]
Reply
  • @Chibana,

    Thanks for your post it helped me!

     I only have Mandriva systems on my network who uses the proxy with no problems. I have no proxy on my DMZ (CentOS boxes). But since a couple days I have that nice little eeePC what uses apt-get. And guess what, yeah no upgrades possible till I read your post.

    For the moment I just disabled the cache and the upgrade are fine.

    In the packet filter logs I saw strange port TCP 8080 wanted to go back from the Astaro box to the eeePC, what isn't allowed [;)]

    Will see if I can hack the apt-get on that eeePC.

    Cheers,
    bt

    btw, your not the only one with this issue [:)]
Children
No Data