IBM Support

GenerateKeysForCellProfile script fails when trying to read key.p12 or root-key.p12 during creation of a cell profile

Troubleshooting


Problem

You must specify several parameters to the "manageprofiles" profile creation tool when creating a pair of cell profile types. The parameters must match for each of the profiles in the pair. If the parameters do not match, then the profile creation is most likely to fail during the GenerateKeysForCellProfile task. The script fails when trying to read key.p12 or root-key.p12.

Symptom

Typically, if the parameters for creating a pair of cell profiles do not match, the profile tool fails with errors similar to the examples given below.

  • Application server created first, and deployment manager created second
    The <dmgr_profile_name>_create.log file, located in app_server_root/logs/manageprofiles, shows the following error:

    profileTemplates/cell/dmgr/actions/generateKeysForCellProfile.ant:241: wsadmin task failed with return code :103

    In addition, the keyGeneration.log file, located in app_server_root/logs/manageprofiles/dmgr_profile_name, shows the following error:

    java.io.FileNotFoundException: java.io.FileNotFoundException: dmgr_profile_path/config/cells/cell_name/key.p12 (No such file or directory)

    The keyGeneration.log file appears to be looking for a file which does not exist, because the cell_name specified in the error message is incorrect.

  • Deployment manager created first, and application server created second
    The <app_server_profile_name>_create.log file, located in app_server_root/logs/manageprofiles, shows the following error:

    profileTemplates/cell/default/actions/generateKeysForCellProfile.ant:267: wsadmin task failed with return code :103

    In addition, the keyGeneration.log file, located in app_server_root/logs/manageprofiles/node_profile_name, shows the following error:

    java.io.FileNotFoundException: java.io.FileNotFoundException: dmgr_profile_path/config/cells/cell_name/nodes/node_name/root-key.p12 (No such file or directory)

    The keyGeneration.log file appears to be looking for a file which does not exist. Note that even though this log is created for the application server profile, we see that the file is referenced from a path inside the deployment manager profile.

  • General problem symptoms
    In both cases, the errors indicate that the script named generateKeysForCellProfile.ant is trying to read a file named key.p12 or root-key.p12. The error message in the keyGeneration.log file indicates the path that the profile tool is looking for the file. The path appears to be incorrect, because the path specified is using the wrong cell name or node name as part of the path.

    These problem symptoms suggest that the parameters used for creating the profiles do not match.

Cause

WebSphere Application Server offer a pair of profile types known as the "cell" profile types. The pair of profile types allow you to create a deployment manager ("dmgr") profile and an application server ("default") profile. The application server node is automatically federated to the deployment manager, without a need for starting the deployment manager. Note: This contrasts with the standard deployment manager and application server profile types, which require the deployment manager to be running in order to federate the application server profile's node.

The cell profile types are always created in a pair. One cell profile is a deployment manager, and the other cell profile is an application server. When creating the pair of profiles, you need to be sure to specify the same parameters for each profile. If the parameters do not match, then the profile creation process fails.

The manageprofiles command allows you to omit several profile creation parameters when creating a cell profile type. The omitted values are assigned default values automatically. However, you are only allowed to do this when creating the first cell profile in the pair. As stated in the Information Center documentation for the manageprofiles command, you cannot omit the profile creation parameters when creating the second cell profile in a pair.

Although the manageprofiles command allows you to omit optional parameters when creating the first profile, you should not omit the parameters. When creating the second cell profile in the pair, you must look up the first profile's values which were assigned by default, and then specify those values as the parameters for the second cell profile. This is overly complicated and defeats the intended purpose of simplifying the profile creation process. It is better to provide all the parameters for both profiles in the pair, regardless of whether the parameters are considered "optional".

Resolving The Problem

When creating a pair of cell profile profile types, be sure to specify all of the following values for each profile, following the guidance provided in the table below.

For further details about each parameter, refer to the Information Center documentation for the manageprofiles command:


Remember: This technote recommends that all of these parameters should be specified for both profiles in the pair of cell profiles. Even if a parameter is something applicable to the deployment manager (such as -dmgrProfilePath), the parameter should be specified for the application server profile type as well.


ParameterDescription
-templatePathDirectory path to the template files. Use an absolute path to the directory. Use the following templates:
Deployment manager: profileTemplates/cell/dmgr
Application server: profileTemplates/cell/default
-profileNameProfile name. Use a unique value for each profile in the pair of profiles.
-dmgrProfilePathDeployment manager profile path. This is the directory in which the deployment manager profile will be created.
-nodeProfilePathApplication server (node) profile path. This is the directory in which the node profile will be created.
-cellNameCell name. This is the cell name used for both the deployment manager and node.
-nodeNameNode name for deployment manager. This should be different than the appServerNodeName.
-appServerNodeNameNode name for the application server. This should be different than the deployment manager's node name.
-portsFileLocation of the deployment manager ports specification file. This file sets the port values to use for the deployment manager. Refer to the Information Center article linked above for details.
-nodePortsFileLocation of the application server ports specification file. This file sets the port values to use for the application server. Refer to the Information Center article linked above for details.
-hostNameHostname. This is the hostname associated with both profiles.


Example of a cell profile creation
This example shows both commands necessary to create the pair of profiles in a cell profile. These examples use UNIX-style conventions, but can be easily changed to Windows-style conventions.

First command, create the deployment manager:

./manageprofiles.sh -create \
   -templatePath WAS_HOME/profileTemplates/cell/dmgr \
   -profileName CellDmgrProfile \
   -dmgrProfilePath WAS_HOME/profiles/CellDmgrProfile \
   -nodeProfilePath WAS_HOME/profiles/CellNodeProfile \
   -cellName myhostCell01 \
   -nodeName myhostCell01manager \
   -appServerNodeName myhostNode01 \
   -portsFile /path/dmgr.ports.properties \
   -nodePortsFile /path/node.ports.properties \
   -hostName myhost.company.com

Second command, create the application server:

./manageprofiles.sh -create \
   -templatePath WAS_HOME/profileTemplates/cell/default \
   -profileName CellNodeProfile \
   -dmgrProfilePath WAS_HOME/profiles/CellDmgrProfile \
   -nodeProfilePath WAS_HOME/profiles/CellNodeProfile \
   -cellName myhostCell01 \
   -nodeName myhostCell01manager \
   -appServerNodeName myhostNode01 \
   -portsFile /path/dmgr.ports.properties \
   -nodePortsFile /path/node.ports.properties \
   -hostName myhost.company.com

Note: The backslash characters ( \ ) after each line is a UNIX-style convention which indicates that the command continues to the next line. By using this convention, it is possible to copy and paste these commands directly to a script.

Important: If you copy these commands to a script, be sure that the dash ( - ) characters listed above are properly represented as dash characters, and have not been changed to "en dash" characters by your browser. In some text editors, the "en dash" character appears exactly the same as a standard dash character, but they are actually different characters and can cause a command to fail if they are improper characters.


Alternative recommendations
There are several ways to simplify the process of creating profiles for a cell:
  • Use the graphical Profile Management Tool to create the cell profiles. The graphical Profile Management Tool automatically coordinates the values between the two profiles in the pair. (Note that the graphical Profile Management Tool is not available for some versions of the product.)

  • Avoid the cell profile types entirely. Instead, create standard deployment manager and application server profile types. Those profile types are not subject to the limitations and complications subject to cell profile types.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Install","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.5.5;8.5;8.0;7.0;6.1","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Product":{"code":"SS7JFU","label":"WebSphere Application Server - Express"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Install and migration","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.0;6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21421917