users@glassfish.java.net

Re: clustering basics

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Wed, 18 Apr 2012 14:02:25 -0700

You are running the right command. Generally, the order is:
- install DAS
- setup-ssh (or do it manually as you have done)
- install-node
- create-node
- create-cluster
- create-instance --node ... -cluster ... instance-name

The NullPointerException on the install-node should not be happening.
Does the server.log file (by default in glassfish/domains/domain1/logs)
have the stack trace from the exception?

Also, you can try setting AS_DEBUG=true before running the command, i.e.,

AS_DEBUG=true asadmin install-node --installdir
/usr/share/glassfish-3.1.2 clustertest-node1

to get more output.

It looks like the NPE is happening while trying to create the zip file
that will then be copied over to the other host.
BTW, if you want to skip the install-node step, you can just unzip
glassfish.zip on the other host.

Tom

On 4/18/2012 1:46 PM, Glenn Holmer wrote:
> I am overwhelmed by documentation! I want to create a cluster across
> three VMs, with the DAS on one and two nodes each on their own VM.
>
> What's the right sequence of commands? I installed GlassFish 3.1.2 on
> the DAS, then (after setting up and testing public-key SSH), tried to
> install the nodes from that machine like this:
>
> glassfish_at_clustertest:~$ asadmin install-node --installdir /usr/share/glassfish-3.1.2 clustertest-node1
> Successfully connected to glassfish_at_clustertest-node1 using keyfile /home/glassfish/.ssh/id_rsa
> java.lang.NullPointerException
> Command install-node failed.
> glassfish_at_clustertest:~$
>
> Did I do something in the wrong order? Do I create the cluster first?
> the instances? The target dir exists on both nodes and is also owned by
> the glassfish user (whose UID matches on all three machines). What I end
> up with is a zero-length ZIP file in the directory where I ran the
> command.
>