Troubleshoot > Troubleshooting: Server startup

Troubleshooting: Server startup

This section provides some basic information about anticipating and correcting issues related to server startup. Some of these issues include:

  • Server will not start
  • Bad version number in .class file
  • Failed to initialize or attach to shared memory environment (Windows only)
  • Unable to attach to shared memory (Linux only)
  • Java buffer size errors occur in the server log

Troubleshooting: Server does not start

Possible causes:

  • Incorrect database connection configuration
  • Unsupported JRE version
  • License issues: The license has expired or is not valid

Incorrect database connection configuration

If you are unable to start Service Manager from the command prompt, review your configuration in the sm.ini file and confirm that you have the correct database connection information, login, and password, using the instructions in Service Manager Installation.

Tip Make sure that the following parameters are configured correctly in the sm.ini file: sqldb, sqllogin, and sqldictionary.

The Service Manager server starts as a Windows service by default. If the server starts from the command line, but not as a Windows service, uncomment the following line in the sm.cfg file to produce an output file which may contain some information from the Java JVM.

#cmd /c "sm" > C:\\process_stdout 2>&1

You can change the name and location of the output file by changing "C:\\process_stdout" to the path and file name you prefer. Using "C:\\process_stdout.log" creates a file called process_stdout.log at the root of the C drive. Once you have done this, try starting the server as a service. Any Java errors that occur will show up in the file and folder you specified.

Unsupported version of JRE

If you have installed a version of Java Runtime Environment (JRE) that is not supported, the server displays the following error message:

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

Install a supported version of the JRE as indicated in the Service Manager Support Matrix.

License issues

The IP address of the first host on which the Service Manager Server starts up must be defined in the grouplicenseip parameter in the sm.ini file, and the license must be bound to this IP address.

Review the sever log file (sm.log) to check for license issues. A typical eye catcher is that shared memory could not be created, which may be a consequence of license issues.

Troubleshooting: Bad version number in .class file

The Service Manager server requires a proper Java run-time environment (JRE) to start. If the server does not start and you receive a "Bad version number in .class file" error message, then your system does not have the proper version of the JRE installed.

Service Manager installations on Windows should already include the proper JRE necessary to start the server. If you receive this error on a Windows system, you may need to reinstall the server to get the proper JRE version.

Installations on Linux require you to provide your own JRE. Install a proper version of JRE as directed by the Service Manager Installation and the Service Manager Support Matrix.

Troubleshooting: Failed to initialize or attach to shared memory environment (Windows only)

If the Service Manager server does not start and you receive a "Failed to initialize or attach to shared memory environment" error message, then your Windows system has one of two issues:

  • There is not enough free contiguous memory available to initialize Service Manager
  • The address Service Manager attempted to use for shared memory was already in use by a shared library (DLL), dynamic memory (heap), or another data structure

Review the sm.log file and search for one of the following RTE error messages:

Type of error Error Message
Insufficient free memory RTE E Error 8 in call MapViewOfFileEx - Not enough storage is available to process this command.
Address already in use RTE E Error 487 in call MapViewOfFileEx - Attempt to access invalid address.

Insufficient free memory

Out-of-box, Service Manager analyzes the memory layout of the process address space and identifies free memory ranges big enough to hold shared memory. If Service Manager could not find any contiguous piece of memory large enough to contain your Service Manager shared memory, the system fails to start with the following error messages:

RTE E Error 8 in call MapViewOfFileEx - Not enough storage is available 
to process this command.
...
RTE E No valid shared_memory_address parameter setting was found for a 
shared memory size of nnnnnnnnnn (NNNN MB)

In order to fix this issue, you must reduce the amount of shared memory.

Address already in use

When a Service Manager process attaches to shared memory, it has to use the same address as the shared memory was originally created with. The process might find that that address is already occupied by another data structure such as a DLL or dynamic memory (heap). The same scenario might happen if you use the shared_memory_address parameter, but the address specified in the parameter is already occupied.

If you had previously specified a shared memory address with the shared_memory_address parameter, we recommend you remove the parameter and have Service Manager automatically determine a suitable memory address. The current best practice is to only specify a shared_memory_address value if the automatic assignment fails.

After this type failure, the system will scan your system memory searching for a memory range that is large enough to contain Service Manager's shared memory. If the scan finds a suitable memory range it lists it in the log file with the following RTE information messages:

