RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 598988 - Download through httpproxy will fail if package is not cached
Summary: Download through httpproxy will fail if package is not cached
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: Miroslav Vadkerti
URL:
Whiteboard:
: 612727 (view as bug list)
Depends On:
Blocks: 519840 582655 599016
TreeView+ depends on / blocked
 
Reported: 2010-06-02 13:43 UTC by Šimon Lukašík
Modified: 2018-10-27 10:42 UTC (History)
4 users (show)

Fixed In Version: rpm-4.8.0-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:32:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Šimon Lukašík 2010-06-02 13:43:02 UTC
Description of problem:
Download through httpproxy will fail, if package is not cached. See steps for more info.

Version-Release number of selected component (if applicable):
rpm-4.8.0-8.el6
curl-7.19.7-14.el6

How reproducible:
Sometimes.
Reproducible against http://download.devel.redhat.com/ but not against EPEL repo.

Steps to Reproduce:
1. # Take some http proxy and repository
2. # Try to source non-cached package
rpm -ivh --httpproxy squid.redhat.com --htppport 3128 http://download.devel.redhat.com/released/RHEL-5-Server/U4/i386/os/Server/Deployment_Guide-si-LK-5.2-11.noarch.rpm 
# Download will fail
3. # Cache the package
curl -x squid.redhat.com:3128 http://download.devel.redhat.com/released/RHEL-5-Server/U4/i386/os/Server/Deployment_Guide-si-LK-5.2-11.noarch.rpm > /dev/null
4. #repeat step 2. and download will be successful.
  
Actual results:
Retrieving http://download.devel.redhat.com/released/RHEL-5-Server/U4/i386/os/Server/Deployment_Guide-si-LK-5.2-11.noarch.rpm
curl: (52) Empty reply from server
error: skipping http://download.devel.redhat.com/released/RHEL-5-Server/U4/i386/os/Server/Deployment_Guide-si-LK-5.2-11.noarch.rpm - transfer failed

Expected results:
Download through httpproxy should work.

Additional info:
This behaviour is regression.
On rhel5.5 with rpm-4.4.2.3-18.el5, curl-7.15.5-2.1.el5_3.5 download works as expected.
On fedora12 with rpm-4.7.2-1.fc12, curl-7.19.7-9.fc12 download fails.

Comment 2 RHEL Program Management 2010-06-02 19:05:20 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Panu Matilainen 2010-06-03 09:21:08 UTC
rpm 4.4.x didn't use curl but rpm's internal networking code. And rpm >= 4.6.x simply calls out to curl, so if "curl <something>" from command line works, it should work with rpm too. If it doesn't...

Rpm by default calls curl with the following opts:
--silent --show-error --fail --location 

One of those (--fail looks likely) causes curl to give up where it doesn't when you call it from the command line. Notice the "curl: (52) Empty reply from server" error from curl, maybe the proxy is reporting something funny here when referring to an internal address.

Comment 4 Šimon Lukašík 2010-06-03 09:47:54 UTC
Hi Panu,

I understand, but weird thing is: If I try to add these options to curl in command line, it will download that file. While rpm is failing to do that.

Even If I force curl to use http/1.0 while talking to proxy, it will download desired file.

Another thing I do not understand, is while it's ok for rpm to communicate with EPEL repo. But it gives up communication with download.devel.redhat.com.

Comment 5 Panu Matilainen 2010-06-03 10:54:18 UTC
Are you running curl as root? Differing environment, such as no_proxy for .redhat.com in your normal account but for root, can affect things...

Comment 6 Šimon Lukašík 2010-06-03 11:20:58 UTC
Yes, I am running curl as root. 

tcpdump verified that curl and rpm are communicating only with proxy.

Comment 7 Panu Matilainen 2010-06-03 13:19:17 UTC
A fair amount of head-scratching later... the bug was as silly as it seemed mysterious: it's an extra trailing \n in the command line which rpm passes down to exec(), with the \n ending up as a part of the url. Which apparently some servers dont mind, some servers do. Doh :)

Comment 8 Panu Matilainen 2010-06-29 06:09:04 UTC
Fixed in rpm-4.8.0-10.el6

Comment 10 Panu Matilainen 2010-07-09 05:13:16 UTC
*** Bug 612727 has been marked as a duplicate of this bug. ***

Comment 13 Miroslav Vadkerti 2010-08-05 14:22:56 UTC
VERIFIED as fixed in rpm-4.8.0-12.el6

Comment 14 releng-rhel@redhat.com 2010-11-10 21:32:16 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.