Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I can't get Stash loaded in browser. Output says JAVA HOME is wrong

Cassandra Wolff April 14, 2015

At first, the output pointed to a non-existent directory for line 399, but then I changed it to the valid installation of my Java and reinstalled stash. But now I'm getting:

/opt/atlassian/stash/3.8.0/bin/catalina.sh: line 399: /usr/local/jdk/bin/java: No such file or directory

The same error message I got before, but this time it's a valid location. Can somebody help, it's been two weeks and I haven't been able to get my stash working!

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2015

Hello Cassandra,

Thank you for your question.

Based on the description above, it seems you are running Stash on a linux environment. If so, I would suggest you on running the following command to determine where JAVA is installed.

# command
[root@localhost ~]# which java

# response
/usr/bin/java

In the above "/usr/bin/java"is only a symbolic link to your Java. In order to determine that, please run the following:

# command
[root@localhost ~]# ls -l /usr/bin/java


# response
lrwxrwxrwx. 1 root root 22 Apr  7 10:30 /usr/bin/java -> /etc/alternatives/java

In the above "/etc/alternatives/java"is only a symbolic link to your Java. In order to determine that, please run the following:

# command
[root@localhost ~]# ls -l /etc/alternatives/java


# response
lrwxrwxrwx. 1 root root 74 Apr  7 10:30 /etc/alternatives/java -> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/jre/bin/java

As you can notice, our Java JDK is located under "/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.e17_1.x86_64" directory.

In the directory above, you should find the following JDK and JRE directories:

# the following location (JDK) should be used as $JAVA_HOME
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/
 
# please, make sure the following can be found in the directory above
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/bin
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/bin/java
 
# alternatively, you could run the following command just to make sure "java" is running in the location above:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/bin/java -version
# the following location (JRE) should be used as $JRE_HOME
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/jre

In case you cannot find "/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/bin/java", which is the location to our $JAVA_HOME in the example above, please set up your $JAVA_HOME using the JRE location.

/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1.x86_64/jre

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2015

Hi Cassandra,

is JAVA_HOME correctly set on your system?

You can check this with the export command.

Does the user you are running with Stash has access to the java home directory?

It looks like Stash can't find your directory so there might be a permission problem.

Best regards,

Peter

 

Cassandra Wolff April 14, 2015

As of right now, the JAVA_HOME (when I run echo $JAVA_HOME) is:

usr/lib/jvm/jre-1.7.0-openjdk.x86_64

I can't imagine what other dir it might be looking for

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2015

Cassandra, Could you change your stash instance to use the following path: usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java instead of /usr/local/jdk/bin/java And did you use the stash installer? that should install a jre for Stash if necesarry (according to the documentation here: https://confluence.atlassian.com/display/STASH/Running+the+Stash+installer ) Best regards, Peter

Cassandra Wolff April 14, 2015

Hi Peter, thanks for your suggestion. Trying that now. Will update soon!

0 votes
Daniel Wester
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2015

Have you dropped in a ticket at support.atlassian.com ?

Are you sure that the Java binary is at /usr/local/jdk/bin/java ? If it is - I would suggest dropping in an support request at https://support.atlassian.com .

Also, what happens when you just run /usr/local/jdk/bin/java from the command line?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events