Bug 479914

Summary: rpm -ihv http://download.opensuse.org/... - transfer failed - Unknown or unexpected error
Product: [openSUSE] openSUSE.org Reporter: Harald Koenig <koenig>
Component: Download InfrastructureAssignee: Peter Poeml <poeml>
Status: RESOLVED FIXED QA Contact: Adrian Schröter <adrian.schroeter>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Harald Koenig 2009-02-26 13:06:00 UTC
direct installation of RPMs via http-url from download.opensuse.org does not work:

harald > rpm -ihv http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
Retrieving http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
error: skipping http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm - transfer failed - Unknown or unexpected error
warning: u 0x653b70 ctrl 0x6555c0 nrefs != 0 (download.opensuse.org http)


wget with same URL works:

 harald > wget http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
--2009-02-26 13:59:06--  http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
Resolving download.opensuse.org... 195.135.221.130
Connecting to download.opensuse.org|195.135.221.130|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.hosteurope.de/mirror/ftp.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm [following]
--2009-02-26 13:59:06--  http://ftp.hosteurope.de/mirror/ftp.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
Resolving ftp.hosteurope.de... 80.237.136.138
Connecting to ftp.hosteurope.de|80.237.136.138|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 172204 (168K) [application/x-redhat-package-manager]
Saving to: `procmeter-debuginfo-3.4a-188.93.x86_64.rpm'

100%[================================================================================================================================================================================================================================================================================>] 172,204      646K/s   in 0.3s    

2009-02-26 13:59:06 (646 KB/s) - `procmeter-debuginfo-3.4a-188.93.x86_64.rpm' saved [172204/172204]
Comment 1 Peter Poeml 2009-02-26 13:24:09 UTC
Hi Harald, thanks for this bug.

A little background: retrievals by /bin/rpm are not redirected to mirrors,
because of the following peculiarity:

        # rpm has a bug which prevents it from following 302s
        # https://bugzilla.novell.com/show_bug.cgi?id=278729
        # this workaorund helps until this bug is fixed
        MirrorBrainExcludeUserAgent rpm/4.4.2

My rpm version is 4.4.2, and I can thus retrieve the package:

 # rpm -Kv http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm:
    Header V3 RSA/SHA256 signature: NOKEY, key ID 3dbdc284
    Header SHA1 digest: OK (5ca15660e2a71af7c8b49b4729c63cf1cfa56bc9)
    V3 RSA/SHA256 signature: NOKEY, key ID 3dbdc284
    MD5 digest: OK (40677b83715d36578be7eb7a790214a6)

What's your rpm version?
Maybe another one which is broken, but user agent != "rpm/4.4.2".
Comment 2 Peter Poeml 2009-02-26 13:30:34 UTC
Found it in the log, yours is "rpm/4.4.2.3".

I'll make the exclusion rule match on "rpm/4.4.2*", then the workaround
is active for that other rpm version, too.

Done. Before:

 # curl -sI 'http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm' -H "User-agent: rpm/4.4.2.3"
HTTP/1.1 302 Found
Date: Thu, 26 Feb 2009 13:29:02 GMT
Server: Apache/2.2.11 (Linux/SUSE)
X-Prefix: 83.133.0.0/16
X-AS: 13237
X-MirrorBrain-Mirror: ftp.hosteurope.de
X-MirrorBrain-Realm: country
Location: http://ftp.hosteurope.de/mirror/ftp.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm
Content-Type: text/html; charset=iso-8859-1

Now:

 # curl -sI 'http://download.opensuse.org/debug/distribution/11.1/repo/oss/suse/x86_64/procmeter-debuginfo-3.4a-188.93.x86_64.rpm' -H "User-agent: rpm/4.4.2.3"
HTTP/1.1 200 OK
Date: Thu, 26 Feb 2009 13:29:19 GMT
Server: Apache/2.2.11 (Linux/SUSE)
X-Prefix: 83.133.0.0/16
X-AS: 13237
Last-Modified: Wed, 03 Dec 2008 13:00:00 GMT
ETag: "30650e39-2a0ac-45d24058a5400"
Accept-Ranges: bytes
Content-Length: 172204
Content-Type: application/x-rpm