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

Unable to start bitbucket due to java config mismatch

Nitish Kumar August 23, 2019

Hello,

I am having bitbucket and jira insatlled on my ec2-instance on aws. I was trying to have ssl certificate to my jira installation where I followed the guide and during the process I defined environment variable to:

JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/bin/"

But when I restarted the bitbucket server it throw me error:

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

Edit set-jre-home.sh and define JRE_HOME




Startup has been aborted

 I saw the file set-jre-home.sh where logically it should check /usr/lib/jvm/java-11-openjdk-amd64/bin/ directory and jre folder inside it, which it was unable to fetch. I'm now stuck with this. How can I fix it?

1 answer

1 accepted

0 votes
Answer accepted
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2019

You do not need to include '/bin' in JAVA_HOME path. It should be

JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"

  Also after setting environment variable, have you logged in again/ or have you sourced file in which you have set environment variable.

To check if JAVA_HOME is set,

$ echo $JAVA_HOME

Check output of this command, if it is empty, and have you set environment variable in '~/.bashrc' or '~/.bash_profile' source that file or re-login to server.

$ source ~/.bashrc
OR

$ source ~/.bash_profile
Nitish Kumar August 23, 2019

Hey, Thanks for the reply, that fixed as you said.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events