You are here

RHN satellite / spacewalk cheatsheet

RHN satellite is the downstream of spaclewalk and so this cheat sheet works for both RHN satellite and spacewalk

Check if a host is registered

ls -l /etc/sysconfig/rhn/systemid

Register a host

rhnreg_ks --activationkey=$RHN_activation_key

Verify RHN Registeration (check for your repos)

 

RHEL4

up2date –show-channels

RHEL5 and above

yum repolist

Clear cache

yum clean all

Error: Cannot retrieve repository metadata (repomd.xml) for repository

Check cert validity
Workaround: sed -i ‘s/https:/http/g’ /etc/sysconfig/rhn/up2date

Error Message:

 

Service not enabled for system profile: "host.domain.tld"

 

Error Class Code: 31

 

Error Class Info:

 

This system does not have a valid entitlement for Red Hat Network.

 

Visit https://rhn.redhat.com/rhn/systems/SystemEntitlements.do

or login at https://rhn.redhat.com, and from the "Your RHN" tab, select "Subscription Management" to enable RHN service for this system.

 

Log into RHN https://rhn.redhat.com/rhn/systems/SystemEntitlements.do go to "Subscriptions > registered systems"

In the "filter by system" enter the hostname and press the "go" button

Double click on the link under system to select the host

You should see that the system has no entitlements and a link to add them. click it.

On the next screen select "management" level entitlement and uncheck the box for"Location-Aware Updates" and save.

Updates not working

See previous

If you get similar messages in /var/log/up2date:

 

[Wed Feb 15 17:13:54 2017] rhn_register A socket error occurred: Timeout Exception, attempt #5

rhnreg_ks --activationkey=$RHN_activiation_key –serverUrl=https://xmlrpc.rhn.redhat.com/XMLRPC --force --nohardware --nopackages

Unable to telnet i.e telnet xmlrpc.rhn.redhat.com 443 fails

check /etc/sysconfig/rhn/up2date for the settings:

 

enableProxy=1

httpProxy=proxy.domain.tld:8080

SSL errors with name resolution

Check /etchosts and /etc/resolve.conf

Redirecting from internal satellite to RHN

sed -i 's|sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT|sslCACert=/usr/share/rhn/RHNS-CA-CERT|g' /etc/sysconfig/rhn/up2date

 

sed -i 's|serverURL=.*$|serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC|g' /etc/sysconfig/rhn/up2date
and re register with - -force

Product subscription expired or Unable to read customer Identity Warning/Error messages with YUM

 

 

WARNING

The subscription for following product(s) has expired:

Check RHEL6 servers does not have Subscription Manager enabled

 

  1. Edit the files below & set 'enable=1' to 'enable=0'

    1. /etc/yum/pluginconf.d/product-id.conf

    2. /etc/yum/pluginconf.d/subscription-manager.conf

  2. remove everything in /var/cache/yum Directory

    1. rm -rfv /var/cache/yum/*

  3. clear cache

    1. yum clean all

You no longer have access to the repositories that provide these products. It is important that you apply an active subscription in order to resume access to security and other critical updates. If you don't have other active subscriptions, you can renew the expired subscription.

Check to see if subscribe to a Beta channel that is no longer valid

Logs

/var/log/up2date