Satellite 5: What is spacewalk-debug and how do I run it?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 5.6
  • Red Hat Satellite 5.7
  • Red Hat Satellite 5.8

Issue

  • Need to provide spacewalk-debug to troubleshoot Satellite 5 server issue
  • What is spacewalk-debug and how do we generate it ?

Resolution

  • Make sure that spacewalk-backend-tools is installed:

    • If the system is registered with Red Hat Network (RHN) Classic Hosted and subscribed in  Red Hat Network Satellite channel, it can be installed using yum:
    # yum install spacewalk-backend-tools
    
  • If the system is not registered with Red Hat Network (RHN) Classic Hosted, then download the package from  the Red Hat Network (in the Red Hat Network Satellite channel) manually, or copy the package from the Satellite installation ISO,  and install it using the command:

    # rpm -Uvh spacewalk-backend-tools-[version].[arch].rpm
    
  • Once the package has been installed, issue the following command from a command prompt:

    # spacewalk-debug
    
  • Once completed, the script will generate a compressed tar file in /tmp. Provide this file to the Red Hat support representative. Note if you prefer to use a different destination other than the default /tmp use the --dir option:

    # spacewalk-debug --dir /path/to/another/directory/

Note for Satellite 6 please see "Satellite 6: What is foreman-debug and how do I run it?"

Diagnostic Steps

  • The spacewalk-debug script collects important Satellite configuration and log files from the server, such as Apache, Tomcat, and Postgresql database initialization files and error logs

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

9 Comments

This article needs to be published for the customer.

Make sure /tmp has enough space.   spacewalk-debug used 600MB on my system, before it ended up with a 30MB bz2 file.

How do I turn off the debug?

Lextington AIXteam

As these are the steps requested by Red Hat support:
========================================================================
1. Edit /etc/rhn/rhn.conf, and add the following line at the end:

debug=5

2. Try the satellite-sync again:

# rm -rf /var/cache/rhn/satsync/*

# satellite-sync -c 'channel'

3. Remove the "debug=5" line from /etc/rhn/rhn.conf.

4.Please generate the spacewalk-debug report:
- Spacewalk-debug from satellite server
======================================================================

I will test if removing the debug line will do the trick.

Please add the pre run and post run steps in the recipe above.

Please add an option to send the output to another location other than /tmp as not all systems have large /tmp file systems. A workaround is to edit the BASE_DIR variable in the script however we would rather not edit Red Hat supplied scripts.

The option --dir (Destination directory for the tar archive) is already available:

spacewalk-debug --dir /destination/directory/

Cheers
Fábio

Thanks Fabio - I'll test it out. Not sure how I missed that!

Not a problem, I have edited this article adding this information.