Usage question of mirrors in China

Asked by Jürgen Haas

I'm just about to setup a host in mainland China with Aliyun as the hosting provider. They have configured mirrors.aliyun.com as the mirror repositories by default and this is just OK for all the main Ubuntu packages. But when I have to use additional repositories, e.g. fish, then I run into trouble.

I've configured

deb http://mirrors.aliyun.com/fish-shell/release-2/ubuntu xenial main

as a repository but get the error that "InRelease" is ignored (no reason given) and that "Release" does not have a Release file and is therefore disabled by default.

Are the launchpad mirrors only for Ubuntu as such or should they support all of Launchpad?

If everything should be available, what can I do to make them work?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jürgen Haas
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Do not confuse the Ubuntu mirrors https://launchpad.net/ubuntu/+archivemirrors and the launchpad server for PPAs (personal package archives) like http://ppa.launchpad.net/fish-shell/release-2/ubuntu

Only the Ubuntu packages are replicated to the mirror servers.
The software in the PPAs can only be downloaded from ppa.launchpad.net

Revision history for this message
Jürgen Haas (juergen-1) said :
#2

Thanks, that's what I thought. But when I use the ppa.launchpad.net domain, I get this error when doing an apt update:

```
Err:5 http://ppa.launchpad.net/fish-shell/release-2/ubuntu xenial/main amd64 Packages
  403 Forbidden [IP: 112.124.140.210 80]
```

That looks like ppa.launchpad.net denies access to my request, right? Any way around that?

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

That looks a bit strange.

As far as I can check on the internet, the IP address 112.124.140.210 is belonging to mirrors.aliyun.com or cn.archive.ubuntu.com but is not the address of ppa.launchpad.net (would probably be 91.189.95.83)

Can you check for strange entries in the /etc/hosts file or ask your provider whether there is some (possibly wrong) rerouting in place?

Revision history for this message
Jürgen Haas (juergen-1) said :
#4

Well, that's why I thought the request is blocked by launchpad: the IP 112.124.140.210 is probably where the request is coming from and launchpad seems to respond with the 403 Forbidden event.

When I resolve ppa.launchpad.net on that host I do indeed get 91.189.95.83, so the routing is OK.

The traceroute is going through a couple of Chinese hops, then to San Jose, London and finally to makara.canonical.com and some more that don't show their footprint in detail.

The hosts file contains localhost entries only, so nothing suspicious there.

The hosts.deny is also clean, so I'm running out of ideas here.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Is this "Err:5 http://ppa.launchpad.net/... 403 Forbidden [IP: 112.124.140.210 80]"
consistently repeating if you try again?

What do you get if you try opening http://ppa.launchpad.net/fish-shell/release-2/ubuntu/dists/xenial/main/binary-amd64/Release in a web browser, or try
curl http://ppa.launchpad.net/fish-shell/release-2/ubuntu/dists/xenial/main/binary-amd64/Release

Revision history for this message
Jürgen Haas (juergen-1) said :
#6

Yes, the error is consistent when retrying to apt-get update the repositories. Just the IP changes eventually, but it remains within the pool of Aliyun addresses.

When using curl, I'm getting a proper response:

Archive: xenial
Version: 16.04
Component: main
Origin: LP-PPA-fish-shell-release-2
Label: Fish shell - 2.x release series
Architecture: amd64

Revision history for this message
Jürgen Haas (juergen-1) said :
#7

Found it! They have configured a proxy for apt and that way they can filter everything that's going through apt:

Acquire::http::Proxy "http://mirrors.aliyun.com/";

I've removed that and now I can also access ppa.launchpad.net and install packages from there.

Revision history for this message
Colin Watson (cjwatson) said :
#8

You could also do something like this to make exceptions from the general proxy rule, rather than removing it outright (whether this makes sense depends on your situation):

  Acquire::http::Proxy::ppa.launchpad.net "DIRECT";

Revision history for this message
Jürgen Haas (juergen-1) said :
#9

Yeah, that's what I did, also for other sources like packagecloud.io for example.