Registering system to Red Hat Satellite 6 returns "No such environment" error.

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • System registration to Red Hat Satellite 6 using subscription-manager fails with error No such environment as shown below:
  # subscription-manager register --org myEnvExample
  Username: admin
  Password: 
  Environment: myEnvExample
  No such environment: myEnvExample

Resolution

  • Below command will list the available environments:
   # subscription-manager environments
   Username:  admin
   Password: 
   Organization: myOrgExample
  +-------------------------------------------+
          Environments
  +-------------------------------------------+
   Name:        Production/myEnvExample
   Description: 

   Name:        Library/myEnvExample
   Description:

   Name:        Library
   Description: 
  • Retry the registration using the values returned from the environments command:
# subscription-manager register --org myOrgExample
Username: admin
Password: 
Environment: Library
The system has been registered with ID: 9828e98c-62df-45dd-b990-300f24ebf037 

For more KB articles/solutions related to Red Hat Satellite 6.x Client Subscription Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Client Subscription Issues

Root Cause

  • Wrong values may have supplied to subscription-manager for the environment variable.
  • Value used may not be the full path value.
  • Used Value could be from a puppet environment list not from the Life-Cycle Environment:

# hammer -u admin -p redhat environment list 
-

ID | NAME                                   
-|-
2  | KT_Default_Organization_Library_RHEL6_2
3  | KT_hive_Library_myEnvExample            
4  | KT_hive_Production_myEnvExample         

1  | production                             
-|-
SBR
Product(s)
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.