users@glassfish.java.net

Re: Adding more instance/node to cluster

From: juandavidr <juandavidr_at_gmail.com>
Date: Tue, 21 Sep 2010 23:02:46 -0700 (PDT)

Thank you so very very much, had spent like 4 days looking for a solition
auntil i came across this one, i have the updated script here:


##go to machine cluster1
java -jar glassfishinstallation.jar
ant -f glassfish/setup-cluster.xml
asadmin start-domain domain1

##go to machine cluster2
java -jar glassfishinstallation.jar
ant -f glassfish/setup-cluster.xml
asadmin start-domain domain1
asadmin create-node-agent --user admin --passwordfile passwordfile.txt
--host cluster1 --port 4848 cluster2-nodeagent
asadmin start-node-agent --user admin --passwordfile passwordfile.txt
cluster2-nodeagent

#go to machine cluster1
asadmin create-cluster --user admin --passwordfile passwordfile.txt --host
localhost --port 4848 cluster1

#go to machine cluster2
asadmin create-instance --user admin --passwordfile passwordfile.txt --host
cluster1 --port 4848 --cluster cluster1 --nodeagent cluster2-nodeagent
instance-remote

#go to machine cluster1
asadmin start-instance instance-remote
asadmin create-node-agent --user admin --passwordfile passwordfile.txt
--host cluster1 --port 4848 cluster1-nodeagent
asadmin start-node-agent --user admin --passwordfile passwordfile.txt
cluster1-nodeagent
asadmin create-instance --user admin --passwordfile passwordfile.txt --host
cluster1 --port 4848 --cluster cluster1 --nodeagent
opensso.cluster1-nodeagent instance-local1
asadmin start-instance instance-local1
asadmin create-instance --user admin --passwordfile passwordfile.txt --host
cluster1 --port 4848 --cluster opensso-cluster1 --nodeagent
opensso.cluster1-nodeagent instance-local2
asadmin start-instance instance-local2

#go to machine cluster1
asadmin start-cluster --user admin --passwordfile passwordfile.txt --host
localhost --port 4848 cluster1

#End

As you can see my topology has 2 machines , on one of them y have 2
instances, and on the other y have 1 instance, this is acomplished by having
2 nodes. Its important to mention that the remote isntance had to be created
before the local instance due to a problem with conectivity during start-up
on the cluster (still having a look a it)

Hope this helps anyone with the same kind of problem.


glassfish-2 wrote:
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>

-- 
View this message in context: http://old.nabble.com/Adding-more-instance-node-to-cluster-tp10024515p29776421.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.