wasprofile command

The wasprofile command line tool creates all Application Server runtime environments in Version 6. The command creates a profile, which is the set of files that define the runtime environment for a stand-alone application server.

You can also use the profile creation tool graphical user interface to create and manage profiles.




Related information
Using command line tools

Introduction to terms that describe Version 6 profiles

The wasprofile command creates the runtime environment for a WebSphere Application Server process in a set of files called a profile. The profile defines the runtime environment and includes all of the files that the server processes in the runtime environment can change.

The profile creation tool and its graphical user interface, the Profile creation wizard, are the only ways to create runtime environments in V6.

The Profile creation wizard is an InstallShield for Multiplatforms (ISMP) application. You can use the wizard to enter most of the parameters that are described in this topic. Some parameters, however, require you to use the wasprofile command. You must use the wasprofile command to delete a profile, for instance, because the Profile creation wizard does not provide a deletion function.

However, the Profile creation wizard also performs tasks that the wasprofile command does not. For instance, the wizard can create a Windows service for each profile that it creates. It can also assign non-conflicting ports based on previous Version 6 port assignments.

Location of the wasprofile script

The command file is located in the app_server_root/bin directory.

The command file is a script named:
  • [Linux] [AIX HP-UX Solaris] wasprofile.sh
  • [Windows] wasprofile.bat

The Profile creation wizard is the graphical user interface to the command line tool. The file name of the command that calls the Profile creation wizard varies per operating system platform. See Creating profiles using the graphical user interface for more information.

Logging

The wasprofile command creates a log for every profile that it creates. The logs are in the app_server_root/logs/wasprofile directory. The files are named in this pattern: profile_name_create.log.

The command also creates a log for every profile that it deletes. The logs are in the app_server_root/logs/wasprofile directory. The files are named in this pattern: profile_name_delete.log.

Concurrent profile creation

Important: Concurrent profile creation is not supported at this time for one set of core product files. Concurrent attempts to create profiles result in a warning about a profile creation already in progress.
[Linux] [AIX HP-UX Solaris]

Entering lengthy commands on more than one line

The length of the wasprofile command cannot exceed the normal shell window limit for one line of 256 characters. If your command is longer than the limit, issue the command on multiple lines by ending a line with a backward slash, pressing Enter, and continuing the command on the next line.

For example, on a Solaris system, the following command requires input on multiple lines:
./wasprofile.sh \
-create -profileName bladetcb6profile \
-profilePath /usr/IBM/WebSphere/AppServer/profiles/bladetcb6profile \
-templatePath /usr/WebSphere/AppServer/profileTemplates/default \
-nodeName bladetcb6node \
-cellName bladetcb6Cell \
-hostName bladetcb6.rtp.raleigh.ibm.com

Omit the line continuation character from the last line to signal the end of the command to the operating system.

[Linux] [AIX HP-UX Solaris]

wasprofile.sh command syntax

Get help for the command:
# ./wasprofile.sh -help

# ./wasprofile.sh -augment -help
                 
# ./wasprofile.sh -create -help
# ./wasprofile.sh -create -templatePath fully_qualified_path/dmgr -help
# ./wasprofile.sh -create -templatePath fully_qualified_path/default -help
# ./wasprofile.sh -create -templatePath fully_qualified_path/managed -help
                 
# ./wasprofile.sh -delete -help
                 
# ./wasprofile.sh -getName -help

# ./wasprofile.sh -getPath -help
                 
# ./wasprofile.sh -unaugment -help
                 
# ./wasprofile.sh -validateRegistry -help

# ./wasprofile.sh -validateAndUpdateRegistry -help

List existing profiles:
# ./wasprofile.sh -listProfiles 
                 [-debug]
                 
Delete profiles:
# ./wasprofile.sh -delete 
                  -profileName profile_name                
