Score:0

apt install with Ubuntu local mirror - Numerous apache 206 error codes and installation fails

in flag

I've configured a ubuntu mirror server using apt-mirror/apache2 on Ubuntu 20.04.

I'm auto installing some machines to deploy a minimal set of the OS, then rely on Ansible to deploy some specific packages.

Installation fails because apt-get cannot get the complete list of packages : some downloads from the local mirror are "tagged" with 206 partial content making the package donwload unsuccessful and thus breaks the deployment of packages through Ansible playbooks.

As an example, here are some 206 error codes from an 'apt-get ubuntu-desktop' :

192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:40 +0100] "GET /mirror/ubuntu/pool/main/libv/libvpx/libvpx6_1.8.2-1build1_amd64.deb HTTP/1.1" 206 46388 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:40 +0100] "GET /mirror/ubuntu/pool/main/g/gnome-keyring/gnome-keyring_3.36.0-1ubuntu1_amd64.deb HTTP/1.1" 206 548240 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:42 +0100] "GET /mirror/ubuntu/pool/main/g/gnome-session/gnome-session-bin_3.36.0-2ubuntu1_amd64.deb HTTP/1.1" 206 51907 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:43 +0100] "GET /mirror/ubuntu/pool/main/libg/libgpod/libgpod4_0.8.3-15_amd64.deb HTTP/1.1" 206 122676 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:45 +0100] "GET /mirror/ubuntu/pool/main/libr/libreoffice/libreoffice-writer_6.4.7-0ubuntu0.20.04.2_amd64.deb HTTP/1.1" 206 1770147 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:46 +0100] "GET /mirror/ubuntu/pool/main/t/thunderbird/thunderbird_91.5.0%2bbuild1-0ubuntu0.20.04.1_amd64.deb HTTP/1.1" 206 2352616 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:47 +0100] "GET /mirror/ubuntu/pool/main/a/aspell/aspell_0.60.8-1ubuntu0.1_amd64.deb HTTP/1.1" 206 1334 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"
192.168.7.200:80 192.168.7.200 - - [04/Mar/2022:09:19:47 +0100] "GET /mirror/ubuntu/pool/main/g/gst-plugins-base1.0/gstreamer1.0-gl_1.16.2-4ubuntu0.1_amd64.deb HTTP/1.1" 206 58778 "-" "Debian APT-HTTP/1.3 (2.0.6) non-interactive"

Ansible errror are like :

E: Failed to fetch http://192.168.7.200/mirror/ubuntu/pool/universe/g/gtkglext/libgtkglext1-dev_1.2.0-9_amd64.deb 

But the file is downloadable when opening the link in web navigator.

Initially, I was deploying 'ubuntu-desktop' and 'build-essential' during the autoinstall step by adding a 'packages:' directive to my user-data, but this problem of partial content error code was braking systematically the autoinstall process.

Any hint really appreciated !

Best regards José

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.