Admin Console Series: Create and Start Clusters

Create and Start cluster
create cluster screencast 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.
Congratulation !!  You have just created a cluster with 2 instances running on 2 different machines.


Comments:

If you are note familiar with GlassFish, please see this screencast (about 7 minutes) to get started with GlassFish.

Nice blog Anissa!

Posted by Nazrul on May 04, 2007 at 11:49 AM PDT #

Anissa, thanks for the very clear explanation. Great job!

Posted by Ken Paulsen on May 04, 2007 at 03:14 PM PDT #

Fantastic Blog Anissa!! I intend to walk through these steps later today. Thanks so much for taking the time to write it. A few quick questions: What do I need before I start? Can I create a cluster with just one host? Any additional reading material you can point me to on clusters?

Posted by Tom Kincaid on May 20, 2007 at 02:09 AM PDT #

Thanks.
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 08:44 AM 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 10:17 AM 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 02:24 AM PDT #

[Trackback] ...

Posted by ΓΟΠΑΠ on April 09, 2008 at 12:00 AM PDT #

it does not work !!!!!
when I start the cluster it gives me a message to inform me that the second instance did not start because the node agent is not running!!!
while the node agent is running on the second machine

I think you don't know what you say

Posted by yms on September 09, 2008 at 04:54 PM PDT #

It does not work,I have the same problem

[#|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|#]

Posted by Brian C on October 19, 2008 at 12:27 PM PDT #

Hello,

I have installed a DAS server, a FisrtMachine and a SecondMachine in solaris zones.

In DAS Server I have activated cluster support. Then I have created two node agents placeholder in DAS Server.

Then I have created a nodeagent in both server as you say in your blog.

Everything is correct, nodeagents are shown in DAS server but when I start nodeagents (they run fine) the DAS server shows that nodeagents ares stopped.

Could you please help me?

Thanks in advance, txetxu.

Posted by txetxuvel on November 09, 2008 at 07:53 PM PST #

Good Day
This is good.
When clusters is created can use this cluster with WebServer7?
Where or how in AppServer configure WebServer except reinstalling in .exe file?
Thanks very much.
Best Regards
Kostyantyn

Posted by Kostyantyn on March 01, 2009 at 01:50 AM PST #

Post a Comment:
Comments are closed for this entry.
About

anilam

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today