Create new profiles:
# ./wasprofile.sh -create 
              -profileName profile_name 
              -profilePath fully_qualified_profile_path 
              -templatePath template_path 
              -nodeName node_name 
              -cellName cell_name 
              -hostName host_name 
             [-isDefault]
             [-startingPort starting_port | -portsFile file_path]
             [-debug] 
             
Get the name of an existing profile from its path:
# ./wasprofile.sh -getName 
                 -profilePath profile_path 
                [-debug] 
                
Get the path of an existing profile from its name:
# ./wasprofile.sh -getPath 
                 -profileName profile_name 
                [-debug] 
                
Check the integrity of the profile registry:
# ./wasprofile.sh -validateRegistry 
                [-debug] 
                
Check the integrity of the profile registry, removing profiles that are not found:
# ./wasprofile.sh -validateAndUpdateRegistry 
                 [-backup file_name] 
                 [-debug] 
                
Update an existing profile with an augmentation template file:
# ./wasprofile.sh -augment 
              -profileName  profile_name 
              -templatePath fully_qualified_template_path
Remove the most recent augmentation for a profile:
# ./wasprofile.sh -unaugment 
              -profileName profile_name 
[Windows]

wasprofile.bat command syntax

Get help for the command:
# ./wasprofile.bat -help

# ./wasprofile.bat -augment -help
                 
# ./wasprofile.bat -create -help
# ./wasprofile.bat -create -templatePath fully_qualified_path\dmgr -help
# ./wasprofile.bat -create -templatePath fully_qualified_path\default -help
# ./wasprofile.bat -create -templatePath fully_qualified_path\managed -help
                 
# ./wasprofile.bat -delete -help
                 
# ./wasprofile.bat -getName -help

# ./wasprofile.bat -getPath -help

# ./wasprofile.bat -unaugment -help
                 
# ./wasprofile.bat -validateRegistry -help

# ./wasprofile.bat -validateAndUpdateRegistry -help

List existing profiles:
# ./wasprofile.bat -listProfiles 
             [-debug]
             
Delete profiles:
# ./wasprofile.bat -delete 
              -profileName profile_name | -profilePath profile_path 
             [-debug] 
             
Create new profiles:
# ./wasprofile.bat -create 
              -profileName profile_name 
              -profilePath fully_qualified_profile_path 
              -templatePath template_path 
              -nodeName node_name 
             [-cellName cell_name] 
              -hostName host_name 
             [-isDefault]
             [-startingPort starting_port | -portsFile file_path]
             [-winserviceCheck true | false]
             [-winserviceAccountType specified_user | localsystem]
             [-winserviceUserName your_user_name]
             [-winservicePassword your_password]
             [-winserviceStartupType manual | automatic | disabled]
             [-debug] 
             

When the -startingPort parameter is not used, the profile creation tool uses the default port settings specified in the serverindex.xml file.

Get the name of an existing profile from its path:
# ./wasprofile.bat -getName 
               -profilePath fully_qualified_profile_path 
              [-debug] 
             
Get the path of an existing profile from its name:
# ./wasprofile.bat -getPath 
               -profileName profile_name 
              [-debug] 
             
Check the integrity of the profile registry:
# ./wasprofile.bat -validateRegistry 
             [-debug] 
             
Check the integrity of the profile registry, removing any unfound profiles:
# ./wasprofile.bat -validateAndUpdateRegistry 
             [-backup file_name] 
             [-debug] 
             
Update existing profile with an augmentation template file:
# ./wasprofile.bat -augment 
               -profileName  profile_name 
               -templatePath fully_qualified_template_path
Remove the most recent augmentation for a profile:
# ./wasprofile.bat -unaugment 
               -profileName  profile_name 

For specific examples of creating a profile, see the Example: Using commands to create profiles section.

Parameters

