Download Word - Java.net

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[GLASSFISH-13943] [UB]Entry for AS_JAVA missing in
<glassfish3>/glassfish/config/asenv.conf, required when creating cluster
distributed over multiple machines Created: 12/Oct/10 Updated: 05/Jul/11 Resolved: 05/Jul/11
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Resolved
glassfish
docs
3.1
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
varunrupela
Fixed
None
Not Specified
Attachments:
pathsenv.html
13,943
3-1-exclude
Issuezilla Id:
Tags:
3.1.1
Priority:
Assignee:
Votes:
Major
Paul Davies
0
45 minutes
Not Specified
Operating System: other
Platform: Linux
ssh-user.html
Description
GF Build: Nightly build 24 from 10th Oct.
Entry for AS_JAVA seems to essential for creating nodes and instances in a
cluster. This entry appears in <glassfish3>/glassfish/config/asenv.conf.
Work-around: User can add AS_JAVA
User shouldn't have to use a work-around just for creating a cluster.
Comments
Comment by Tom Mueller [ 13/Oct/10 ]
Please provide more details about the test case.
Developer testing has proceeded just fine without having an AS_JAVA setting in
asenv.conf, as long as java is in the path of the user or the JAVA_HOME
environment variable is set.
What is your installation environment?
What OS?
Where is Java installed?
What is your PATH?
Comment by varunrupela [ 13/Oct/10 ]
1. Setup: Cluster with 3 instances. Each on a different machine

domain on one of those machines
2. OS: SuSE Linux
3. JAVA_HOME was set appropriately on the DAS machine (on which the asadmin
commands were executed).
4. PATH contained $JAVA_HOME/bin on the DAS machine (on which the asadmin
commands were executed).
The issue appears only when running a command on the DAS machine that requires
action on a remote machines. For example: Running create-instance on the DAS
host, where the --nodehost option points to another machine.
Steps to reproduce the issue:







Configure SSH on all the machines involved. http://wikis.sun.com/display/glassfish/3.1SSHDemoScript
Set JAVA_HOME and the PATH appropriate on shells open on all machines involved.
Install GF image on the 3 machines.
Pick one machine as DAS, say machine-1
Start domain domain1 on the DAS machine
On machine-1 run command to create-node-ssh for machine-2:
asadmin create-node-ssh --nodehost machine-2 --installdir <install-dir> node-2
On machine-1 run command to create-instance for machine-2:
asadmin create-instance --node node-2 <instance-name>
This final command should fail with an error that looks like:
******
ejp5363-vm1:/space/varun/glassfish3/bin # ./asadmin create-instance --node
agent2 instance104
remote failure: Successfully created instance instance104 in the DAS
configuration, but failed to create the instance files on node agent2
(ejp5363-vm2.india.sun.com).
Command failed on node agent2 (ejp5363-vm2.india.sun.com):
/space/varun/glassfish3/glassfish/bin/asadmin: line 54: exec: java: not found
To complete this operation run the following command locally on host
ejp5363-vm2.india.sun.com from the GlassFish install location
/space/varun/glassfish3/glassfish:
asadmin --host ejp5363-vm1.india.sun.com --port 4848 create-local-instance
--node agent2 instance104
Command create-instance failed.
******
With the AS_JAVA appropriately set on the
<glassfish3>/glassfish/config/asenv.conf file on machine-2, the above command works.
Comment by Tom Mueller [ 14/Oct/10 ]
Since java is not found by the create-instance command, it is clear that the
PATH on the remote host is not set properly, even though the previous comment
says, "Set JAVA_HOME and the PATH appropriate on shells open on all machines
involved."
Specifically, how was JAVA_HOME and the PATH set on all machines involved?
From the DAS host, please do the following and report the results:
ssh ejp5363-vm2.india.sun.com env
Is the JAVA_HOME and PATH setting from this output what you expect?
Depending on what shell in invoked via ssh on the remote host, the JAVA_HOME and
PATH may need to be set in .bashrc or .cshrc, or another shell specific file,
and this file might be different from the one that is used when you actually
login to the machine, i.e., .profile.
While putting AS_JAVA into the asenv.conf file is one way to solve this problem,
rather than setting JAVA_HOME and PATH properly, this isn't something that can
even be done in the product, because the code that sets up an SSH node doesn't
know where Java is installed on the remote system. Also, it is not "required"
that this be done, because setting JAVA_HOME and PATH correctly will indeed
work.
Comment by varunrupela [ 14/Oct/10 ]
Thanks for providing the correction.
Adding the JAVA_HOME and PATH in the .bashrc solved the issue.
So, if the user uses the installer, auto-addition of AS_JAVA property might be
possible while when using the zip bundle AS_JAVA is not available. Is that right ?
For users using the zip bundle and creating a cluster distributed on multiple
machines, it will be useful to have instructions on ensuring correct JAVA_HOME
and PATH settings when making the system to work with SSH support.

