Administering GlassFish Server Nodes

DRAFT


Previous Next Contents

3 Administering GlassFish Server Nodes

A node represents a host on which the GlassFish Server software is installed. A node must exist for every host on which GlassFish Server instances reside. A node’s configuration contains information about the host such as the name of the host and the location where the GlassFish Server is installed on the host.

The following topics are addressed here:

Types of GlassFish Server Nodes

Each GlassFish Server node is one of the following types of node:

DCOM

A DCOM node supports communication over the Distributed Component Object Model (DCOM) remote protocol. The DCOM remote protocol is available only on Windows systems. If DCOM is set up and you plan to administer your GlassFish Server instances centrally, the instances must reside on DCOM nodes.
A DCOM node’s configuration contains the information that is required to connect to the host through DCOM. This information includes, for example, the user name of the Windows user and the port number for DCOM connections to the host.

SSH

An SSH node supports communication over secure shell (SSH). If SSH is set up and you plan to administer your GlassFish Server instances centrally, the instances must reside on SSH nodes.
An SSH node’s configuration contains the information that is required to connect to the host through SSH. This information includes, for example, the user name of the SSH user and the port number for SSH connections to the host.

CONFIG

A CONFIG node does not support remote communication. If neither DCOM nor SSH is set up and you plan to administer your instances locally, the instances can reside on CONFIG nodes. You cannot use CONFIG nodes for instances that you plan to administer centrally.
Each domain contains a predefined CONFIG node that is named `localhost-`domain, where domain is the name of the domain. On the host where the domain administration server (DAS) is running, this node represents the local host.

Creating, Listing, Testing, and Deleting DCOM Nodes

A DCOM node supports communication over DCOM. If DCOM is set up and you plan to administer your GlassFish Server instances centrally, the instances must reside on DCOM nodes. For information about setting up DCOM, see Enabling Centralized Administration of GlassFish Server Instances.

GlassFish Server enables you to create DCOM nodes for use by instances, obtain information about DCOM nodes, test if DCOM nodes are reachable, and delete DCOM nodes that are no longer required.

The following topics are addressed here:

To Create a DCOM Node

Use the create-node-dcom subcommand in remote mode to create a DCOM node.

Before You Begin

Ensure that the Windows user can use DCOM to connect to the host that the node will represent. By default, the create-node-dcom subcommand validates the node’s parameters and the DCOM connection to the host. If the Windows user cannot use DCOM to connect to the host, the validation fails.

Note:

For information about how to determine whether the Windows user can use DCOM to connect to the host, see To Test the Connection Over DCOM to a Remote Host.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the create-node-dcom subcommand.
    Specify the file that contains the alias for the Windows user’s password through the --passwordfile option of the asadmin utility. For more information about this file, see To Set Up Password Authentication for the Windows User.

Note:

Only the options that are required to complete this task are provided in this step. For information about all the options for configuring the node, see the create-node-dcom(1) help page.

C:\> asadmin --passwordfile filename create-node-dcom
--nodehost node-host [--installdir install-dir ]
node-name
filname

The name of the file that contains the alias for the Windows user’s password.

node-host

The name of the host that the node represents. The name of the host must be specified. Otherwise, an error occurs.

install-dir

The full path to the parent of the base installation directory of the GlassFish Server software on the host, for example, C:\glassfish3. If the GlassFish Server software is installed in the same directory on the node’s host and the DAS host, you can omit this option.

node-name

Your choice of name for the node that you are creating.

Example 3-1 Creating a DCOM Node

This example creates the DCOM node wpmdl1 to represent the host wpmdl1.example.com. The GlassFish Server software is installed in the same directory on the DAS host and on the host wpmdl1.example.com.

C:\> asadmin --passwordfile aspwalias.txt create-node-dcom
--nodehost wpmdl1.example.com wpmdl1
Command create-node-dcom executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-node-dcom at the command line.

Next Steps

After creating a node, you can create instances on the node as explained in the following sections:

To List DCOM Nodes in a Domain

Use the list-nodes-dcom subcommand in remote mode to obtain information about existing DCOM nodes in a domain.

Note:

To obtain information about all existing nodes in a domain, use the list-nodes subcommand.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the list-nodes-dcom subcommand.

asadmin> list-nodes-dcom

Example 3-2 Listing Basic Information About All DCOM Nodes in a Domain

This example lists the name, type, and host of all DCOM nodes in the current domain.

asadmin> list-nodes-dcom
xkyd  DCOM  xkyd.example.com
wpmdl2  DCOM  wpmdl2.example.com
wpmdl1  DCOM  wpmdl1.example.com
Command list-nodes-dcom executed successfully.

