[Satellite6] how to mimic from command line repository sync requests that are failing?
Environment
Red Hat Satellite 6.2 or newer
- including Sat 6.10+ with pulp-3
Issue
- having proxy configured or some non-standard networking paths between Satellite and
cdn.redhat.com/ Akamai servers - repository synchronize fails with connection error or file not found
- alternatively, Capsule sync from Satellite fails under similar circumstances
- Is there a way how to mimic the failing repository sync requests, but from command line?
Resolution
Run the attached script with an argument of pulp repository id or with a feed URL. Expected output is something like:
# ./test_pulp-anyversion_sync_requests.sh 3cefb76b-7c41-4446-9806-7077ceaccd0f
trying command:
curl -i --cacert ./ssl_ca_cert.3cefb76b-7c41-4446-9806-7077ceaccd0f.crt --cert ./ssl_client_cert.3cefb76b-7c41-4446-9806-7077ceaccd0f.crt --key ./ssl_client_key.3cefb76b-7c41-4446-9806-7077ceaccd0f.crt https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/resilientstorage/os
HTTP/1.1 200 OK
Server: Apache
Content-Type: text/html
Content-Length: 810
Date: Sat, 20 Apr 2019 09:21:31 GMT
X-Cache: TCP_HIT from a173-223-52-56.deploy.akamaitechnologies.com (AkamaiGHost/9.6.2.0.1-25325260) (-)
Connection: keep-alive
EJ-HOST: edgejavaappa3.prod.a4.vary.redhat.com
X-Akamai-Request-ID: 10d554ec
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Index of /98675/rcm/content/dist/rhel/server/7/7Server/x86_64/resilientstorage/os</TITLE>
</HEAD>
<BODY>
<H1>Index of /98675/rcm/content/dist/rhel/server/7/7Server/x86_64/resilientstorage/os</H1>
<PRE> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A> <A HREF="?S=A">Size</A>
<HR>
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="os/..">Parent Directory</A> 24-Mar-2019 06:59 1k
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="os/Packages/">Packages/</A> 22-Mar-2019 22:55 1k
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="os/repodata/">repodata/</A> 27-Mar-2019 08:03 1k
</PRE><HR>
</BODY></HTML>
(delete files ssl_ca_cert.3cefb76b-7c41-4446-9806-7077ceaccd0f.crt ssl_client_cert.3cefb76b-7c41-4446-9806-7077ceaccd0f.crt ssl_client_key.3cefb76b-7c41-4446-9806-7077ceaccd0f.crt once done)
- One can use the
curlcommand in the script output for further troubleshooting (until the *crt files for accessing CDN are deleted). - To try with a repository of different type than
yum, importer type must be changed in the script. E.g. for testing OSTree repo, one has to replaceyumbyostree_webeverywhere in the script. An example script for ISO repos is attached, for pulp-2 only (as it requires non-straightforward downloadingPULP_MANIFESTfile from the feed dir).
For more KB articles/solutions related to Red Hat Satellite 6.x Pulp 2.0 Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Pulp 2.0-related Issues
SBR
Product(s)
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.