[SATELLITE] - Why remote command execution from Satellite fails with 'return_code: 256'

Solution Verified - Updated -

Issue

  • Remote command execution is failing on some systems, error is independent of the executed command and filesystem path. Here is the error message from rhn_check on the client,
D: do_call script.run(41602, {'username': 'root', 'groupname': 'root', 'now': '2012-10-23 15:04:22', 'timeout': 600, 'script': '#!/bin/sh\ntouch /tmp/foo\n'}){'cache_only': None}
D: Sending back response(1, 'Script failed', {'output': '', 'base64enc': 1, 'process_end': '2012-10-23 15:04:22', 'return_code': 256, 'process_start': '2012-10-23 15:04:22'})

return code 256 means that the function waitpid(), which waited for the script to finish, failed and returned a code -1, which is in unsigned form equal to the number 256.

Environment

  • Red Hat Network Satellite (all versions)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content