1

suddenly apt-get update began to fail, while investigating i came across a strange behavior:

$ cat /etc/apt/sources.list
deb http://il.archive.ubuntu.com/ubuntu/ trusty main restricted

$ apt-get update
Ign http://il.archive.ubuntu.com trusty InRelease
Hit http://il.archive.ubuntu.com trusty Release.gpg
Hit http://il.archive.ubuntu.com trusty Release
Hit http://il.archive.ubuntu.com trusty/main amd64 Packages
Hit http://il.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://il.archive.ubuntu.com trusty/main Translation-en
Hit http://il.archive.ubuntu.com trusty/restricted Translation-en
Ign http://il.archive.ubuntu.com trusty/main Translation-en_US
Ign http://il.archive.ubuntu.com trusty/restricted Translation-en_US
Reading package lists... Done

$ sed -i 's/il/us/g' /etc/apt/sources.list
$ cat /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

$ apt-get update
Ign http://us.archive.ubuntu.com trusty InRelease
Get:1 http://us.archive.ubuntu.com trusty Release.gpg [72 B]
Get:2 http://us.archive.ubuntu.com trusty Release [11.9 kB]
Get:3 http://us.archive.ubuntu.com trusty/main amd64 Packages [14 B]
Fetched 12.0 kB in 0s (20.6 kB/s)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'restricted/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

i thought that the prefix (il or us) just indicates which cdn of official ubuntu repository to use. can it be that there is a difference between official ubuntu apt repositories?

UPDATE:

i headed to ubuntu source list generator to regenerate the ubuntu source list (without 'restricted' brach), in order to verify whether the urls are correct -- as shown below, the only thing that differs is the regional suffix, which matches the snippet above.

$ curl -s https://repogen.simplylinux.ch/txt/sources_abed64b7b6ab23d5c4ffe668bbe70d3c37144a3a.txt | grep ^deb && curl -s https://repogen.simplylinux.ch/txt/sources_99dc7e2a260ff96dbe49910f005d2ab82862458e.txt | grep ^deb
deb http://il.archive.ubuntu.com/ubuntu/ trusty main 
deb http://us.archive.ubuntu.com/ubuntu/ trusty main 

UPDATE 2:

it is reproducible to me. who should be informed?

UPDATE 3:

here are some more details:

$ dpkg --print-architecture
amd64

$ wget -q -O- http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release | grep 'restricted/binary-amd64/Packages'
$ echo $?
1

$ dig us.archive.ubuntu.com | grep IN
;us.archive.ubuntu.com.     IN  A
us.archive.ubuntu.com.  57  IN  A   91.189.91.15
us.archive.ubuntu.com.  57  IN  A   91.189.91.24
us.archive.ubuntu.com.  57  IN  A   91.189.91.23
us.archive.ubuntu.com.  57  IN  A   91.189.91.13
us.archive.ubuntu.com.  57  IN  A   91.189.91.14
Mr.
  • 415
  • 1
  • 9
  • 21
  • Please [edit] your question and add the output of `dpkg --print-architecture` – A.B. Nov 20 '15 at 17:11
  • And the next one `wget -q -O- http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release | grep 'restricted/binary-amd64/Packages'` – A.B. Nov 20 '15 at 17:15
  • @A.B.: updated accordingly. – Mr. Nov 20 '15 at 17:17
  • Interesting, for `wget -q -O- http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release | grep 'restricted/binary-amd64/Packages'` I have http://paste.ubuntu.com/13369063/ – A.B. Nov 20 '15 at 17:19
  • @A.B.: can you please include the output of your dns resolution by `dig us.archive.ubuntu.com | grep IN` (see above). – Mr. Nov 20 '15 at 17:20
  • http://paste.ubuntu.com/13369179/ – A.B. Nov 20 '15 at 17:23
  • But it changes. – A.B. Nov 20 '15 at 17:25
  • @A.B.: due to [round-robin dns](https://en.wikipedia.org/wiki/Round-robin_DNS), but the ip addresses are about the same. strange. – Mr. Nov 20 '15 at 17:26
  • I have seen a similar problem some days ago. Also Trusty. OP lives in India. – A.B. Nov 20 '15 at 17:28
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/31878/discussion-between-mrroth-and-a-b). – Mr. Nov 20 '15 at 17:28

1 Answers1

0

https://askubuntu.com/a/37754 solved my issue. enclosed a short snippet from the original answer:

on the top in your /etc/apt/sources.list file should be all that is needed to make it automatically pick a mirror for you based on your geographical location.

deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
Mr.
  • 415
  • 1
  • 9
  • 21