"HTTP error (422 - Unknown): Validation failed: Ip does not match selected subnet" error while registering system to Satellite 6

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • Unable to register system to Red Hat Satellite 6 server and failing with below error

    HTTP error (422 - Unknown): Validation failed: Ip does not match selected subnet
    

Resolution

Below steps will be helpful while re-registering the system to Red Hat Satellite 6 server.

  • Run the below command on the Satellite server to verify if the system is already registered to the Satellite server or not.

    # hammer host list |grep <hostname>
    
  • If the system is already registered to the Satellite server then before registering it again, it needs to be removed from the Satellite server.

  • Before removing it from the Satellite server, enable Disassociate Host on the host to prevent deleting the host from Compute Resource.

    # hammer host disassociate --id <Host ID from previous command output>
    
  • To do this using Satellite Web UI.

    Go to Satellite Web UI → Hosts → ALL Hosts → Select the Hostname → Select Action (upper right) → Disassociate Hosts.
    
  • To make this change for all VMs, refer to "VM gets deleted when unregistering the system from Red Hat Satellite 6".

  • Also make sure that the server is not having a managed flag.

    # hammer host info --id <Host ID> | grep Managed
    Managed:                  no
    
  • If the system has a managed flag then disable this flag.

    # hammer host update --id <Host ID> --managed false
    
  • Use the below steps to remove the host from the Satellite server.

    Go to Satellite Web UI → Hosts → Content Hosts → Select that Hostname → Select Action (upper right) → Remove Host.
    
  • Or below commands can be used to delete the host from the Satellite server.

    # hammer host delete --id <Host ID from the previous command>
    
  • On Satellite Client, clear the previous RHSM information and re-register it again.

       # subscription-manager clean
    
       # subscription-manager register --org <org> --activationkey=<activation key name>
    
  • If the hostname mentioned in the katello.facts does not match the actual hostname, run the below commands on the system.

    # mv /etc/rhsm/facts/katello.facts /tmp/
    # subscription-manager clean
    

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

  • System is already registered to the Satellite server.

Diagnostic Steps

  • Registration command is failing with an error.

    # subscription-manager register --org="ORG Name" --activationkey <activation key name>
    HTTP error (422 - Unprocessable Entity): Validation failed: Ip does not match selected subnet
    
  • hostname mentioned in the katello.facts file should match the system's actual hostname.

       # cat etc/rhsm/facts/katello.facts 
       {"network.hostname-override":"clientxyz.com"}
    
       # cat hostname 
       clientxyz.com
    
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.