Hitachi

Hitachi Application Server V10 User's Guide (For Windows® Systems)


9.10 Scaling out the system

You can scale out a system by adding Application Server to a new computer (new server) when an increase in work load is required or to make preparations for an expected increase in work load. To scale out a system, install Application Server on the new server, specify settings to connect the localhost of the new server to the remote hosts of the existing servers, and then set up Application Server.

Prerequisites

Intended users

Procedure

  1. Install Application Server on the new server.

  2. Enable the settings to use DCOM on remote hosts in Windows environments and on localhosts for new servers.

    1. In Run of the Start menu, enter dcomcnfg.exe and then click the OK button.

    2. In the Component Services window, click Component Services > Computers to expand the tree.

    3. Right-click My Computer and then select Properties.

    4. In the My Computer properties window, select Enable Distributed COM on this computer on the Default Properties tab.

    5. For the remote host, on the COM Security tab, click the Edit Limits button of Access Permissions. Select Allow of Remote Access for the users who connect to the remote host or the group that these users belong to.

    6. For the remote host, on the COM Security tab, click the Access Permissions button of Launch and Activation Permissions. Select Allow of Remote Launch and Remote Activation for the users who connect to the remote host or the group that these users belong to.

    7. Click the OK button to reboot the machine. If DCOM has already been enabled, a reboot is not needed.

  3. On the remote host, specify settings to ensure that the Windows services Windows Management Instrumentation and Remote Registry will start automatically. If these services are not running, start them.

  4. On the remote host, run the net share command to verify that administrative shares are enabled.

    net share

    When this command is run, the result is displayed as follows. Administrative shares are enabled if share names are displayed as drive_name$, as shown below.

    Share name   Resource                           Remark
    -------------------------------------------------------------------------------
     :
    C$           C:\                             Default share
    D$           D:\                             Default share
     :
    

    If administrative shares are disabled on the remote host, change the following registry key: After changing the value of the registry key, reboot the machine.

    In Windows 7, Windows 8, and Windows 8.1
    Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\parameters
    Value: AutoShareWks=0 (disabled)
    Value: AutoShareWks=1 (enabled)
    In Windows Server 2008 R2, Windows Server 2012, and Windows Server 2012 R2
    Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\parameters
    Value: AutoShareServer=0 (disabled)
    Value: AutoShareServer=1 (enabled)
  5. On the remote host, open the following ports and configure the firewall:

    • DCOM port (135 or 139)

    • Windows Shares port (445)

    • Dynamic port

    1. From Control Panel, start Windows Firewall and then select Advanced settings.

    2. In the Windows Firewall with Advanced Security window, select New Rule... of Inbound Rules.

    3. In the New Inbound Rule Wizard window, select Port for Rule Type. In addition, select TCP for Protocol and Ports and, in Specific local ports, enter the port number of the port you want to open.

      If you want to specify a range of ports to be opened, specify the range by using a hyphen, as in 5000-5010.

    4. For Action, select Allow the connection.

    5. For Profile, select an applicable profile, depending on the environment, from Domain, Private, and Public.

    6. Enter a name in Name, and then click the Finish button.

    To verify the dynamic port, run the following command.

    For IPv4: netsh int ipv4 show dynamicport tcp

    For IPv6: netsh int ipv6 show dynamicport tcp

  6. To enable the DCOM settings, run the setup-local-dcom subcommand of the asadmin utility command on the remote host.

    asadmin setup-local-dcom
    Important note

    The setup-local-dcom subcommand updates registry information of Windows. We recommend that you make a backup copy of the registry before running the command.

    When this command is run, the result is displayed as follows:

    Command setup-local-dcom executed successfully.
  7. For Windows 8, Windows 8.1, Windows Server 2012, or Windows Server 2012 R2, restart the Windows service Remote Registry on the remote host.

  8. Edit the hosts file so that the host name of the DAS (local host) can be resolved on the remote host.

  9. To set up an alias to the password for configuring a DCOM connection on the local host, run the create-password-alias subcommand of the asadmin utility command.

    asadmin create-password-alias password_alias_name

    When required, enter the password of the remote host.

    When this command is run, the result is displayed as follows:

    Command create-password-alias executed successfully.
  10. Restart the domain administration server.

    asadmin restart-domain

    When this command is run, the result is displayed as follows:

    Command restart-domain executed successfully.
  11. To prepare for DCOM connections, create a password file to be used for connections.

    AS_ADMIN_WINDOWSPASSWORD=${ALIAS=password_alias_name}
  12. To prepare for DCOM connections, run the validate-dcom subcommand of the asadmin utility command on the localhost to ensure that a connection can be made to the remote host via a DCOM connection.

    asadmin --user

    user_name_of_domain_administration_server

    --passwordfile

    path_of _password_file

    validate-dcom --windowsuser

    user_name_of_remote_host remote_host_name

    The default value of the user_name_of_domain_administration_server is admin.

    When this command is run, the result is displayed as follows:

    Command validate-dcom executed successfully.
  13. To setup Application Server on the new server, run the create-node-dcom subcommand of the asadmin utility command to add a node on the remote host.

    asadmin --user user_name_of_domain_administration_server 
    --passwordfile password_file_path 
    create-node-dcom --windowsuser user_name_of_remote_host 
    --installdir installation_path_for_Application_Server/javaee_absolute_path
    --nodehost host_name_of_remote_host 
    --nodedir node_directory_path_for_Application_Server node_name_of_remote_host
    

    For node_name_of_remote_host, specify a name (any name to identify the node) for the node that will be added to the remote host.

    When this command is run, the result is displayed as follows:

    Command create-node-dcom executed successfully.
  14. To setup Application Server on the new server, run the create-prf subcommand of the asadmin utility command to build the performance tracer.

    asadmin create-prf --node node_name_of_remote_host performance_tracer_name

    When this command is run, the result is displayed as follows:

    Command create-prf executed successfully.
  15. To setup Application Server on the new server, run the subcommand create-instance of the asadmin utility command to build the Java EE server (server instance).

    asadmin create-instance --node node_name_of_remote_host 
    --prf performance_tracer_name 
    --cluster cluster_name server_instance_name

    Specify the name of the cluster that was built in cluster_name.

    When this command is run, the result is displayed as follows:

    Command create-instance executed successfully.
  16. When a hardware load balancer is used, run the create-webserver subcommand of the asadmin utility command to build a web server on the new server.

    Run the operations mentioned in step 20 when a software load balancer is used.

    asadmin create-webserver --node node_name_of_remote_host web_server_name

    When this command is run, the result is displayed as follows:

    Command create-webserver executed successfully.
  17. When a hardware load balancer is used, run the subcommand create-relation of the asadmin utility command and set the dependency relations in the new server.

    asadmin create-relation --relationtype redirect 
    --from web_server_name 
    --to server_instance_name 
    --properties property_name_of_dependency_relation=property_value_of_dependency_relation dependency_relation_name

    If you specify settings for the redirect-related relation, you must specify path and network-listener in the --properties option so that static content is processed by the web server, and requests for anything other than static content are processed by the Java EE server. The following is a specification example:

    Example:

    path=/apserver/:network-listener=http-listener-1

    For path, specify the URL path, starting with a slash (/). Do not specify a slash only (path=/). In this example, a request that does not contain apserver as the first part of the file path in the URL following the domain name (for example, http://xxxxxxxxxxx/index.html) is accessed as static content of a web server. A request containing apserver as the first part of the file path in the URL following the domain name (for example, http://xxxxxxxxxxx/apserver/sample/index.jsp) is redirected to the Java EE server. In this case, the request is redirected to the URL http://yyyyyyyyyyy/sample/index.jsp on the Java EE server.

    For network-listener, specify the network listener name of an HTTP or HTTPS listener on the Java EE server at the redirection destination. On the Java EE server, the default HTTP and HTTPS listeners are defined as http-listener-1 and http-listener-2, respectively, both of which are network listeners.

    When this command is run, the result is displayed as follows:

    Command create-relation executed successfully.
  18. When a hardware load balancer is used and when static content are placed in the web server (for efficiency), store the static content in the document root directory of the web browser.

    The document root directory of the web server is installation_directory_for_Application_Server/javaee/glassfish/nodes/node_name/web_server_name/root/htdocs.

  19. When a hardware load balancer is used, set the distribution of requests for the hardware load balancer.

    For details on the settings to distribute requests, refer to the manual of the hardware load balancer that is being used.

  20. When a software load balancer is used, run the create-relation subcommand of the asadmin utility command to set the dependency relations in the new server.

    asadmin create-relation --relationtype redirect 
    --from web_server_name 
    --to cluster_name 
    --properties property_name_of_dependency_relation=property_value_of_dependency_relation dependency_relation_name

    If you specify settings for the redirect-related relation, you must specify path and network-listener in the --properties option so that static content is processed by the web server, and requests for anything other than static content are processed by the Java EE server. The following is a specification example:

    Example:

    path=/apserver/:network-listener=http-listener-1

    For path, specify the URL path, starting with a slash (/). Do not specify a slash only (path=/). In this example, a request that does not contain apserver as the first part of the file path in the URL following the domain name (for example, http://xxxxxxxxxxx/index.html) is accessed as static content of a web server. A request containing apserver as the first part of the file path in the URL following the domain name (for example, http://xxxxxxxxxxx/apserver/sample/index.jsp) is redirected to the Java EE server. In this case, the request is redirected to the URL http://yyyyyyyyyyy/sample/index.jsp on the Java EE server.

    For network-listener, specify the network listener name of an HTTP or HTTPS listener on the Java EE server at the redirection destination. On the Java EE server, the default HTTP and HTTPS listeners are defined as http-listener-1 and http-listener-2, respectively, both of which are network listeners.

    When this command is run, the result is displayed as follows:

    Command create-relation executed successfully.