Example 3-3 Listing Detailed Information About All DCOM Nodes in a Domain

This example lists detailed information about all DCOM nodes in the current domain.

asadmin> list-nodes-dcom --long=true
NODE NAME    TYPE   NODE HOST            INSTALL DIRECTORY   REFERENCED BY
xkyd         DCOM   xkyd.example.com     C:\glassfish3
wpmdl2       DCOM   wpmdl2.example.com   C:\glassfish3       wdi2
wpmdl1       DCOM   wpmdl1.example.com   C:\glassfish3       wdi1
Command list-nodes-dcom executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

  • asadmin help list-nodes

  • asadmin help list-nodes-dcom

To Test if a DCOM Node is Reachable

Use the ping-node-dcom subcommand in remote mode to test if a DCOM node is reachable.

Before You Begin

Ensure that DCOM is configured on the host where the DAS is running and on the host that the node represents.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the ping-node-dcom subcommand.

Note:

Only the options that are required to complete this task are provided in this step. For information about all the options for testing the node, see the ping-node-dcom(1) help page.

asadmin> ping-node-dcom node-name
node-name

The name of the node to test.

Example 3-4 Testing if a DCOM Node Is Reachable

This example tests if the DCOM node wpmdl2 is reachable.

asadmin> ping-node-dcom wpmdl2
Successfully made DCOM connection to node wpmdl2 (wpmdl2.example.com)
Command ping-node-dcom executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help ping-node-dcom at the command line.

To Delete a DCOM Node

Use the delete-node-dcom subcommand in remote mode to delete a DCOM node.

Deleting a node removes the node from the configuration of the DAS. The node’s directories and files are deleted when the last GlassFish Server instance that resides on the node is deleted.

Before You Begin

Ensure that no GlassFish Server instances reside on the node that you are deleting. For information about how to delete an instance, see the following sections.

asadmin> list-nodes-dcom --long=true
  1. Run the odelete-node-dcom subcommand.

asadmin> delete-node-dcom node-name
node-name

The name of the node that you are deleting.

Example 3-5 Deleting a DCOM Node

This example confirms that no instances reside on the DCOM node xkyd and deletes the node xkyd.

asadmin> list-nodes-dcom --long=true
NODE NAME    TYPE   NODE HOST            INSTALL DIRECTORY   REFERENCED BY
xkyd         DCOM   xkyd.example.com     C:\glassfish3
wpmdl2       DCOM   wpmdl2.example.com   C:\glassfish3       wdi2
wpmdl1       DCOM   wpmdl1.example.com   C:\glassfish3       wdi1
Command list-nodes-dcom executed successfully.
asadmin> delete-node-dcom xkyd
Command delete-node-dcom executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

  • asadmin help delete-node-dcom

  • asadmin help list-nodes-dcom

Creating, Listing, Testing, and Deleting SSH Nodes

An SSH node supports communication over SSH. If SSH is set up and you plan to administer your GlassFish Server instances centrally, the instances must reside on SSH nodes. For information about setting up SSH, see Enabling Centralized Administration of GlassFish Server Instances.

Note:

Windows systems also support communications over DCOM as an alternative to SSH.

GlassFish Server enables you to create SSH nodes for use by instances, obtain information about SSH nodes, test if SSH nodes are reachable, and delete SSH nodes that are no longer required.

The following topics are addressed here:

To Create an SSH Node

Use the create-node-ssh subcommand in remote mode to create an SSH node.

Before You Begin

Ensure that the SSH user can use SSH to log in to the host that the node will represent. By default, the create-node-ssh subcommand validates the node’s parameters and the SSH connection to the host. If the SSH user cannot use SSH to log in to the host, the validation fails.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the create-node-ssh subcommand.

Note:

Only the options that are required to complete this task are provided in this step. For information about all the options for configuring the node, see the create-node-ssh(1) help page.

If you are using password authentication for the SSH user, you must specify a password file through the --passwordfile option of the asadmin utility. For more information about SSH user authentication, see Setting Up SSH User Authentication.

asadmin> create-node-ssh --nodehost node-host [--installdir install-dir ]
node-name
node-host

The name of the host that the node represents. The name of the host must be specified. Otherwise, an error occurs.

install-dir

The full path to the parent of the base installation directory of the GlassFish Server software on the host, for example, /export/glassfish3/. If the GlassFish Server software is installed in the same directory on the node’s host and the DAS host, you can omit this option.

node-name

Your choice of name for the node that you are creating.

Example 3-6 Creating an SSH Node