Supported arguments include:
-augment
Use the augment parameter to make changes to an existing profile with an augmentation template. The augment parameter causes wasprofile to update or augment the profile identified in the profileName parameter using the template in the templatePath parameter. The augmentation templates that you can use are determined by which IBM products and versions are installed in your environment.
Note: The templates that are included with WebSphere Application Server should only be used to create profiles and not to augment existing profiles. Also, do not manually modify the files that are located in the install_dir/ profileTemplates directory. For example, if you are modifying the ports during profile creation, use the Profile Creation Wizard or the -startingPort or -portsFile arguments to the wasprofile command instead of modifying the file in the profile template directory.

When the augment action is invoked, the wasprofile command attempts to access the actionRegistry.xml file in the specified template path. The operations defined in the Config Actions stanza in the action registry file are then applied against the specified profile.

Specify the fully qualified file path for -templatePath. Specifying a relative file path for the -templatePath parameter results in the specified profile not being fully augmented.

See also the unaugment parameter.

-cellname cell_name
Specifies the cell name of the profile. Use a unique cell name for each profile.

This is an optional parameter for WebSphere Application Server.

If you omit the parameter, a default cell name is assigned.

-create
Creates the profile.
Specify wasprofile -create -templatePath fully_qualified_file_path_to_template -help for specific information about creating a profile. Available templates include:
  • dmgr - Deployment manager
  • default - Stand-alone application server
  • managed - Custom node
-debug
Turns on the debug function of the Ant utility, which the wasprofile command uses.
-delete
Deletes the profile. Deleting a profile does not delete the profile directory. For example, suppose that you create a profile in the /usr/WebSphere/AppServer/profiles/managedProfile directory. The directory remains after you delete the profile.

Unaugment any augmentations that you have made before deleting the profile.

You can delete or leave the directory. However, the profile_dir/logs directory contains information about uninstalling the profile. For example, you might retain the _nodeuninst.log file to determine the cause of any problem during the uninstall procedure.

The delete parameter does not perform an unaugment automatically. You must perform an unaugment manually before deleting the profile.

-getName
Gets the name for a profile registered at a given -profilePath parameter.
-getPath
Gets the file system location for a profile of a given name. Requires the –profileName parameter.
-help
Displays command syntax.
-hostName host_name
Specifies the host name where you are creating the profile. This should match the host name that you specified during installation of the initial product.
-isDefault
Specifies that the profile identified by the accompanying -profileName parameter is to be the default profile once it is registered. When issuing commands that address the default profile, it is not necessary to use the -profileName attribute of the command.
-listProfiles
Llists all defined profiles.
-nodeName node_name
Specifies the node name for the node that is created with the new profile. Use a unique value or on the machine. Each profile that shares the same set of product binaries must have a unique node name.
-portsFile file_path
An optional parameter that specifies the path to a file that defines port settings for the new profile. When omitted, the wasprofile tool looks for the app_server_root/profileTemplates/profile_type/actions/portsUpdate/portdef.props file.

Do not use this parameter when using the -startingPort parameter.

-profileName profile_name
Specifies the name of the profile. Use a unique value when creating a profile. Each profile that shares the same set of product binaries must have a unique name.
-profilePath profile_path
Specifies the fully qualified path to the profile.

[Windows] If the fully qualified path contains spaces, enclose the value in quotation marks.

-startingPort startingPort
Specifies the starting port number for generating all ports for the profile. If not specified, the wasprofile command uses default ports specified in the serverindex.xml file.

Do not use this parameter with the -portsFile parameter.

-templatePath template_path
Specifies the directory path to the template files in the installation root directory.

Within the profileTemplates directory are various directories that correspond to different profile types and that vary with the type of product installed.

The profile directories are the paths that you indicate while using the -templatePath option.

You can specify profile templates that lie outside the installation root, if you happen to have any.

If you specify a relative path, the specified template location defaults to the app_server_root/profileTemplates directory.

For example, the following paired specifications each point to the same template path:

