users@glassfish.java.net

Re: clustering basics

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Thu, 19 Apr 2012 08:20:36 -0500

On Wed, 2012-04-18 at 15:21 -0700, Tom Mueller wrote:
> Based on a review of the code, I see a bug that could be what you are
> seeing. If you have a plain file (not a directory) in the install root
> for the server, then you would get the behavior you are seeing. For
> example, I did the following to produce the behavior you are seeing.

I'm not sure I understand. If you use the installer, surely you are
going to end up with two files in that directory, right?

=============================================================

root_at_clustertest:/usr/share/glassfish-3.1.2 # ls -l
total 228
drwxrwxr-x 2 glassfish glassfish 100 2012-02-13 20:49 bin
drwxrwxr-x 11 glassfish glassfish 113 2012-04-18 10:05 glassfish
drwxrwxr-x 5 glassfish glassfish 119 2012-04-18 10:05 install
drwxrwxr-x 4 glassfish glassfish 110 2012-02-13 21:02 javadb
drwxrwxr-x 5 glassfish glassfish 36 2012-02-13 21:08 mq
drwxrwxr-x 4 glassfish glassfish 31 2012-02-13 20:49 pkg
-rw-r--r-- 1 glassfish glassfish 223712 2012-02-13 19:15 uninstall.exe
-rw-r--r-- 1 glassfish glassfish 7620 2012-02-13 19:15 uninstall.sh
drwxrwxr-x 3 glassfish glassfish 16 2012-04-18 10:05 updatetool
drwxrwxr-x 3 glassfish glassfish 20 2012-04-18 10:05 var
root_at_clustertest:/usr/share/glassfish-3.1.2 #

=============================================================

I moved them away, and the command proceeded past that point. However,
now I'm getting this (sorry for the long paste):

=============================================================

glassfish_at_clustertest:/usr/share/glassfish-3.1.2$ AS_DEBUG=true asadmin install-node --installdir /usr/share/glassfish-3.1.2 --create=true clustertest-node1
CLASSPATH= /usr/share/glassfish-3.1.2/glassfish/bin/../modules/admin-cli.jar
Commands: [install-node, --installdir, /usr/share/glassfish-3.1.2, --create=true, clustertest-node1]
asadmin extension directory: /usr/share/glassfish-3.1.2/glassfish/lib/asadmin
Prepare
Process program options
Parsing program options
Parse command options
params: {installdir: [/usr/share/glassfish-3.1.2]
create: [true]
}
operands: [clustertest-node1]
Prevalidate command options
Inject command options
Validate command options
Domain XML file = /usr/share/glassfish-3.1.2/glassfish/domains/clustertest/config/domain.xml
asadmin --host localhost --port 4848 --interactive=true --echo=false --terse=false install-node --sshuser ${user.name} --sshport 22 --installdir /usr/share/glassfish-3.1.2 --create=true --save=false --force=false clustertest-node1
Execute command
SSH info is host=clustertest-node1 port=22 user=glassfish password=null keyFile=/home/glassfish/.ssh/id_rsa keyPassPhrase=null authType=null knownHostFile=/home/glassfish/.ssh/known_hosts
Checking connection...
Successfully connected to glassfish_at_clustertest-node1 using keyfile /home/glassfish/.ssh/id_rsa
Specified key file is /home/glassfish/.ssh/id_rsa
Specified key file exists at /home/glassfish/.ssh/id_rsa
Running command '/usr/share/glassfish-3.1.2/glassfish/bin/asadmin' version --local --terse on host: clustertest-node1
Specified key file is /home/glassfish/.ssh/id_rsa
Specified key file exists at /home/glassfish/.ssh/id_rsa
clustertest-node1:''/usr/share/glassfish-3.1.2/glassfish/bin/asadmin' version --local --terse' failed [bash: /usr/share/glassfish-3.1.2/glassfish/bin/asadmin: No such file or directory
]
Number of files to be zipped = 5018
Removing file = glassfish6244912575928151192.zip
Final number of files to be zipped = 1554
Created installation zip /usr/share/glassfish-3.1.2/glassfish6244912575928151192.zip
SSH info is host=clustertest-node1 port=22 user=glassfish password=null keyFile=/home/glassfish/.ssh/id_rsa keyPassPhrase=null authType=null knownHostFile=/home/glassfish/.ssh/known_hosts
Checking connection...
Successfully connected to glassfish_at_clustertest-node1 using keyfile /home/glassfish/.ssh/id_rsa
Specified key file is /home/glassfish/.ssh/id_rsa
Specified key file exists at /home/glassfish/.ssh/id_rsa
Specified key file is /home/glassfish/.ssh/id_rsa
Specified key file exists at /home/glassfish/.ssh/id_rsa
Total number of files under /usr/share/glassfish-3.1.2 = 6097
Copying /usr/share/glassfish-3.1.2/glassfish6244912575928151192.zip (95098845 bytes) to clustertest-node1:/usr/share/glassfish-3.1.2
Copied /usr/share/glassfish-3.1.2/glassfish6244912575928151192.zip to clustertest-node1:/usr/share/glassfish-3.1.2
Installing glassfish6244912575928151192.zip into clustertest-node1:/usr/share/glassfish-3.1.2
Running command cd '/usr/share/glassfish-3.1.2'; jar -xvf glassfish6244912575928151192.zip on host: clustertest-node1
Specified key file is /home/glassfish/.ssh/id_rsa
Specified key file exists at /home/glassfish/.ssh/id_rsa
jar command failed while installing glassfish on host clustertest-node1. Command output bash: jar: command not found

Remote command output: bash: jar: command not found

Command install-node failed.
glassfish_at_clustertest:/usr/share/glassfish-3.1.2$

=============================================================

But Java is installed on the target machine:

=============================================================

glennh_at_clustertest-node1:~ > which java
/usr/lib/java/bin/java
glennh_at_clustertest-node1:~ > which jar
/usr/lib/java/bin/jar
glennh_at_clustertest-node1:~ > echo $JAVA_HOME
/usr/lib/java
glennh_at_clustertest-node1:~ > java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
glennh_at_clustertest-node1:~ >

I got past this point easily using 3.1.1. Where have I gone wrong? Can I
run the jar command myself? Would the command have done anything else
after the extraction?

-- 
____________________________________________________________
Glenn Holmer                          gholmer_at_weycogroup.com
Software Engineer                        phone: 414-908-1809
Weyco Group, Inc.                          fax: 414-908-1601