This example creates the SSH node sj01 to represent the host sj01.example.com. The GlassFish Server software is installed in the same directory on the DAS host and on the host sj01.example.com.

asadmin> create-node-ssh --nodehost sj01.example.com sj01
Command create-node-ssh executed successfully.

Troubleshooting

The create-node-ssh subcommand might fail to create the node and report the error Illegal sftp packet len. If this error occurs, ensure that no the startup file on the remote host displays text for noninteractive shells. Examples of startup files are .bashrc, .cshrc, .login, and .profile.

The SSH session interprets any text message that is displayed during login as a file-transfer protocol packet. Therefore, any statement in a startup file that displays text messages corrupts the SSH session, causing this error.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-node-ssh at the command line.

Next Steps

After creating a node, you can create instances on the node as explained in the following sections:

To List SSH Nodes in a Domain

Use the list-nodes-ssh subcommand in remote mode to obtain information about existing SSH nodes in a domain.

Note:

To obtain information about all existing nodes in a domain, use the list-nodes subcommand.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the list-nodes-ssh subcommand.

asadmin> list-nodes-ssh

Example 3-7 Listing Basic Information About All SSH Nodes in a Domain

This example lists the name, type, and host of all SSH nodes in the current domain.

asadmin> list-nodes-ssh
sj01  SSH  sj01.example.com
sj02  SSH  sj02.example.com
Command list-nodes-ssh executed successfully.

Example 3-8 Listing Detailed Information About All SSH Nodes in a Domain

This example lists detailed information about all SSH nodes in the current domain.

asadmin> list-nodes-ssh --long=true
NODE NAME   TYPE   NODE HOST          INSTALL DIRECTORY    REFERENCED BY
sj01        SSH    sj01.example.com   /export/glassfish3   pmd-i1
sj02        SSH    sj02.example.com   /export/glassfish3   pmd-i2
Command list-nodes-ssh executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

  • asadmin help list-nodes

  • asadmin help list-nodes-ssh

To Test if an SSH Node is Reachable

Use the ping-node-ssh subcommand in remote mode to test if an SSH node is reachable.

Before You Begin

Ensure that SSH is configured on the host where the DAS is running and on the host that the node represents.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the ping-node-ssh subcommand.

Note:

Only the options that are required to complete this task are provided in this step. For information about all the options for testing the node, see the ping-node-ssh(1) help page.

asadmin> ping-node-ssh node-name
node-name

The name of the node to test.

Example 3-9 Testing if an SSH Node Is Reachable

This example tests if the SSH node sj01 is reachable.

asadmin> ping-node-ssh sj01
Successfully made SSH connection to node sj01 (sj01.example.com)
Command ping-node-ssh executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help ping-node-ssh at the command line.

To Delete an SSH Node

Use the delete-node-ssh subcommand in remote mode to delete an SSH node.

Deleting a node removes the node from the configuration of the DAS. The node’s directories and files are deleted when the last GlassFish Server instance that resides on the node is deleted.

Before You Begin

Ensure that no GlassFish Server instances reside on the node that you are deleting. For information about how to delete an instance, see the following sections.

asadmin> list-nodes-ssh --long=true
  1. Run the odelete-node-ssh subcommand.

asadmin> delete-node-ssh node-name
node-name

The name of the node that you are deleting.

Example 3-10 Deleting an SSH Node

This example confirms that no instances reside on the SSH node sj01 and deletes the node sj01.

asadmin> list-nodes-ssh --long=true
NODE NAME   TYPE   NODE HOST          INSTALL DIRECTORY    REFERENCED BY
sj01        SSH    sj01.example.com   /export/glassfish3
sj02        SSH    sj02.example.com   /export/glassfish3   pmd-i2
Command list-nodes-ssh executed successfully.
asadmin> delete-node-ssh sj01
Command delete-node-ssh executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

  • asadmin help delete-node-ssh

  • asadmin help list-nodes-ssh

Creating, Listing, and Deleting CONFIG Nodes

A CONFIG node does not support remote communication. If neither DCOM nor SSH is set up and you plan to administer your instances locally, the instances can reside on CONFIG nodes. You cannot use CONFIG nodes for instances that you plan to administer centrally.

GlassFish Server enables you to create CONFIG nodes for use by instances, obtain information about CONFIG nodes, and delete CONFIG nodes that are no longer required.

The following topics are addressed here:

To Create a CONFIG Node

Use the create-node-config command in remote mode to create a CONFIG node.

Note:

If you create an instance locally on a host for which no nodes are defined, you can create the instance without creating a node beforehand. In this situation, GlassFish Server creates a CONFIG node for you. The name of the node is the unqualified name of the host. For more information, see To Create an Instance Locally.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the create-node-config subcommand.

