Host registration with Red Hat Satellite is failing with the error Validation failed.

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

  • When trying to register the host with an activation key or manually, getting the below error:

     Validation failed: Name hostname can contain only lowercase letters, numbers, dashes, and dots according to RFC921, RFC952, and RFC1123
    

Resolution

  • Make sure that the hostname of the host does not include any special character like underscore "_" :

        # hostname
        client1
    
        # hostname -f
        client1.example.com
    
  • Verify that subscription-manager facts also do not include a special character like underscore "_" in hostname:

     # subscription-manager facts | grep -i hostname
     network.hostname: client1
    
  • If the above looks good then verify file /etc/hosts on the host and make sure hostname entry should not include a special character like underscore "_"

     # cat /etc/hosts
    
  • For example, there was an entry in file /etc/hosts which includes underscore "_" as below due to which getting error "Validation failed".

     xx.xxx.x.xxx	client1	client1_xyz.com	client1.example.com
    

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

  • There was an entry in file /etc/hosts for host which includes underscore "_" in hostname due to which getting error "Validation failed" for hostname.

Diagnostic Steps

  • Make sure that there is no special character like underscore "_" in the hostname of the host which you are trying to register to the satellite server.

  • Verify subscription-manager facts generated for the host to be registered to the satellite server.

  • Check file /etc/hosts and verify if there is an entry for the hostname with special characters like underscore "_"

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.