Cluster upgrade / installation fails to download `lsof` package

Issue

  • The cluster upgrade / installation fails on worker(s) / controller(s) and show the following messages:
[worker-1] <packageURL>: [Errno 14] HTTPS Error 401 - Unauthorized
[worker-1] Trying other mirror.

And later on:

[worker-X] Error downloading packages:
<date> [worker-X] <packageName>: [Errno 256] No more mirrors to try.

Environment

Related Issue

Resolution

When using RHEL, CJE 1.6.0+ requires Red Hat Subscription Manager credentials. This can cause operations to fail as CJE cannot install new Operations System modules without these credentials.

Solution

The solution is to upgrade to CJE 1.7.0 or later. This version offers a feature to provide scripts handling the registration / unregistration via the attributes register_script / unregister_script.

For existing installation, the operation cje prepare registration-update can be used. Then you can provide the path to registration / unregistration scripts in the registration-update.config. For example:

[tiger]

## OS Registration script
#
# If the OS requires a registration (e.g. RHEL), provide here the path to script handling the registration.
# This script will be copied to machines and executed on init and upgrades and must succeed even if the machine is already registered.
#
# Example of script content for RHEL:
# #!/bin/bash
# subscription-manager register --username <rhel_username> --password <rhel_password> --auto-attach --force
#
# register_script = $CJE_PROJECT_HOME/scripts/rhel-sm-reg-script.sh

## OS Unregistration script
#
# The unregister script is run on machine shutdown. It allows to free the registration if it part of a pool.
# Provide here the path to a script handling machine unregistration.
#
# Example of script content for RHEL:
# #!/bin/bash
# subscription-manager unregister
#
# unregister_script = $CJE_PROJECT_HOME/scripts/rhel-sm-ureg-script.sh

This is documented in Administrate CJE - Configuration Reference - Common Configuration Attributes

Workaround

The workaround is to manually register the RHEL instances (in other words each controller and worker).

1) SSH onto controller / worker

dna connect [controller|worker]

2) Log on to Red Hat subscription manager (credentials of your RHEL account):

subscription-manager register –username –password –auto-attach

Note: you can use the command dna run <full_path_to_script> <workers/controllers> to run scripts across all workers / controllers. See How to use CJE command line tools for more details.

Resources

For more information about the Red Hat Subscription-Manager, have a look at the following:

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Ryan Campbell

    Note that this scripts directory is in the root of the CJE project directory. It is NOT same as the .dna/scripts directory.

Please sign in to leave a comment.