Cloud App Management PPA installation fails to load into the IBM Cloud Private repository with Docker authentication error
After you log in to Docker and you
start loading the Cloud App
Management installation
image into the IBM Cloud
Private repository, some
time later, the loading stops and you get the unauthorized: authentication required
error.
Problem
If it takes a substantial amount of time to load the Cloud App
Management installation image into the IBM Cloud
Private repository, the Docker login times out and the unauthorized:
authentication required error is displayed. The Cloud App
Management installation image stops loading.
Symptoms
Preparing and Waiting messages display in your command
window, and then the following error is displayed
unauthorized: authentication required
(Are you logged in to the docker registry?Solutions
Complete Solution 1 first. If Solution 1 succeeds, you do not need to complete Solution 2. If it fails, you must complete Solution 2.
Solution 1
- Log in to Docker again by issuing the
following
command:
Where my_cluster_CA_domain is the certificate authority (CA) domain, such asdocker login my_cluster_CA_domain:8500mycluster.icp. If you did not specify a my_cluster_CA_domain, the default value ismycluster.icp. - If you can successfully log in again, load the Cloud App
Management installation image into the IBM Cloud
Private repository again by issuing the following
command:
Where:cloudctl catalog load-archive --archive ppa_file [--registry my_cluster_CA_domain:8500] [--repo my_helm_repo_name]- ppa_file is the name of the Cloud App Management installation image file.
- my_helm_repo_name is the name of the target Helm repository. Run the cloudctl catalog repos command to get a list of repositories.
Solution 2
- Log in into to Docker again by issuing the
following
command:
docker login my_cluster_CA_domain:8500 - Extract the Cloud App
Management installation
image by issuing the following
command:
where ppa_file is the compressed Cloud App Management PPA installation image file, such as the app_mgmt_server_2019.3.0.tar.gz file.tar -xvf ppa_file tar -xvf charts/decompressed_ppa_file - Load all the Docker image archive files
into the Docker engine. Record the Docker image name and tag into a file by running the
following
commands:
for i in `ls images/*`; do echo $i; echo docker load -i $i docker load -i $i | tee -a IMG_LOG.txt done - If you are logged out of Docker again, you
must log in to Docker again now. Then, tag the
Docker images to this tag:
my_cluster_CA_domain:8500/my_namespace/imagename:tagby running the following commands:
where my_namespace is the namespace that the installation image file is loaded to.for img in `awk -F ':' ' {print $2":"$3} ' IMG_LOG.txt` do echo docker tag $img my_cluster_CA_domain:8500/my_namespace/$img docker tag $img my_cluster_CA_domain:8500/my_namespace/$img echo docker push my_cluster_CA_domain:8500/my_namespace/$img docker push my_cluster_CA_domain:8500/my_namespace/$img done - If you have left your system for more than 12 hours, then you must log in to your IBM Cloud
Private cluster again by issuing the following
command:
cloudctl login -a https://my_cluster_CA_domain:8443 --skip-ssl-validation - Load the Helm chart that is located in the
charts directory into IBM Cloud
Private by issuing the following
command:
cloudctl catalog load-chart --archive charts/decompressed_ppa_file
Results
The Cloud App Management PPA installation image is successfully loaded into the IBM Cloud Private repository. You can continue with your Cloud App Management server installation.