[Spacewalk-list] Adding system to Spacewalk

William H. ten Bensel WHTENBEN at up.com
Tue Feb 28 18:14:21 UTC 2017


On the Spacewalk server: 
validate that the installer created: 
/var/www/html/pub/RHN-ORG-TRUSTED-SSL-CERT.  If not it should have also 
been created in /root/ssl-build/.  Copy RHN-ORG-TRUSTED-SSL-CERT out to 
/var/www/html/pub/.

On the Clients:
The commands from the previous email will need to be ran on the Linux 5.9 
client that you are trying to register, not the spacewalk itself. The 
command paths for messagebus and haldaemon are for Linux 4/5/6 systems. 
Linux 7 supports systemd. 


HTTPS erros:
Use http not https... That will solve the issues there.


##
Now you mention running this/something as a kickstart.  I have to
mention that I have zero idea how to do that.  I'm completely green on
Spacewalk.
##
Kickstart will come when you get further into Spacewalk.  Lots of 
documentation.  The below is just pieces from the kickstart, most of it is 
automatically created by the Spacewalk application itself. 



On Tue, Feb 28, 2017 at 7:08 AM, William H. ten Bensel <WHTENBEN at up.com> 
wrote:
> Hopefully this will assist, a shot in the dark...  Most of the following 
is
> from a kickstart.  The !! comments and actions are additional steps that 
may
> or may not be needed.
>
> Try reinstalling the following on the client side.
>
> # below pkgs needed for rhn registration and configuration management
> rhn-check
> rhnsd
> rhn-setup
> rhn-client-tools
> yum-rhn-plugin
> libidn
> rhncfg
> rhncfg-client
> rhncfg-actions
> libxml2
> pyOpenSSL
> libxml2-python
> rhnlib
> perl
>
> When using a kickstart, there are some additional items  that are 
completed
> besides installing the RPMs.
>
> mkdir -p /etc/sysconfig/rhn/allowed-actions/script
> touch /etc/sysconfig/rhn/allowed-actions/script/run
> mkdir -p /etc/sysconfig/rhn/allowed-actions/configfiles
> touch /etc/sysconfig/rhn/allowed-actions/configfiles/all
>
> /etc/init.d/messagebus restart
> /etc/init.d/haldaemon restart
>
> # begin Red Hat management server registration
> mkdir -p /usr/share/rhn/
> wget http://MySpacewalk.com/pub/RHN-ORG-TRUSTED-SSL-CERT-O
> /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
> perl -Xnpe 's/RHNS-CA-CERT/RHN-ORG-TRUSTED-SSL-CERT/g' -i
> /etc/sysconfig/rhn/*
>
> !! This may not be needed in your case
> if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ]; then
>    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
> fi
>
> key=kickstart-key,my-custom_key
> if [ -f /tmp/key ]; then
>    key=`cat /tmp/key`,$key
> fi
>
> !! Not from a kickstart..
> !! Before registering... Validate the date/time on the server.  It can 
cause
> failures as well.
> !!  date
> !!  service ntpd stop
> !!  ntpdate -s Myntpservers
> !!  service ntpd start
>
> rhnreg_ks --serverUrl=https://MySpacewalk.com/XMLRPC
> --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=$key
>
> # end Red Hat management server registration
>
> # end cobbler snippet
>
> rhn_check
>
> - Thanks and good luck
>
>

####
Check all the packages you listed above.. missing ones included:
rhncfg, rhncfg-client, rhncfg-actions.  Ran into issues though
following the rest of the steps:

oot at cent7-spacewalk:/usr/share/rhn$ /etc/init.d/messagebus restart
bash: /etc/init.d/messagebus: No such file or directory
root at cent7-spacewalk:/usr/share/rhn$ systemctl messagebus restart
Unknown operation 'messagebus'.
root at cent7-spacewalk:/usr/share/rhn$ mkdir -p /usr/share/rhn/
root at cent7-spacewalk:/usr/share/rhn$ wget
https://cent7-spacewalk/pub/RHN-ORG-TRUSTED-SSL-CERT-O
/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
--2017-02-28 09:45:38--  
https://cent7-spacewalk/pub/RHN-ORG-TRUSTED-SSL-CERT-O
Resolving cent7-spacewalk (cent7-spacewalk)... 10.195.xx.xx
Connecting to cent7-spacewalk (cent7-spacewalk)|10.195.xx.xx|:443... 
connected.
ERROR: cannot verify cent7-spacewalk's certificate, issued by
‘/C=US/ST=MT/L=Helena/O=Montana
Interactive/OU=Operations/CN=cent7-spacewalk’:
  Unable to locally verify the issuer's authority.
To connect to cent7-spacewalk insecurely, use `--no-check-certificate'.
/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT: Scheme missing.
root at cent7-spacewalk:/usr/share/rhn$ wget
https://cent7-spacewalk/pub/RHN-ORG-TRUSTED-SSL-CERT-O
/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --no-check-certificate
--2017-02-28 09:45:50--  
https://cent7-spacewalk/pub/RHN-ORG-TRUSTED-SSL-CERT-O
Resolving cent7-spacewalk (cent7-spacewalk)... 10.195.xx.xx
Connecting to cent7-spacewalk (cent7-spacewalk)|10.195.xx.xx|:443... 
connected.
WARNING: cannot verify cent7-spacewalk's certificate, issued by
‘/C=US/ST=MT/L=Helena/O=Montana
Interactive/OU=Operations/CN=cent7-spacewalk’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 404 Not Found
2017-02-28 09:45:50 ERROR 404: Not Found.

/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT: Scheme missing.



Thanks
#####

**

This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20170228/c4a2ec20/attachment.htm>


More information about the Spacewalk-list mailing list