[AIX]
-templatePath /usr/WebSphere/AppServer/profileTemplates/default
[Linux] [HP-UX] [Solaris]
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default
[Windows]
-templatePath C:\Program Files\IBM\WebSphere\AppServer\profileTemplates\default
-unaugment
Augmentation is the ability to apply a changed template to an existing profile. When you unaugment an existing profile that has been augmented, the changes are backed out according to the previously specified profile template. If a series of wasprofile augmentations were performed, then the unaugment action will undo the last augment action first.

When the unaugment action is invoked, wasprofile attempts to access the deleteRegistry.xml file in the template path that was specified in the augment command. The operations defined in the Config Actions stanza in the delete registry file are then applied against the specified profile.

See also the augment parameter.

-validateAndUpdateRegistry
Checks all of the profiles that are listed in the profile registry to see if the profiles are present on the file system. Removes any missing profiles from the registry. Returns a list of the missing profiles that were deleted from the registry.
-validateRegistry
Checks all of the profiles that are listed in the profile registry to see if the profiles are present on the file system. Returns a list of missing profiles.
-winserviceAccountType type_of_owner_account [Windows]
The type of the owner account of the Windows service created for the profile can be either a specified user name or the value, localsystem. The localsystem value runs the Windows service under the local account of the user who creates the profile.
-winserviceCheck value [Windows]
The value can be either true or false. Specify true to create a Windows service for the server process that is created within the profile. Specify false to not create the Windows service.
-winservicePassword your_password [Windows]
Specify the password for the specified user or the local account that is to own the Windows service.
-winserviceStartupType startup_type [Windows]
Possible startup_type values are:
  • manual
  • automatic
  • disabled
-winserviceUserName user_ID [Windows]
Specify your user ID so that Windows can verify you as an ID that is capable of creating a Windows service. Your user ID must belong to the administrator group and have the following advanced user rights:
  • Act as part of the operating system
  • Log on as a service

Use case scenarios

Use cases are a description of common tasks for which the tool is used.

Scenario: Deleting a profile

The following command is on more than one line for clarity. Enter the command on one line to delete the profile named shasti:

wasprofile.sh -delete
                     -profileName shasti 

Scenario: Using predefined port numbers

When you use the wasprofile tool without the -startingPort parameter, the tool uses the app_server_root/profileTemplates/profile_type/actions/portsUpdate/portdef.props file to set the initial ports.

Example

Copy the file, edit the port settings, and use your copy by using the -portsFile parameter as shown in the following example:
wasprofile.bat 
   -create
   -profileName Wow_Profile 
   -profilePath 
       profile_root 
   -templatePath 
       app_server_root\profileTemplates\default 
   -nodeName Wow_node 
   -cellName Wow_cell
   -hostName lorriemb 
   -portsFile C:\temp\ports\portdef.props 
Suppose that the portdef.props file has the following values:
WC_defaulthost=39080
WC_adminhost=39060
WC_defaulthost_secure=39443
WC_adminhost_secure=39043
BOOTSTRAP_ADDRESS=32809
SOAP_CONNECTOR_ADDRESS=38880
SAS_SSL_SERVERAUTH_LISTENER_ADDRESS=39401
CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS=39403
CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS=39402
ORB_LISTENER_ADDRESS=39100
DCS_UNICAST_ADDRESS=39353
SIB_ENDPOINT_ADDRESS=37276
SIB_ENDPOINT_SECURE_ADDRESS=37286
SIB_MQ_ENDPOINT_ADDRESS=35558
SIB_MQ_ENDPOINT_SECURE_ADDRESS=35578
The resulting serverindex.xml file looks similar to the following example:
<?xml version="1.0" encoding="UTF-8"?>
<serverindex:ServerIndex xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 
...
   <specialEndpoints xmi:id="NamedEndPoint_..." 
                                         endPointName="BOOTSTRAP_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="32809"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                   endPointName="SOAP_CONNECTOR_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="38880"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                   endPointName="SAS_SSL_SERVERAUTH_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39401"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                  endPointName="CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39403"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                 endPointName="CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39402"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                      endPointName="WC_adminhost">
      <endPoint xmi:id="EndPoint_..." host="*" port="39060"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                    endPointName="WC_defaulthost">
      <endPoint xmi:id="EndPoint_..." host="*" port="39080"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                  endPointName="DCS_UNICAST_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39353"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                endPointName="WC_adminhost_secure">
      <endPoint xmi:id="EndPoint_..." host="*" port="39043"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                endPointName="WC_defaulthost_secure">
      <endPoint xmi:id="EndPoint_..." host="*" port="39443"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                               endPointName="SIB_ENDPOINT_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="37276"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                         endPointName="SIB_ENDPOINT_SECURE_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="37286"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                              endPointName="SIB_MQ_ENDPOINT_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="35558"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                       endPointName="SIB_MQ_ENDPOINT_SECURE_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="35578"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..." 
                                endPointName="ORB_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39100"/>
    </specialEndpoints>
  </serverEntries>
