IBM Support

"HttpRetryException: cannot retry due to redirection, in streaming mode" when attempting to upload to the Installation Manager via CLI

Troubleshooting


Problem

An exception is seen when the Command Line Interface (CLI) of IBM Cloud Pak System is used to upload a new package to the repository:
C:\pure.cli-2.3.3.3\pure.cli\bin>pure -u <username> -p <password> -a -h <CPShostShortName>
>>> deployer.imrepositories.uploadPackageFromLocal('WebSphere','C:\\xxxx\\n.n.n-WS-WAS-FP0nn.zip')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\pure.cli-2.3.3.3\pure.cli\lib\2.3.3.3-202106151530895\deployer\resources\imrepository.py", line 172, in uploadPackageFromLocal
    return self.uploadPackageFromLocal(categoryname, f)
  File "C:\pure.cli-2.3.3.3\pure.cli\lib\2.3.3.3-202106151530895\deployer\resources\imrepository.py", line 183, in uploadPackageFromLocal
    json = http.restChunked(url, other, 'PUT', self.contenttype)
  File "C:\pure.cli-2.3.3.3\pure.cli\lib\2.3.3.3-202106151530895\deployer\resources\imrepository.py", line 183, in uploadPackageFromLocal
    json = http.restChunked(url, other, 'PUT', self.contenttype)
  File "C:\pure.cli-2.3.3.3\pure.cli\lib\2.3.3.3-202106151530895\deployer\http.py", line 524, in restChunked
    istream = huc.getInputStream()
        at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2655)
        at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2641)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1824)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
java.net.HttpRetryException: java.net.HttpRetryException: cannot retry due to redirection, in streaming mode

Cause

The <CPShostShortName> is resolved as a 'http' connection instead of the needed 'https' connection.

Resolving The Problem

Instead of the short host name associated with the IBM Cloud Pak System floating IP address, use:
 
  • The floating IP address of the IBM Cloud Pak System device

    Or
     
  • The full host name of the IBM Cloud Pak System device
when initially connecting to the device with the CLI tool.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZQFR","label":"IBM Cloud Pak System W3500"},"ARM Category":[{"code":"a8m0z000000cwnAAAQ","label":"Product Components->CLI and REST API"},{"code":"a8m0z000000cwm7AAA","label":"Product Components->IM (IBM Installation Manager)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS97LW","label":"IBM Cloud Pak System W3550"},"ARM Category":[{"code":"a8m0z000000cwnAAAQ","label":"Product Components->CLI and REST API"},{"code":"a8m0z000000cwm7AAA","label":"Product Components->IM (IBM Installation Manager)"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSJPC5","label":"IBM Cloud Pak System W3700"},"ARM Category":[{"code":"a8m0z000000cwnAAAQ","label":"Product Components->CLI and REST API"},{"code":"a8m0z000000cwm7AAA","label":"Product Components->IM (IBM Installation Manager)"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTQRPX","label":"IBM Cloud Pak System W4600 Commercial for VMware"},"ARM Category":[{"code":"a8m0z000000cwnAAAQ","label":"Product Components->CLI and REST API"},{"code":"a8m0z000000cwm7AAA","label":"Product Components->IM (IBM Installation Manager)"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSFQSV","label":"IBM Cloud Pak System Software"},"ARM Category":[{"code":"a8m0z000000cwnAAAQ","label":"Product Components->CLI and REST API"},{"code":"a8m0z000000cwm7AAA","label":"Product Components->IM (IBM Installation Manager)"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSJNNT","label":"IBM Cloud Pak System Software Suite"},"ARM Category":[{"code":"a8m0z000000cwnAAAQ","label":"Product Components->CLI and REST API"},{"code":"a8m0z000000cwm7AAA","label":"Product Components->IM (IBM Installation Manager)"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
16 June 2022

UID

ibm16561339