Bug 1922944 - Global Registration: Getting "curl:(51)" error while registering with Curl command but registration with activation key works.
Summary: Global Registration: Getting "curl:(51)" error while registering with Curl co...
Keywords:
Status: CLOSED DUPLICATE of bug 1922867
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.0
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-01 07:30 UTC by Akshay Kapse
Modified: 2021-02-05 12:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-05 12:43:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Akshay Kapse 2021-02-01 07:30:02 UTC
Description of problem:
While registering host with Global Registration Curl getting error:
~~~
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate." 
~~~
But no error while registering with activation key.

Steps to Reproduce:
1. Generate the Global Registration Curl command:

~~~
curl -X GET "https://satellite.example.com/register?activation_key=ak1&location_id=2&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTIxNjM2NDksImp0aSI6IjJiYzgwMDU3MTU3ZTQzYzUyZGVkYjJkOTgxYWNkYjVmZWM3OWU3ZTRiNGE1YjI1NmUyNmRlNDg0NWNlNDI4ZjYiLCJleHAiOjE2MTIxNzgwNDl9.CvfajFDVXH9f-_VC0LlJh0mQaGUJcmsOsRl1q1L8OWY' | bash
~~~

2. Register the host 

~~~
# curl -X GET "https://satellite.example.com/register?activation_key=ak1&location_id=2&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTIxNjM2NDksImp0aSI6IjJiYzgwMDU3MTU3ZTQzYzUyZGVkYjJkOTgxYWNkYjVmZWM3OWU3ZTRiNGE1YjI1NmUyNmRlNDg0NWNlNDI4ZjYiLCJleHAiOjE2MTIxNzgwNDl9.CvfajFDVXH9f-_VC0LlJh0mQaGUJcmsOsRl1q1L8OWY' | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
~~~

3. If same host is registered using activation key:
~~~
# subscription-manager register --org="Default_Organization" --activationkey="ak1"
The system has been registered with ID: xxxxxxx-xxxx-xxxxxxx-xxxxxxxxx
~~~


Actual results:
Unable to register host with  Global Registration Curl Command once the host hit error:
~~~
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
~~~

Expected results:
Registration with Global Registration Curl Command should work if registration with activation key works.

Comment 1 Leos Stejskal 2021-02-05 12:43:52 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1922867#c4

*** This bug has been marked as a duplicate of bug 1922867 ***


Note You need to log in before you can comment on or make changes to this bug.