</serverindex:ServerIndex>

The wasprofile command creates a copy of the current portdefs.props file in the profile_root\logs directory.

Do not use the portsFile parameter when using the startingPort parameter. The two parameters are mutually exclusive.

Scenario: Incrementing default port numbers from a starting point

The wasprofile command can assign port numbers based on a starting port value that you give on the command line, using the -startingPort parameter. The tool assigns port numbers sequentially from the starting port number value.

The order of port assignments is arbitrary. Predicting assignments is not possible.

For example, ports created with -startingPort 20002 would appear similar to the following example:

Assigned ports for an Application Server profile

WC_defaulthost=20002
WC_adminhost=20003
WC_defaulthost_secure=20004
WC_adminhost_secure=20005
BOOTSTRAP_ADDRESS=20006
SOAP_CONNECTOR_ADDRESS=20007
SAS_SSL_SERVERAUTH_LISTENER_ADDRESS=20008
CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS=20009
CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS=20010
ORB_LISTENER_ADDRESS=20011 
DCS_UNICAST_ADDRESS=20012
SIB_ENDPOINT_ADDRESS=20013
SIB_ENDPOINT_SECURE_ADDRESS=20014
SIB_MQ_ENDPOINT_ADDRESS=20015
SIB_MQ_ENDPOINT_SECURE_ADDRESS=20016

Example

The following example of using the wasprofile command creates ports from an initial value of 20002, with the content shown in the previous example:
wasprofile.bat -create
               -profileName shasti 
               -profilePath profile_root 
               -templatePath template_path 
               -nodeName W2K03 
               -cellName W2K03_Cell01
               -hostName planetnt 
               -startingPort 20002 
                            

Example: Using commands to create profiles

The following examples show how to create profiles using the wasprofile command.

Issue the command in any of the following examples on one line. Each example shows the command on more than one line to increase clarity.

Creating a stand-alone application server profile

Create an application server profile named Default01 with the following command:

[Windows]
app_server_root\bin wasprofile -create 
				-profileName Default01 
				-profilePath profile_root
				-templatePath app_server_root\profileTemplates\default 
				-nodeName Default01Node
				-cellName Default01Cell
				-hostName myhost.mycity.mycompany.com
				-isDefault false
				-winserviceCheck true
				-winserviceAccountType user
				-winserviceUserName my_user_id
				-winservicePassword my_password
				-winserviceStartupType manual
				-startingPort 21000
[Linux] [AIX HP-UX Solaris]
app_server_root/bin/wasprofile.sh -create 
   -profileName Default01
   -profilePath profile_root
   -templatePath app_server_root/profileTemplates/default
   -nodeName Default01Node
   -cellName Default01Cell
   -hostName myhost.mycity.mycompany.com
   -isDefault
   -startingPort 21000



Reference topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 5:25:00 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-base-dist&topic=rxml_wasprofile
File name: rxml_wasprofile.html