6116(  2716) 03/05/2010 11:06:41  RTE E shmat: MapViewOfFileEx failed
6116(  2716) 03/05/2010 11:06:41  RTE E Error 487 in call MapViewOfFileEx - Attempt to access invalid address.
6116(  2716) 03/05/2010 11:06:41  RTE E sm_init: shmat( 516, 0x73000000, 0 ) failed for size 67108864 and key 0x2A02E500
6116(  2716) 03/05/2010 11:06:41  RTE I List of possible shared_memory_address parameter settings for a shared memory size of 67108864 (64 MB)
6116(  2716) 03/05/2010 11:06:41  RTE I # Free range 0x7FFF0000-0xFFFAD000 size=2147209216 (2047 MB)
6116(  2716) 03/05/2010 11:06:41  RTE I Preferred        : shared_memory_address:0x80000000
6116(  2716) 03/05/2010 11:06:41  RTE I Lowest available : shared_memory_address:0x80000000
6116(  2716) 03/05/2010 11:06:41  RTE I Highest available: shared_memory_address:0xFBFA0000
6116(  2716) 03/05/2010 11:06:41  RTE I For a complete list of available shared_mempory_address settings, run with the debugvmmap parameter.
6116(  2716) 03/05/2010 11:06:41  RTE W !!! Use the preferred shared_memory_address parameter above
6116(  2716) 03/05/2010 11:06:41  RTE W !!! or remove the shared_memory_address parameter completely.
6116(  2716) 03/05/2010 11:06:41  RTE E HP Service Manager is unable to start. Failed to initialize or attach to shared memory environment

The scan lists three possible shared_memory_address values. The first memory address is the preferred shared_memory_address value. This address is the least likely to already be in use by a Windows or Service Manager shared library (DLL), dynamic memory (heap), or another data structure. The next address is the lowest possible address within this range you can use for shared memory. The last address is the highest possible address within this range you can use for shared memory. Pick one of these values for your shared_memory_address and test to see if the system starts.

If your system continues to fail with the address already in use error, you can start the server with the debugvmmap parameter to see a complete list of all address ranges large enough to contain shared memory as well as an address map of all the files that are currently using system memory. The list of memory ranges are in order of suggested use. The address ranges at the top of the list are better candidates than those at the bottom of the list. Within each address range there is a recommended address, lowest possible address, and highest possible address.

2724(  3572) 03/05/2010 11:06:38  RTE I List of all possible shared_memory_address parameter settings for a shared memory size of 67108864 (64 MB)
2724(  3572) 03/05/2010 11:06:38  RTE I # Free range 0x7FFF0000-0xFFFAD000 size=2147209216 (2047 MB)
2724(  3572) 03/05/2010 11:06:38  RTE I Preferred        : shared_memory_address:0x80000000
2724(  3572) 03/05/2010 11:06:38  RTE I Lowest available : shared_memory_address:0x80000000
2724(  3572) 03/05/2010 11:06:38  RTE I Highest available: shared_memory_address:0xFBFA0000
2724(  3572) 03/05/2010 11:06:38  RTE D # Free range 0x122B5000-0x30000000 size= 500477952 ( 477 MB)
2724(  3572) 03/05/2010 11:06:38  RTE D                    shared_memory_address:0x20000000
2724(  3572) 03/05/2010 11:06:38  RTE D Lowest available : shared_memory_address:0x122D0000
2724(  3572) 03/05/2010 11:06:38  RTE D Highest available: shared_memory_address:0x2C000000
...
2724(  3572) 03/05/2010 11:06:38  RTE D # Free range 0x77DF0000-0x7C360000 size=  72810496 (  69 MB)
2724(  3572) 03/05/2010 11:06:38  RTE D                    shared_memory_address:0x77E00000
2724(  3572) 03/05/2010 11:06:38  RTE D Lowest available : shared_memory_address:0x77E00000
2724(  3572) 03/05/2010 11:06:38  RTE D Highest available: shared_memory_address:0x78360000
2724(  3572) 03/05/2010 11:06:38  RTE D # Free range 0x039B0000-0x10000000 size= 207945728 ( 198 MB)
2724(  3572) 03/05/2010 11:06:38  RTE D                    shared_memory_address:0x039C0000
2724(  3572) 03/05/2010 11:06:38  RTE D Lowest available : shared_memory_address:0x039C0000
2724(  3572) 03/05/2010 11:06:38  RTE D Highest available: shared_memory_address:0x0C000000
2724(  3572) 03/05/2010 11:06:38  RTE W !!! Use the preferred shared_memory_address parameter above
2724(  3572) 03/05/2010 11:06:38  RTE W !!! or remove the shared_memory_address parameter completely.
2724(  3572) 03/05/2010 11:06:38  RTE E HP Service Manager is unable to start. Failed to initialize or attach to shared memory environment

If the system cannot find any suitable memory ranges, it lists the following RTE error message:

RTE E No valid shared_memory_address parameter setting was found for a 
shared memory size of nnnnnnnnnn (NNNN MB)

If there are no suggested shared memory parameters, you must reduce the amount of shared memory.

Troubleshooting: “Unable to attach to shared memory. 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

We recommend 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.