wget Download platform patches - How to Download Patches from Download Center ?
search cancel

wget Download platform patches - How to Download Patches from Download Center ?

book

Article ID: 220739

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

since 2-3 months ago, we have been using the procedure to download patches for gateway as described in 

API Gateway: Download patches using curl

https://knowledge.broadcom.com/external/article?articleId=214206

to download the last platform patches for the API GW. Everything has worked smooth till today. When we tried to install June patches, we got a 404 error in step 2:

Step 1: GENERATE AN ACCESS TOKEN  (WORKED)

curl -k "https://ftp.broadcom.com/CrushFTPAPIForDownloads/webapi/getAccessTokenForPath?path=/pub/API_Management/Gateway/Platform_Patch/v10.x/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P"


{"access_token":"PB-5V4XNV8IKtBrXCCvq4OqYBVawyOmy4kuCK-8PPFUDzKZQi0KY4GwFgRA1095WunT094sewNVwQO53BWYm9SaK2lx-qvFTgyWGhV_ofmKCMWoLnUwYV5jkftulFebX9Gyur4-D1L0wEObXAe5pPKBOMSMn6dqMhW7rYWLMvDUhnxnZ-JTG1DFanj41PH5823wi2t627cWNnRknmuKgSD-wA==-PR","expires_in":3600} 

 

Step 2: SAVE THE TOKEN TO COOKIES (FAILED)

wget --max-redirect 3 --save-cookies cookies.txt --keep-session-cookies 'https://ftp.broadcom.com/pub/API_Management/Gateway/Platform_Patch/v10.x/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P?token=PB-5V4XNV8IKtBrXCCvq4OqYBVawyOmy4kuCK-8PPFUDzKZQi0KY4GwFgRA1095WunT094sewNVwQO53BWYm9SaK2lx-qvFTgyWGhV_ofmKCMWoLnUwYV5jkftulFebX9Gyur4-D1L0wEObXAe5pPKBOMSMn6dqMhW7rYWLMvDUhnxnZ-JTG1DFanj41PH5823wHOj7N6X36kFIV2vCxhiIJw==-PR'
--2021-07-23 10:34:53--  https://ftp.broadcom.com/pub/API_Management/Gateway/Platform_Patch/v10.x/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P?token=PB-5V4XNV8IKtBrXCCvq4OqYBVawyOmy4kuCK-8PPFUDzKZQi0KY4GwFgRA1095WunT094sewNVwQO53BWYm9SaK2lx-qvFTgyWGhV_ofmKCMWoLnUwYV5jkftulFebX9Gyur4-D1L0wEObXAe5pPKBOMSMn6dqMhW7rYWLMvDUhnxnZ-JTG1DFanj41PH5823wHOj7N6X36kFIV2vCxhiIJw==-PR
Resolving ftp.broadcom.com (ftp.broadcom.com)... 141.202.253.50
Connecting to ftp.broadcom.com (ftp.broadcom.com)|141.202.253.50|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://ftp.broadcom.com/pub/API_Management/Gateway/Platform_Patch/v10.x/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P [following]
--2021-07-23 10:34:53--  https://ftp.broadcom.com/pub/API_Management/Gateway/Platform_Patch/v10.x/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P
Reusing existing connection to ftp.broadcom.com:443.
HTTP request sent, awaiting response... 404 Not Found
2021-07-23 10:34:53 ERROR 404: Not Found.

 

Environment

Release : 10.x

Component : API GATEWAY

Cause

- ftp download files method changed. Now requires a username/password (nor token, not cookie) , rely on an order number.

- The Kb https://knowledge.broadcom.com/external/article?articleId=214206 ,  outlines how to pull patches from the backend, which doesn't use or rely on an order number.

Resolution

1. Login to 
https://support.broadcom.com/support-content/release-announcements/CA-API-Gateway-Solutions--Patches/3024

2. click on the patch name do you need to download 

example :

3. Click on the ftp button to see your Order Number : 
   - under TODAY'S DOWNLOADS, you should see Order Number
   example: 22445209

 

Note : If you need to download several patches click each one and also click on "Add solution to Cart", you only will need one unique order number.

4. Copy the Order Number into your command line as showed  below :

wget ftp://downloads.broadcom.com/21983200/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P --user <username> --ask-password

- Replace the 21983200 by your new Folder Name obtained before and replace <username> by your email address also.

wget ftp://downloads.broadcom.com/22445209/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P --user [email protected] --ask-password

- this command will ask for password when execute. Provide your Broadcom user account Password when prompted

5. Download will start and need to finish with success

# wget ftp://downloads.broadcom.com/22445209/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P --user [email protected] --ask-password
Password for user ‘[email protected]’:
--2021-07-30 07:01:18--  ftp://downloads.broadcom.com/22445209/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P
           => ‘Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P’
Resolving downloads.broadcom.com (downloads.broadcom.com)... 141.202.253.110
Connecting to downloads.broadcom.com (downloads.broadcom.com)|141.202.253.110|:21... connected.
Logging in as [email protected] ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /22445209 ... done.
==> SIZE Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P ... 857176153
==> PASV ... done.    ==> RETR Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P ... done.
Length: 857176153 (817M) (unauthoritative)

100%[=======================================================================================================================================>] 857,176,153 2.04MB/s   in 6m 50s

2021-07-30 07:08:15 (2.00 MB/s) - ‘Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-07-22.L7P’ saved [857176153]


7. If do you see Error like No such directory ‘21983200’ :


# wget ftp://downloads.broadcom.com/21983200/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P --user [email protected] --ask-password
Password for user ‘[email protected]’:
--2021-07-30 06:52:24--  ftp://downloads.broadcom.com/21983200/Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P
           => ‘Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2021-06-22.L7P’
Resolving downloads.broadcom.com (downloads.broadcom.com)... 141.202.253.110
Connecting to downloads.broadcom.com (downloads.broadcom.com)|141.202.253.110|:21... connected.
Logging in as [email protected] ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /21983200 ...
No such directory ‘21983200’.


** Means you are using a wrong Order Number or the Order number has expired. The folder Name is deleted after each customer download.