users@glassfish.java.net

Re: Adding more instance/node to cluster

From: <glassfish_at_javadesktop.org>
Date: Mon, 16 Apr 2007 14:30:32 PDT

To add a node to the cluster, the basic steps I use ( from memory so hopefully they're correct ) are:

  1. Start up your DAS you configured with the setup-cluster.xml config.
  2. Install glassfish on your new node using the -f setup-cluster.xml
  3. On the new node, run asadmin create-node-agent with the -H option to point your host DAS. ( should see log on your DAS when it connects -- remember the default master password is changeit on the DAS ( this has bitten me a few times when I forget ) )
      This is basically a listener for managing instances on clustered nodes
  4. On the new node, run asadmin start-node agent with your new agent name you just made
  5. Check your DAS through the web admin to make sure the node agent is registered and up and running.
  6. I prefer to now use the web admin interface to create a new cluster. When creating the cluster, you will create one or more new node instances which will be run and be managed by the chosen node agent ( the drop down list of all registered node agents )

It is sort of confusing, but here is the breakdown as I've come to figure out:

  DAS runs cluster(s) / stand-alone server
  Node Agents register with DAS to allow remote control/sync of remote instances
  Instances are the actual "app server" you can connect to.

Make sure your local DNS works correctly or use ip addresses, or else I've had issues with the DAS communicating correctly with the remote node agent. Also, each instance uses it's own port for everything ( http/orb/jms/etc. i.e. maybe like 38080 for the web listener. Configured through the configuration file for the cluster.) The load balancer would then load across these new hosts and ports.

some other helpful asadmin commands if you need to start over:

  delete-instance,delete-node-agent,delete-node-agent-config if the web interfaces doesn't clean up everything. The web interface seems to be getting better with each new build.

One last thing--the node agents and instances are created in the glassfish_home/nodeagents folder much the same was as a domain is created in the domains folder.

Hope this all helps.
[Message sent by forum member 'mgmartin' (mgmartin)]

http://forums.java.net/jive/thread.jspa?messageID=212607