Note:

Only the options that are required to complete this task are provided in this step. For information about all the options for configuring the node, see the create-node-config(1) help page.

asadmin> create-node-config [--nodehost node-host] [--installdir install-dir ]
node-name
node-host

The name of the host that the node represents. You may omit this option. The name of the host can be determined when instances that reside on the node are created.

install-dir

The full path to the parent of the base installation directory of the GlassFish Server software on the host, for example, /export/glassfish3/. You may omit this option. The installation directory can be determined when instances that reside on the node are created.

node-name

Your choice of name for the node that you are creating.

Example 3-11 Creating a CONFIG Node

This example creates the CONFIG node cfg01. The host that the node represents and the installation directory of the GlassFish Server software on the host are to be determined when instances are added to the node.

asadmin> create-node-config cfg01
Command create-node-config executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-node-config at the command line.

Next Steps

After creating a node, you can create instances on the node as explained in To Create an Instance Locally.

To List CONFIG Nodes in a Domain

Use the list-nodes-config subcommand in remote mode to obtain information about existing CONFIG nodes in a domain.

Note:

To obtain information about all existing nodes in a domain, use the list-nodes subcommand.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the list-nodes-config subcommand.

asadmin> list-nodes-config

Example 3-12 Listing Basic Information About All CONFIG Nodes in a Domain

This example lists the name, type, and host of all CONFIG nodes in the current domain.

asadmin> list-nodes-config
localhost-domain1  CONFIG  localhost
cfg01  CONFIG  cfg01.example.com
cfg02  CONFIG  cfg02.example.com
Command list-nodes-config executed successfully.

Example 3-13 Listing Detailed Information About All CONFIG Nodes in a Domain

This example lists detailed information about all CONFIG nodes in the current domain.

asadmin> list-nodes-config --long=true
NODE NAME           TYPE     NODE HOST            INSTALL DIRECTORY    REFERENCED BY
localhost-domain1   CONFIG   localhost            /export/glassfish3
cfg01               CONFIG   cfg01.example.com    /export/glassfish3   yml-i1
cfg02               CONFIG   cfg02.example.com    /export/glassfish3   yml-i2
Command list-nodes-config executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

  • asadmin help list-nodes

  • asadmin help list-nodes-config

To Delete a CONFIG Node

Use the delete-node-config subcommand in remote mode to delete a CONFIG node.

Deleting a node removes the node from the configuration of the DAS. The node’s directories and files are deleted when the last GlassFish Server instance that resides on the node is deleted.

Before You Begin

Ensure that no GlassFish Server instances reside on the node that you are deleting. For information about how to delete an instance that resides on a CONFIG node, see To Delete an Instance Locally.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Confirm that no instances reside on the node that you are deleting.

asadmin> list-nodes-config --long=true
  1. Run the odelete-node-config subcommand.

asadmin> delete-node-config node-name
node-name

The name of the node that you are deleting.

Example 3-14 Deleting a CONFIG Node

This example confirms that no instances reside on the CONFIG node cfg01 and deletes the node cfg01.

asadmin> list-nodes-config --long=true
NODE NAME           TYPE     NODE HOST           INSTALL DIRECTORY    REFERENCED BY
localhost-domain1   CONFIG   localhost           /export/glassfish3
cfg01               CONFIG   cfg01.example.com   /export/glassfish3
cfg02               CONFIG   cfg02.example.com   /export/glassfish3   yml-i2
Command list-nodes-config executed successfully.
asadmin> delete-node-config cfg01
Command delete-node-config executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

  • asadmin help delete-node-config

  • asadmin help list-nodes-config

Updating and Changing the Type of a Node

GlassFish Server enables you to update the configuration data of any node and to change the type of a node.

The following topics are addressed here:

To Update a DCOM Node

Use the update-node-dcom subcommand in remote mode to update a DCOM node.

Options of this subcommand specify the new values of the node’s configuration data. If you omit an option, the existing value is unchanged.

Before You Begin

Ensure that the following prerequisites are met:

  • DCOM is configured on the host where the DAS is running and on the host that the node represents.

  • The node that you are updating exists.

    1. Ensure that the DAS is running.
      Remote subcommands require a running server.

    2. Run the update-node-dcom subcommand.

asadmin> update-node-dcom options node-name
options

Options of the update-node-dcom subcommand for changing the node’s configuration data. For information about these options, see the update-node-dcom(1) help page.

node-name

The name of the DCOM node to update.

Example 3-15 Updating a DCOM Node

This example updates the host that the node wpmdl1 represents to wj01.

asadmin> update-node-dcom --nodehost wj01 wpmdl1
Command update-node-dcom executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help update-node-dcom at the command line.

To Update an SSH Node

Use the update-node-ssh subcommand in remote mode to update an SSH node.

Options of this subcommand specify the new values of the node’s configuration data. If you omit an option, the existing value is unchanged.

Before You Begin

Ensure that the following prerequisites are met:

  • SSH is configured on the host where the DAS is running and on the host that the node represents.

  • The node that you are updating exists.

    1. Ensure that the DAS is running.
      Remote subcommands require a running server.

    2. Run the update-node-ssh subcommand.

asadmin> update-node-ssh options node-name
options

Options of the update-node-ssh subcommand for changing the node’s configuration data. For information about these options, see the update-node-ssh(1) help page.

node-name

The name of the SSH node to update.

Example 3-16 Updating an SSH Node

This example updates the host that the node sj01 represents to adc01.example.com.

asadmin> update-node-ssh --nodehost adc01.example.com sj01
Command update-node-ssh executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help update-node-ssh at the command line.

To Update a CONFIG Node

Use the update-node-config subcommand in remote mode to update a CONFIG node.

Options of this subcommand specify the new values of the node’s configuration data. If you omit an option, the existing value is unchanged.

Before You Begin

Ensure that the node that you are updating exists.

  1. Ensure that the DAS is running.
    Remote subcommands require a running server.

  2. Run the update-node-config subcommand.

asadmin> uupdate-node-config options node-name
options

Options of the update-node-config subcommand for changing the node’s configuration data. For information about these options, see the update-node-config(1) help page.

node-name

The name of the CONFIG node to update.

Example 3-17 Updating a CONFIG Node

This example updates the host that the node cfg02 represents to adc02.example.com.

asadmin> update-node-config --nodehost adc02.example.com cfg02
Command update-node-config executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help update-node-config at the command line.

To Change the Type of a Node

The subcommands for updating a node can also be used to change the type of a node.

Changing the type of a CONFIG node enables remote communication for the node. The type of the node after the change determines the protocol over which the node is enabled for remote communication:

  • A DCOM node is enabled for communication over DCOM.

  • An SSH node is enabled for communication over SSH.

As part of the process of changing the type of a node, you can also change other configuration data for the node.

Options of the subcommands for updating a node specify the new values of the node’s configuration data. For most options, if you omit the option, the existing value is unchanged. However, default values are applied in the following situations:

  • Any of the following options of the update-node-dcom subcommand is omitted:

    • --windowsuser

    • --windowsdomain

  • Any of the following options of the update-node-ssh subcommand is omitted:

    • --sshport

    • --sshuser

    • --sshkeyfile

Caution:

Changing a DCOM node or an SSH node to a CONFIG node disables remote communication for the node.

Before You Begin

Ensure that the following prerequisites are met:

  • SSH or DCOM is configured on the host where the DAS is running and on the host that the node represents.

  • The node the type of which you are changing exists.

    1. Ensure that the DAS is running.
      Remote subcommands require a running server.

    2. Run the appropriate subcommand for updating a node, depending on the type of the node after the change.

  • To change the type of a node to DCOM, run the update-node-dcom subcommand on the node.

asadmin> update-node-dcom [options] config-or-ssh-node-name
options

Options of the update-node-dcom subcommand for changing the node’s configuration data. For information about these options, see the update-node-dcom(1) help page.

config-or-ssh-node-name

The name of the CONFIG node or the SSH node to change.

  • To change the type of a node to SSH, run the update-node-ssh subcommand on the node.

asadmin> update-node-ssh [options] config-or-dcom-node-name
options

Options of the update-node-ssh subcommand for changing the node’s configuration data. For information about these options, see the update-node-ssh(1) help page.

config-or-dcom-node-name

The name of the CONFIG node or the DCOM node to change.

  • To change the type of a node to CONFIG, run the update-node-config subcommand on the node.

asadmin> update-node-config [options] dcom-or-ssh-node-name
options

Options of the update-node-config subcommand for changing the node’s configuration data. For information about these options, see the update-node-config(1) help page.

dcom-or-ssh-node-name

The name of the DCOM node or the SSH node to change.

Example 3-18 Changing a CONFIG Node to an SSH Node

This example changes the CONFIG node cfg02 to an SSH node.

asadmin> update-node-ssh cfg02
Command update-node-ssh executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing the following commands at the command line.

  • asadmin help update-node-config

  • asadmin help update-node-dcom

  • asadmin help update-node-ssh


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

DRAFT