Troubleshoot > Troubleshooting HPE Service Manager > Troubleshooting: Server startup > Troubleshooting: "Unable to attach to shared memory. HPE Service Manager may be damaged." error (Linux only)

Troubleshooting: “Unable to attach to shared memory. HP Service Manager may be damaged.” error (Linux only)

When executing Service Manager (SM) commands on Linux with a non-SM user account or using the crontab of an SM user account, an error occurs:

"Unable to attach to shared memory. HP Service Manager may be damaged."

Below is an example.

You have installed Service Manager with a specific account (adminsc4 - groups: adminsc4), and you have some verification processes that are scheduled and executed by another account (sdi - groups: dba and adminsc4). Since the group "adminsc4" is the same for both accounts, you are able to execute sm command lines as follows:

  1. Connect to the SM server with the account "sdi".
  2. Run the following command lines:
     su -adminsc4
     cd /soft/sc400/RUN
     sm –reportshm

The above described error occurs.

Rootcause

The system parameters in /etc/security/limits.conf of Linux control the resources that are available to a user or group, and may affect Service Manager’s behavior. When certain parameter values defined for a Service Manager user or for the group to which the user belongs are too low, Service Manager may fail to execute commands or even fail to start the servlet.

Since a non-SM user may execute the “su” command to run shell with a substituted SM user, the resource control of the non-SM user may or may not affect Service Manager’s behavior after the user substitutes the SM user, depending on the implementation of the Linux kernel.

Workaround

HPE recommends that you use a Service Manager user directly to perform any SM related operations on Linux.

If failures occur when starting an SM servlet or executing SM commands, you are recommended to check the parameters in /etc/security/limits.conf.

To do a diagnostic check:

  1. Set a parameter in /etc/security/limits.conf to “unlimited”.
  2. Restart the system.
  3. Perform the operation. If this solves the previous issue, the conclusion can be made that this limit parameter was set to a value that was too low and caused the failure.

To identify which parameter caused the problem, repeat the above steps for the parameters one by one until the problem is solved.

When the problematic parameter is identified, set it to a higher value appropriate to your Service Manager system. It is difficult to provide an accurate value for each parameter. The right value only depends on your system load. For this reason, you may need to repeat the step for each parameter and repeat until you get the correct value.