Host registration fails with error NetworkException: HTTP error (400 - Bad Request)
Issue
-
Host registration to Satellite fails with the below error.
# subscription-manager register --org="ORG" --activationkey="Key" --force Network error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information. -
And
/var/log/rhsm/rhsm.loglog shows:2024-07-31 12:47:09,415 [DEBUG] subscription-manager:135231:MainThread @files.py:322 - Successfully read local syspurpose contents. 2024-07-31 12:47:09,415 [DEBUG] subscription-manager:135231:MainThread @files.py:359 - Successfully read cached syspurpose contents. 2024-07-31 12:47:09,428 [DEBUG] subscription-manager:135231:MainThread @dmiinfo.py:76 - Using dmidecode dump file: /dev/mem 2024-07-31 12:47:09,499 [DEBUG] subscription-manager:135231:MainThread @cloud_facts.py:67 - Trying to detect public cloud 2024-07-31 12:47:09,526 [DEBUG] subscription-manager:135231:MainThread @hwprobe.py:687 - Error during resolving IPv6 address of hostname: host.example.com, [Errno -5] No address associated with hostname 2024-07-31 12:47:09,537 [DEBUG] subscription-manager:135231:MainThread @insights.py:68 - Unable to read insights machine_id file: /etc/insights-client/machine-id, error: [Errno 2] No such file or directory: '/etc/insights-client/machine-id' 2024-07-31 12:47:09,537 [DEBUG] subscription-manager:135231:MainThread @insights.py:68 - Unable to read insights machine_id file: /etc/redhat-access-insights/machine-id, error: [Errno 2] No such file or directory: '/etc/redhat-access-insights/machine-id' 2024-07-31 12:47:09,538 [DEBUG] subscription-manager:135231:MainThread @connection.py:524 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, katello-server-ca.pem, katello-default-ca.pem 2024-07-31 12:47:09,538 [DEBUG] subscription-manager:135231:MainThread @connection.py:572 - Making request: POST /rhsm/consumers?owner=activation_keys=key_CAMPAGNE_HorsCampagne 2024-07-31 12:47:10,149 [DEBUG] subscription-manager:135231:MainThread @connection.py:622 - Response: status=400, request="POST /rhsm/consumers?owner=activation_keys=key_CAMPAGNE_HorsCampagne" 2024-07-31 12:47:10,150 [ERROR] subscription-manager:135231:MainThread @managercli.py:217 - Error during registration: HTTP error (400 - Bad Request) 2024-07-31 12:47:10,150 [ERROR] subscription-manager:135231:MainThread @managercli.py:218 - HTTP error (400 - Bad Request) Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 1389, in _do_command type=self.options.consumertype File "/usr/lib64/python2.7/site-packages/rhsmlib/services/register.py", line 93, in register jwt_token=jwt_token File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1063, in registerConsumer return self.conn.request_post(url, params, headers=headers) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 733, in request_post return self._request("POST", method, params, headers=headers) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 756, in _request info=info, headers=headers) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 631, in _request self.validateResponse(result, request_type, handler) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 717, in validateResponse raise NetworkException(response['status']) NetworkException: HTTP error (400 - Bad Request)
Environment
- Red Hat Satellite 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.