Registering a host fails with unknown or not assigned environment id 1
Environment
Red Hat Satellite 6
Issue
- registering a Host via either
bootstrap.pyorsubscription-managerfails with either error:"with id 1 doesn't exist or is not assigned to proper organization and/or location""Environment with id 1 doesn't exist or is not assigned to proper organization and/or location"
- the Location and Organization used in registration attempt is assigned to the environment
Resolution
For a final resolution, wait until This content is not included.this bugzilla is fixed.
As a workaround, try either:
- using an Activation Key for the Host registration
- or attachich Puppet Environment "production" (the one with id 1) to all organizations and locations
- in WebUI, navigate to Configure -> (Puppet) Environments -> find and click to "production" (optionally, open page
https://your.satellite.fqdn/environments/production/editdirectly) - in Locations tab, click to the blue plus sign to Select All
- in Organizations tab, click to the blue plus sign to Select All
- click to Submit button
- in WebUI, navigate to Configure -> (Puppet) Environments -> find and click to "production" (optionally, open page
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
Diagnostic Steps
Registration fails with error:
HTTP error (422 - Unknown): Validation failed: Environment with id 1 doesn't exist or is not assigned to proper organization and/or location
and full details:
An error occurred: HTTP Error 422: Unprocessable Entity
url: https://satellite006.example.com:443/api/v2/hosts/
code: 422
data: {
"host": {
"managed": "true",
"name": "host-name",
"ip": "xxxxxxx",
"hostgroup_id": 14,
"organization_id": 1,
"mac": "xxxxxxx",
"architecture_id": 1,
"build": false,
"location_id": 110,
"domain_id": 23
}
}
error: {
"error": {
"errors": {
"environment_id": [
"with id 1 doesn't exist or is not assigned to proper organization and/or location"
]
},
"id": null,
"full_messages": [
"Environment with id 1 doesn't exist or is not assigned to proper organization and/or location"
]
}
}
SBR
Product(s)
Components
Category
Tags
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.