Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket server installation at a Debian Buster system: Java problem

spiperidis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 15, 2020

Good morning,

Following the proposed installation steps for the 6.10 bitbucket server version, at a Linux Debian Buster system, the following problem occurred. While trying to execute:

start-bitbucket.sh

I get the message:

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Edit set-jre-home.sh and define JRE_HOME

I am trying to Install Bitbucket Server 6.10 from the zip or archive file:

atlassian-bitbucket-6.10.0

The relevant support page mentions at the "Before you begin>Are you using a supported operating system and Java version?" section:

The Bitbucket Server installer includes Java (JRE) and Tomcat, so you don't need to install these separately.

and at the same page, "the Before you begin>Is your JAVA_HOME variable set correctly?" section mentions that:

Before you install Bitbucket Server, check that you're running a supported Java version and that the JAVA_HOME environment variable is set correctly.

It is not clear to me what I have to do.

Please advise if I have to install Java. If so please advise which one of the java packages for Debian Buster are necessary to install.

2 answers

2 accepted

1 vote
Answer accepted
admin admin
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.
January 16, 2020

While you don't need to install Java, you do need to have it referenced in your environment.

That said however;

The Bitbucket Server installer includes Java (JRE) and Tomcat, so you don't need to install these separately.

 

Specifies the 'installer' includes these, the tar.gz archive file may not (and does not that I am aware of), so this depends on how the server was installed (you mention you are installing from an archive, so this decision may need to be re-evaluated).

 

You can verify if you have a JRE_HOME variable already defined;

echo $JRE_HOME [OR] echo $JAVA_HOME

 

A quick fix is to reference this variable's destination in the set-jre-home.sh file as the description you provided specifies;

vi ${BITBUCKET_INSTALL_DIR}/bin/set-jre-home.sh


And the easiest solution is to reference the JAVA_HOME location in your /etc/environment file, Though this may alter the operation of other applications running on your server.

spiperidis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2020

Hello and thank you for your answer.

I have already tried the following commands,

echo $JRE_HOME
echo $JAVA_HOME

and received no answer, so I have no path to set at the set-jre-home.sh file.

Correct me if I am wrong, but as I realised from the two answers I have already received, I have to install Java for Debian. According to the Supported platforms page I need either Java 11 or Java 8, so I am planning to install the default-jre Debian buster package, which as far as I am concerned refers to Java 11.

After the installation I will find out the  $JRE_HOME  value-path and copy it at the set-jre-home.sh file.

0 votes
Answer accepted
admin admin
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.
January 16, 2020

You can also resolve this issue by installing with the bitbucket .bin file, which will install Java in Linux.

In truth, as I used to deliver Atlassian servers as docker containers I preferred the tar.gz delivery, b/c modifying the response.varfile file in the Dockerfile to provide automated installation was frustrating, but I now install Atlassian servers into the host OS, and the .bin files, in fresh environments, has proven much simpler to deliver.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events