Before attempting to upgrade our Bitbucket Server instance from 5.3.0 to the latest version, I ran stop.bitbucket.sh. Without making any changes I tried to run ./start-bitbucket.sh and am now getting the error
[user@bitbucketserver bin]$ ./start-bitbucket.sh
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 haven't made any system/script changes. Is there any way of trouble shooting this? Thanks
Did you always run as ‘user’ or have you perhaps got another account that bitbucket was running as? Use du to change to the other user and try again.
did you install any Linux patches, perhaps a system folder was recreated and is temporarily stale. Try bebooting your server and start again.
try running ‘which java’’ to check if your java variables are valid.
you may still want to continue the upgrade in a separate folder after creating a backup of your shared and home folders
Rebooting then starting as the user with ownership of the directory was the one, thanks a million!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My java was updated and caused this. Bitbucket set-jre-home.sh was pointed to the older version. Once i pointed the script to the new version, no problems starting up.
"/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-1.el7_9.x86_64/jre"
Just change the actual version to match what is actually on your system. Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sloan N_ B_ thanks for the reply. I've went the steps in the troubleshooting guide
$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0openjdk-1.8.0.161-0.b14.el7_4.x86_64
My set-jre-home.sh file hasn't been changed so I'm a bit stuck unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same error, but in my case i have migrated bitbucket from one aws account to another account, trying to setup and start the bitbuket
$ ./start-bitbucket.sh
The JRE_HOME environment variable is not defined correctly
This environment variable is needed to run this program
Edit set-jre-home.sh and define JRE_HOME
Startup has been aborted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Strange if you haven't made changes.
Please follow the troubleshooting steps of this documentation page anyway:
https://confluence.atlassian.com/bitbucketserverkb/java-not-found-during-bitbucket-server-startup-779171538.html
Cheers
Niklas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Niklas Becker (bitvoodoo ag) thanks for the reply. I've went the steps in the troubleshooting guide
$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0openjdk-1.8.0.161-0.b14.el7_4.x86_64
My set-jre-home.sh file hasn't been changed so I'm a bit stuck unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.