Admin Console Series: Create and Start Clusters
![]() |
This is the first of the Admin
Console Series which will cover different topic or functions in GlassFish V2, and
show you how to accomplish a special task in Admin Console. This time, we create a domain with cluster profile and then create a cluster with 2 instances running on 2 different machines. I assume you have downloaded and installed a copy of GlassFish V2. You will need to install GlassFish on all the machines where you want your instance running. You can find the step by step instructions below, but it maybe better to see this in action. So, just click the Screen Cast on the left and enjoy !! |
1. Install and create domain with cluster profile
- Download
GlassFish and Install it on your machine where you want you want
your DAS and instances running
- From now on, the following instructions assumes your
- DAS is running on DasMachine
- instance 1 running on FirstMachine
- instance 2 running on SecondMachine
- If you do not have Cluster profile (ie, if you didn't run
setup-cluster.xml during installation), create the cluster profile on
DasMachine
- create-domain --profile cluster --adminport 4848 domainEE
- Start your cluster profile domain
- start-domain domainEE
2. Create and start Node Agents
- Create a node agent and then start the node agent on the machine
where you want your first instance to run on. These 2 commands
need to be executed on FirstMachine.
- create-node-agent --host DasMachine --port 4848 agentOnFirst
- start-node-agent
agentOnFirst
- Create a node agent and then start the node agent on the machine
where you want your second instance to run on. These 2 commands
need to be exceuted on SecondMachine
- create-node-agent --host DasMachine --port 4848 agentOnSecond
- start-node-agent
agentOnSecond
3. Create and start Cluster with Admin Console
- Login to Admin Console: http://DasMachine:4848
- Create a cluster
- Click to the Cluster
node on the tree
- Click on the New Button
- Enter the cluster name
- Click New button on the Server Instance table:
- Enter the name of the server instance, and select the agentOnFirst for the Node agent
- Click New button again,
- Enter the name of the second server instance, and select the agentOnSecond for the Node agent
- Click OK
- select this newly created cluster by clicking the first column
check box, and then click the Start
Cluster button. This will start the cluster for you.
- Click on the cluster name on the table, it will bring you to the
general page of the Cluster. Explore the tabs of this
cluster.

Nice blog Anissa!
Posted by Nazrul on May 04, 2007 at 06:49 PM PDT #
Posted by Ken Paulsen on May 04, 2007 at 10:14 PM PDT #
Posted by Tom Kincaid on May 20, 2007 at 09:09 AM PDT #
1. Before starting, you need to download GlassFish V2. Take either the latest weekly promoted build, or Beta2.
Follow the instructions to install, and use the command "lib/ant/bin/ant -f setup-cluser.xml" to get cluster support. If you ready done it by using setup.xml, you will be running the developer profile. If thats the case, just follow the instruction in this blog about adding cluster support.
2. Definitely. You cluster can have just 1 instance. And the node-agent it required can be running on the machine where you install GF.
3. This document about cluster support in GF V2 is highly recommended.
Hope this help.
Posted by Anissa Lam on May 20, 2007 at 03:44 PM PDT #
Anissa, I have followed your blog step by step (as well as others) but to no avail. Please see my java.net thread at http://forums.java.net/jive/forum.jspa?forumID=56&start=15 and lend any advice you may have. Thanks!
Posted by Ryan on November 05, 2007 at 06:17 PM PST #
Hi Anissa, I followed your instructions but when I tried to start the node agent I get the following error in my server.log:
[#|2008-04-08T12:13:23.700-0400|SEVERE|sun-appserver9.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;service:jmx:s1ashttps://localhost:4848 == java.io.IOException: Remote host closed connection during handshake;|NAGT0022:The nodeagent failed to rendezvous with the DAS on URL service:jmx:s1ashttps://localhost:4848 == java.io.IOException: Remote host closed connection during handshake|#]
Please help.
Posted by Max on April 08, 2008 at 09:24 AM PDT #
Posted by ΓΟΠΑΠ on April 09, 2008 at 07:00 AM PDT #