Kindly add, to this issue, the link of the doc that has such instructions. Is
the following link the right place:
http://wikis.sun.com/display/glassfish/3.1SSHDemoScript
Lowered the priority of this issue.
Comment by Tom Mueller [ 15/Oct/10 ]
Changing this to a docs issue. The documentation should clearly state that when
using the ZIP install bundle, it is necessary to either have java in your path, or
to set the AS_JAVA value in the asenv.conf file. If the documentation already has
this, please add a pointer to this issue.
Comment by Paul Davies [ 18/Nov/10 ]
The Release Notes or the Installation Guide should state the requirement for the
correct version of Java to be accessible through the user's path.
Note that AS_JAVA need only be set if this requirement is not met. Provided a
suitable version of Java is accessible from the path, GlassFish Server seems to
work OK if AS_JAVA is not set.
Comment by Scott Fordin [ 07/Dec/10 ]
The "Path Settings for the JDK Software" section (http://docs.sun.com/app/docs/doc/8211759/gfgps) does address this issue, but the point could certainly be made more clearly, and it
can be added to both the Installation and Upgrade Guides, rather than only the Release Notes.
Comment by Scott Fordin [ 25/Mar/11 ]
In addition to the pointer in the Installation Guide to the Installation Requirements section in the
Release Notes, JDK path requirements have been addressed in several other locations in the
Installation Guide: 1) A Note in the GlassFish Server Installation Methods section
(http://download.oracle.com/docs/cd/E18930_01/html/821-2427/ggrlg.html#gkbby); 2) In Step
4 of Performing a Custom Installation
(http://download.oracle.com/docs/cd/E18930_01/html/821-2427/ghmos.html#gkrhf); 3) In a Tip
in Step 3 in To Uninstall GlassFish Server Software After a GUI-Mode Installation
(http://download.oracle.com/docs/cd/E18930_01/html/821-2427/gjxfv.html#ggrkk); 4) The
importance of adhering to JDK requirements is also stressed in Installation Requirements
(http://download.oracle.com/docs/cd/E18930_01/html/821-2427/gjiaz.html).
The suggestion that the docs should state that AS_JAVA should be added to the asenv.conf
when using an unsupported Java version seems like a Bad Idea to me because cluster creation is
not the only place people will run into problems when using an unsupported Java version. To
put it another way, I don't think we should be encouraging people at all to use an unsupported
Java version. The system requirements clearly state the required version, and that should be that.
If a user chooses to ignore those requirements, then all bets are off. Again, using the wrong Java
version will cause problems in more places then just cluster creation.
Comment by varunrupela [ 27/Mar/11 ]
Re-opening Issue.
A doc note indicating the following is required in the document that covers creation of
GlassFish SSH Nodes (or cluster), especially on remote machines: "Depending on what shell is
invoked via ssh on the remote host, the JAVA_HOME and PATH may need to be set in .bashrc
or .cshrc, or another shell specific file, and this file might be different from the one that is used
when you actually login to the machine, i.e., .profile. "
From the notes on this issue Please see Comment#3 and Comment#4, creation of a SSH Node
can be a problem even though the right version of Java is being used.
Comment by Scott Fordin [ 28/Mar/11 ]
Reassigning to Paul Davies. This information will be added to the 3.2 docs.
Comment by Paul Davies [ 05/Jul/11 ]
The attached files contain the fix for this issue. The fix will be published in the next library
update.
Generated at Fri May 12 17:23:14 UTC 2017 using JIRA 6.2.3#6260sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.