Host registration via bootstrap.py script to the Red Hat Satellite Server fails with error: An error occured: HTTP Error 422: Unprocessable Entity

Solution Verified - Updated

Environment

  • Red Hat Satellite 6
  • Red Hat Capsule 6

Issue

  • Facing issues while trying to register host to the Satellite Server using bootstrap script:
    Error 1:

      An error occured: HTTP Error 422: Unprocessable Entity
      url: https://satellite.example.com:443/api/v2/hosts/
    
        "id": null,
          "full_messages": [
            "Ip does not match selected subnet"
    

    Error 2:

      [Calling Foreman API to create a host entry associated with the group & org]
      An error occured: HTTP Error 422: Unprocessable Entity
      url: https://capsule.example.com:8443/api/v2/hosts/
      code: 422
    
      "Content view can't be blank",
      "Lifecycle environment can't be blank"
    

Resolution

  • Ensure that the IP assigned to the host belongs to the Subnet associated with the host using hostgroup.

  • Ensure that valid lifecycle environment and content view are associated to the host group used with the bootstrap.py

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

  • Invalid IP has been assigned to the host.
  • No lifecycle environment and content view were associated with the host group.

Diagnostic Steps

  • Analyze the complete output for the bootstrap script executed on the host to isolate the error message:

      An error occured: HTTP Error 422: Unprocessable Entity
      url: https://satellite.example.com:443/api/v2/hosts/
    
        "id": null,
          "full_messages": [
            "Ip does not match selected subnet"
    
SBR
Product(s)
Components
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.