Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1815440 - Syncing repository with upstream URL "https://elrepo.org/linux/elrepo/el7/x86_64/" gives "406: Not Acceptable" error on Red Hat Satellite 6
Summary: Syncing repository with upstream URL "https://elrepo.org/linux/elrepo/el7/x86...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.6.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Bruno Rocha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-20 09:45 UTC by Naina Jain
Modified: 2023-09-07 22:29 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-01 14:28:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Naina Jain 2020-03-20 09:45:44 UTC
Description of problem:
Syncing repository with upstream URL "https://elrepo.org/linux/elrepo/el7/x86_64/" gives "406: Not Acceptable" error on Red Hat Satellite 6

Version-Release number of selected component (if applicable):
Satellite 6.6.1

How reproducible:
Always

Steps to Reproduce:
1. Navigate to Content --> Products --> Create a Product --> Create a Repository "ELrepo"

2. Set the Repository type "Yum Repositories"

3. Give upstream URL as "https://elrepo.org/linux/elrepo/el7/x86_64/" and save the repository.



Actual results:
Once the repository has been created, When you try to sync, It will show error "Error: RPM1004: Error retrieving metadata: Not Acceptable".


Expected results:
Expect successful synchronization of the repository.


Additional Logs:


Mar 18 08:42:16 satellite.example.com pulp[116607]: requests.packages.urllib3.connectionpool:INFO: [ffbf318d] Starting new HTTPS connection (1): elrepo.org
Mar 18 08:42:17 satellite.example.com pulp[116607]: nectar.downloaders.threaded:INFO: [ffbf318d] Download failed: Download of https://elrepo.org/linux/elrepo/el7/x86_64/ failed with code 406: Not Acceptable
Mar 18 08:42:17 satellite.example.com pulp[116607]: pulp_rpm.plugins.importers.yum.sync:INFO: [ffbf318d] Downloading metadata from https://elrepo.org/linux/elrepo/el7/x86_64/.
Mar 18 08:42:17 satellite.example.com pulp[116607]: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (1): elrepo.org
Mar 18 08:42:17 satellite.example.com pulp[116607]: nectar.downloaders.threaded:INFO: Download failed: Download of https://elrepo.org/linux/elrepo/el7/x86_64/repodata/repomd.xml failed with code 406: Not Acceptable


Note:

The issue is reproducible on any version of Satellite. 

If we change the upstream URL to a mirror URL i.e. http://mirrors.coreix.net/elrepo/elrepo/el7/x86_64/"  then repo sync seems to work

Comment 3 Tanya Tereshchenko 2020-03-30 18:06:59 UTC
Naina, could you retest please?

I tried today with the upstream pulp 2.21 and it works without any issue.
It's possible that it was something with this mirror and they fixed it.

Comment 4 Charles Slivkoff 2020-04-07 13:34:04 UTC
I opened the support case to report this issue.  It is still a problem.

From syslog:

Apr 07 09:25:00 *******.cmu.edu pulp[121266]: nectar.downloaders.threaded:INFO: Download failed: Down
load of https://elrepo.org/linux/elrepo/el8/x86_64/repodata/repomd.xml failed with code 406: Not Acceptable

Comment 5 Akemi Yagi 2020-04-30 16:35:05 UTC
A bug report has been filed with ELRepo:

https://elrepo.org/bugs/view.php?id=1006

Comment 6 Gertjan Bijl 2020-04-30 19:05:04 UTC
As also mentioned in the ElRepo bug-report:

I debugged some more on our side, and I found the issue: the server is not accepting the User-Agent. Was able to reproduce with cURL from command-line:

$ curl -I -H "Accept: */*" -H "Accept-Encoding: gzip, deflate" -H "User-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-1062.18.1.el7.x86_64" https://elrepo.org/linux/testing/el8/x86_64/repodata/repomd.xml [^]

HTTP/1.1 406 Not Acceptable
Date: Thu, 30 Apr 2020 18:46:45 GMT
Server: Apache
Content-Type: text/html; charset=iso-8859-1

With 'curl' as User-Agent it works as it should.
$ curl -I -H "Accept: */*" -H "Accept-Encoding: gzip, deflate" -H "User-Agent: curl" https://elrepo.org/linux/testing/el8/x86_64/repodata/repomd.xml [^]
HTTP/1.1 200 OK
Date: Thu, 30 Apr 2020 18:46:53 GMT
Server: Apache
Upgrade: h2,h2c
Connection: Upgrade
Last-Modified: Thu, 30 Apr 2020 18:01:02 GMT
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 961
Content-Type: application/xml

Unfortunately I cannot change the User-Agent of the Satellite-process, but I'm pretty sure the server should just accept this as User-Agent, as it is basically just a string.

Comment 7 Tanya Tereshchenko 2020-05-01 14:28:18 UTC
Thanks for investigation. It seems like a problem with elrepo as suspected.
Closing as not a bug.


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