[root@localhost ~]# subscription-manager register --org="Test_Organization" --activationkey="rhel 8.3 activation key"
HTTP error (404 - Not Found): Couldn't find Organization 'Test_Organization'.
Is everything OK on your server? hammer ping
[root@ingbtcpic6vl232 ~]# hammer ping
database:
Status: ok
Server Response: Duration: 0ms
candlepin:
Status: ok
Server Response: Duration: 21ms
candlepin_events:
Status: ok
message: 2 Processed, 0 Failed
Server Response: Duration: 0ms
candlepin_auth:
Status: ok
Server Response: Duration: 17ms
katello_events:
Status: ok
message: 1 Processed, 0 Failed
Server Response: Duration: 0ms
pulp:
Status: ok
Server Response: Duration: 26ms
pulp_auth:
Status: ok
Server Response: Duration: 13ms
foreman_tasks:
Status: ok
Server Response: Duration: 2ms
I just noticed in your screenshot that it appears that key belongs to Default_Organization - see the info notice toward the middle of the screen. Try with that org instead. If you intended the key to be in Test_Organization, create another one over there
I think I kept my default org as test organization. Where can I check that?
@Jonathon_Turel
[root@localhost ~]# subscription-manager register --org=“Default_Organization” --activationkey=“rhel 8.3 activation key”
The system has been registered with ID: 666d73d8-b508-4a5c-85a4-a0cfa5
The registered system name is: localhost.localdomain
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status: Subscribed
Can I check running openscap scan now? @Jonathon_Turel Or is there any other steps to do before?
Give it a try! Your system is registered now, so that’s good. I’m not sure what kind of configuration is required for OpenSCAP beyond what you’ve already done
Now when I run the ansible role for openscap, I’m getting this error
fatal: [130.147.136.32]: FAILED! => {"changed": false, "msg": "Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried", "rc": 1, "results": []}
@Jonathon_Turel It may be because we gave default organization while registering? Can you tell me how to create an activation key under test organization?
Any idea why I am unable to install the package? @Jonathon_Turel @jtruestedt
147:
TASK [Apply roles] *************************************************************
148:
149:
TASK [theforeman.foreman_scap_client : Configure plugins repository (yum)] *****
150:
ok: [130.147.136.32]
151:
152:
TASK [theforeman.foreman_scap_client : Configure plugins repository (apt)] *****
153:
skipping: [130.147.136.32]
154:
155:
TASK [theforeman.foreman_scap_client : Set facts for deb-based OS] *************
156:
skipping: [130.147.136.32]
157:
158:
TASK [theforeman.foreman_scap_client : Set facts for rpm-based OS] *************
159:
ok: [130.147.136.32]
160:
161:
TASK [theforeman.foreman_scap_client : Install the foreman_scap_client package] ***
162:
fatal: [130.147.136.32]: FAILED! => {"changed": false, "msg": "Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried", "rc": 1, "results": []}
163:
PLAY RECAP *********************************************************************
164:
130.147.136.32 : ok=4 changed=0 unreachable=0 failed=1 skipped=2 rescued=0 ignored=0
165:
Exit status: 2
Is your content-view published? Does it include the client-repo which makes the foreman-scap-client available?
Which repositories does your client system now have? Can you give us a yum repolist
?
Is your content synced to your Katello?
Content is synced with Katello
[root@localhost ~]# yum repolist
Updating Subscription Management repositories.
repo id repo name
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
so I think you still miss the repository with the client tools, containing the foreman_scap_client (which should not be important, since you already installed it)
However it somehow has issues installing packages because it cannot download the metadata from the appstreams repository.
Can you check if you havbe release version set in your activationkey? If not add it there and re-register or go to Hosts → Content Hosts → select your host and set a release version there, then run subscription-manager refresh
and try to install a package again.
(Could be the same issue as here: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-rpms' - Red Hat Customer Portal)
@jtruestedt I made a few changes and this is what I’m getting now
1:
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_stig --results-arf /tmp/d20210929-466915-v19usw/results.xml /var/lib/openscap/content/b7772a4001f865517e30762c406dee80fdab2100ecc010f4408519a979665f6e.xml
2:
WARNING: Datastream component 'scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL8.xml' points out to the remote 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml'. Use '--fetch-remote-resources' option to download it.
3:
WARNING: Skipping 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml' file which is referenced from datastream
4:
WARNING: Skipping ./security-data-oval-com.redhat.rhsa-RHEL8.xml file which is referenced from XCCDF content
5:
DEBUG: running: /usr/bin/env bzip2 /tmp/d20210929-466915-v19usw/results.xml
6:
Uploading results to https://ingbtcpic6vl232.code1.emi.com:9090/compliance/arf/6
7:
Report uploaded, report id: 5829
8:
Exit status: 0
Where can I find the report?
I tried going into /var/lib/openscap and tried to find report.xml. But couldn’t find it @jtruestedt
If you go to Hosts → All Hosts and on the Details-Page of the host with the Report, you should have a new button named “Compliance” (as well as a status named Compliance)
Alternative is under Hosts → Compliance → Reports you should see all reports not only from one host.
I can see the report! @jtruestedt @Jonathon_Turel Thanks guys for the support.