When creating a simple config that consists of
One additional local node
One instance found in the additional node
The --nodedir specified when running asadmin create-node-config is not used at all. Instead, all files are placed under GF home\glassfish\nodes\NODENAME
The simple steps to reproduce are:
asadmin create-domain --domaindir /scratch/gfwork/das --savemasterpassword=true my_domain
asadmin start-domain --domaindir /scratch/gfwork/das my_domain
asadmin create-node-config --nodedir /scratch/gfwork/node1 node1
asadmin create-local-instance --node node1 server_one
After doing the above steps, the node files are actually found at GFInstallDir/glassfish/nodes/node1, instead of /scratch/gfwork/node1
If the --nodedir argument is added to the asadmin command create-local-instance then the value is used.
If that is the case, then why does create-node-config have this argument available? It is being ignored when the instance in the node is actually created.
Furthermore, if one creates a cluster and then creates an instance that is a member of the cluster, the issue above causes the cluster startup to fail because it is actually looking for the node files in the correct place (using abonve DAS):
asadmin create-node-config --nodedir /scratch/gfwork/node2 node2
asadmin create-cluster myCluster
asadmin create-local-instance --node node1 --cluster myCluster server2
asadmin start-cluster myCluster
The error from this is:
server1: Could not start instance server2 on node node2 (myhost).
Command failed on node node1 (myhost): Command start-local-instance failed.
Server instance directory /scratch/gfwork/node2/node2/server2 does not exist or is not a directory
To complete this operation run the following command locally on host myhost from the GlassFish install location /scratch/glassfish3:
asadmin start-local-instance --node node2 --nodedir /scratch/gfwork/node2 --sync normal server2
The command start-instance failed for: server12
Command start-cluster completed with warnings.