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.
CloudBees Jenkins Enterprise (CJE) 1.6.x
RedHat Enterprise Linux
TIGER-2677 (Fixed in CJE 1.7.0)
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.
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
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
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 <username> --password <password> --auto-attach
you can use the command
For more information about the Red Hat Subscription-Manager, have a look at the following: