Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide |
1. High Availability in GlassFish Server
2. Setting Up SSH for Centralized Administration
3. Administering GlassFish Server Nodes
Types of GlassFish Server Nodes
Creating, Listing, and Deleting CONFIG Nodes
To List CONFIG Nodes in a Domain
Updating and Changing the Type of a Node
4. Administering GlassFish Server Clusters
5. Administering GlassFish Server Instances
6. Administering Named Configurations
7. Configuring Web Servers for HTTP Load Balancing
8. Configuring HTTP Load Balancing
9. Upgrading Applications Without Loss of Availability
10. Configuring High Availability Session Persistence and Failover
11. Configuring Java Message Service High Availability
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 Chapter 2, Setting Up SSH for Centralized Administration.
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:
Use the create-node-ssh subcommand in remote mode to create an SSH node.
Before You Begin
Ensure that the user of the DAS 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 user of the DAS cannot use SSH to log in to the host, the validation fails.
Remote subcommands require a running server.
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(1M) 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
The name of the host that the node represents. The name of the host must be specified. Otherwise, an error occurs.
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.
Your choice of name for the node that you are creating.
Example 3-1 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:
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(1) subcommand.
Remote subcommands require a running server.
asadmin> list-nodes-ssh
Example 3-2 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-3 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
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.
Remote subcommands require a running server.
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
The name of the node to test.
Example 3-4 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.
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.
Remote subcommands require a running server.
asadmin> list-nodes-ssh --long=true
asadmin> delete-node-ssh node-name
The name of the node that you are deleting.
Example 3-5 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