Sun Cluster Data Service for Sun Java System Application Server Guide for Solaris OS

Installing and Configuring Sun Java System Application Server

This section describes installation of the Sun Java System Application Server. Only the information that is specific to the Sun Cluster HA for Sun Java System Application Server is included here. See the Sun Java System Application Server documentation for detailed installation instructions, including patch requirements.

ProcedureHow to Configure and Activate Network Resources for a Failover Configuration

If you configure Sun Java System Application Server as a failover service, you must set up the network resources before you install and configure the Sun Java System Application Server. The failover service uses these network resources after installation and configuration in order to run in a cluster.

To perform this procedure, you need the following information about your configuration.


Note –

Perform this procedure on any cluster member.


  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorization.

  2. Verify that all of the network addresses that you use have been added to your name service database.

    You should have performed this verification during the Sun Cluster installation. See the planning chapter in the Sun Cluster Software Installation Guide for Solaris OS.


    Note –

    To avoid name service look-up failures, ensure that all of the logical hostnames are present in the /etc/inet/hosts file on all of the cluster nodes. Configure name service mapping in the /etc/nsswitch.conf file on the servers to check the local files before trying to access NIS, NIS+, or DNS.


  3. Create a failover resource group to contain the network and application resources.


    # clresourcegroup create [-n node-zone-list] resource-group
    
    resource-group

    Specifies the name of the resource group. This name can be your choice.

    [-n node-zone-list]

    Specifies a comma-separated, ordered list of zones that can master this resource group. The format of each entry in the list is node. In this format, node specifies the node name and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.

  4. Add network resources to the resource group.

    Use the following command to add a logical hostname to a resource group.


    # clreslogicalhostname create -g resource-group -h hostname,…[-N netiflist]
    -g resource-group

    Specifies the name of the resource group.

    -h hostname, …

    Specifies a comma-separated list of network resources.

    -N netiflist

    Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node or zone. The format of each entry in the list is netif@node. The replaceable items in this format are as follows:

    netif

    Specifies an IPMP group name, such as sc_ipmp0, or a public network interface card (NIC). If you specify a public NIC, Sun Cluster attempts to create the required IPMP groups.

    node

    Specifies the name or ID of a node. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, Sun Cluster attempts to create the required IPMP groups.


    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.



    Note –

    Sun Cluster does not currently support the use of the adapter name for netif.


  5. Bring the resource group online.


    # clresourcegroup online resource-group
    

