subscription-manager register command fails with HTTP error (400 - Bad Request): Problem creating unit ConsumerDTO [uuid: null, name: hostname, owner id: null]

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 7,8
  • Red Hat Subscription Management (RHSM)
  • Red Hat Satellite 6

Issue

  • While registering system to Customer Portal or Red Hat Satellite 6 it fails with the following error:
# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: 
Password:
HTTP error (400 - Bad Request): Problem creating unit ConsumerDTO [uuid: null, name: hostname, owner id: null]

Resolution

  • Create a system profile on This content is not included.Customer Portal
  • From the systems page in RHSM, click the New button. Provide the required information to finish creating the new system profile.
  • Copy the UUID of the system from the details tab under Basic Information.
Basic Information

Name       (none)
Type       Virtual System/Physical System
UUID       xxxx-yyyy-zzzz-abbb
  • Register the system using the below command:
# subscription-manager register --consumerid=<UUID>       <<--Paste the UUID
  • In case of registering client vm to Satellite server, make sure the subscription-manager rpm on the client is updated to the latest version available.

Root Cause

  • System UUID missing in subscription-manager facts.

  • As the system UUID was missing in subscription-manager facts, In order to register the system as a separate entity to Customer Portal the system should have a unique hostname and UUID.

  • Some older versions of subscription-manager rpm on client system exhibit this behavior while registering with Satellite server.

Diagnostic Steps

  • Check if the hostname and UUID of the system are present in system information by using the subscription-manager facts command:
# subscription-manager facts | grep -i uuid

# subscription-manager facts | grep -i hostname
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.