JON storage node launcher script displays numactl missing or not found error on Solaris 10

Solution Unverified - Updated

Environment

  • Red Hat JBoss Operations Network (ON) 3.2
  • Oracle Solaris 10
  • numactl is not installed

Issue

  • Installation fails

  • Script complaints about missing numactl

  • Storage node script displays the following message:

      ./cassandra: numactl: not found
    

Resolution

The numactl: not found message can be ignored. It is only displayed as part of the test to see if the command is installed and available.

Root Cause

The JBoss ON storage node launcher script uses the numactl command to set process options when invoking the JVM for its underlying process. The script attempts to verify the command is available using the following commands:

NUMACTL_ARGS="--interleave=all"
if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
then
    NUMACTL="numactl $NUMACTL_ARGS"
else
    NUMACTL=""
fi

In the event that which numactl returns a non-zero exit code, numactl is considered unavailable and will not be used. However, in the case of Solaris 10 -- and perhaps other supported platforms -- the which command always returns an exit code of 0 regardless of the presence of the target command. This causes the script execution to continue to the numactl --interleave=all ls / command. Because numactl is not available on the system or in the user's path, it fails and returns a non-zero exit code resulting in the expression evaluating to false. However, in Bourne Shell /bin/sh a command: not found message will always be written to standard error regardless of terminal output redirection.

This content is not included.Red Hat Bugzilla 1088046 has been captured requesting that an alternative method be used to test for the presence of numactl.

Diagnostic Steps

  • What is the output from the following command:

      which numactl; echo $?
    

    If the commands output indicates that numactl can not be found but is followed by a 0, this will indicate that this issue will apply.

SBR
Category

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.