ProcedureHow to Install and Configure the Sun Java System Application Server

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.

  2. Determine if you are installing the Sun Java System Application Server on Solaris 8.

    • If no, proceed to Step 4.

    • If yes, perform the following operations.

    1. Run the setup command from the install directory for the Sun Java System Application Server on all cluster nodes.

    2. Provide the default location for Sun Java System Application Server instances at the setup command prompt.

      Place the server configuration directory on a local filesystem by using the default directory, /var/opt/SUNWappserver7. When you create server instances that are managed by Sun Cluster, specify a path to the global file system or HAStoragePlus file system. Ensure that all potential masters of a Sun Java System Application Server instance have access to the Sun Java System Application Server instance configuration files.


      Note –

      The domain created by the setup command cannot be used by Sun Cluster.


  3. If you are installing the Sun Java System Application Server on Solaris 8 or installing the Sun Java System Application Server Enterprise Edition that is not packaged with Solaris 9, proceed to Step 5.

  4. If you are installing the Sun Java System Application Server packaged with Solaris 9, perform the following operations:

    1. Install the Sun Java System Application Server package on all the nodes of the cluster.

    2. Identify a location on a global file system where you intend to keep the application server configuration files.

      You can create a separate directory for this file system.

  5. (Optional) On all nodes, create a link to the server configuration directory on the global file system from the default configuration directory.

    You can either create a link to the server configuration directory or specify the full path to the location on the global file system when you create the Sun Java System Application Server domains in Step 8.

    • To create a link for the Sun Java System Application Server packaged with Solaris 9, the following command is run.


      # ln -s /global/appserver /var/appserver
      
    • To create a link for the unpackaged Sun Java System Application Server, the following command is run.


      # ln -s /global/appserver /var/opt/SUNWappserver7
      
  6. If you are installing the Sun Java System Application Server on Solaris 8, proceed to Step 8.

  7. If you are installing the Sun Java System Application Server packaged with Solaris 9, perform the following operations on all nodes:

    1. List the Sun Java System Application Server run control scripts.


      # ls -1 /etc/rc?.d/*appserv
      /etc/rc0.d/K05appserv
      /etc/rc1.d/K05appserv
      /etc/rc2.d/K05appserv
      /etc/rc3.d/S84appserv
      /etc/rcS.d/K05appserv
    2. Rename the Sun Java System Application Server run control scripts.

      Renaming the run control scripts disables the START and STOP run control scripts that you installed as part of the SUNWasr package (or the SUNWasro package if the unbundled Sun Java System Application Server was installed). This step is necessary because Sun Cluster HA for Sun Java System Application Server starts and stops the Sun Java System Application Server instances after you have configured the data service.


      # mv /etc/rc0.d/K05appserv  /etc/rc0.d/k05appserv
      # mv /etc/rc1.d/K05appserv  /etc/rc1.d/k05appserv
      # mv /etc/rc2.d/K05appserv  /etc/rc2.d/k05appserv
      # mv /etc/rc3.d/S85appserv  /etc/rc3.d/s85appserv
      # mv /etc/rcS.d/K05appserv  /etc/rcS.d/k05appserv

      Note –

      The preceding example changes the first letter in the name of the run control script from uppercase to lowercase. However, you can rename the scripts to be consistent with your normal administration practices.


    3. Verify that all of the Sun Java System Application Server run control scripts have been renamed.


      # ls -1 /etc/rc?.d/*appserv
      /etc/rc0.d/k05appserv
      /etc/rc1.d/k05appserv
      /etc/rc2.d/k05appserv
      /etc/rc3.d/s85appserv
      /etc/rcS.d/k05appserv
  8. Create a domain with configuration information on the global file system.


    # asadmin create-domain --path /global/appserver/domains \
    --adminport=4848 --adminuser admin --adminpassword password scdomain
    
  9. Start the domains administrative server.


    # /global/appserver/domains/scdomain/admin-server/bin/startserv
    
  10. Create new application server instances to be made highly available by using the administrative server.

  11. Create a log directory on the local disk for each node that the Sun Java System Application Server instance uses.

    For the Sun Java System Application Server instance to work correctly, the log directory must be located on each node of the cluster, not on the cluster file system. Choose a location on the local disk that is the same for all the nodes in the cluster.


    schost-1# mkdir -p /var/pathname/domain/instance/logs/
    

    Note –

    If you anticipate large log files, ensure that the file system containing the directory has enough space to handle the files.


  12. Change the location of the Sun Java System Application Server instance PidLog to reflect the directory that you created in Step 11. To change the location, edit the init.conf file located in the server configuration directory.

  13. Change the location of PID_FILE in the stopserv file to match the value of PidLog that you set in Step 12.

  14. Change the location of the Log File, Log Root, and Transaction Log Location parameters to reflect the directory that you created in Step 11. To change these parameters, use the Sun Java System Application Server Administrative Interface. For instructions on configuration, see the Sun Java System Application Server documentation.

  15. Change the location of the accesslog parameter to reflect the directory that you created in Step 11. To change this parameter, use the asadmin utility. See the Sun Java System Application Server documentation for instructions.

  16. Ensure that any logical hostnames that the application server uses are configured and are online.

  17. If the application server is configured as a failover service, configure the HTTP listener IP address with the logical IP address and the server name with the logical hostname. If the application server is configured as a service mastered on multiple nodes, proceed to Step 19.

    This operation must be performed on the primary node of the logical host.

  18. If the application server is configured as a service mastered on multiple nodes, configure the HTTP listener IP address to 0.0.0.0 and Return Server Name to localhost.

  19. Verify that the HTTP listener is returning the correct server name.

    The correct server name is usually the hostname that clients will use to access the resources on the application server.

  20. If the application server is configured as a failover service, configure the IIOP listener with the logical IP address for the Sun Cluster HA for Sun Java System Application Server instance. If the application server is configured as a service mastered on multiple nodes, proceed to Step 21.

    If the administrative server is to be made highly available, configure only the HTTP listener, the administrative server does not have an IIOP listener.

  21. Disable the Sun Java System Application Server startup of the Message Queue server by unchecking Start Enable for the services under JMS.

  22. Start the application server by issuing the startserv command.


    # /global/appserver/domains/scdomain/server1/bin/startserv
    

    If the server does not start, correct the problem. See the Sun Java System Application Server documentation for details.

  23. Stop the application server by issuing the stopserv command.


    # /global/appserver/domains/scdomain/server1/bin/stopserv
    

    You must stop the server before you proceed to the next part of the installation and configuration process.