Hello, I need to migrate Bitbucket (5.15.1) to a different server.
I have tried the 2 options in this doc to no avail: https://confluence.atlassian.com/bitbucketserver0515/migrating-bitbucket-server-to-another-server-961275665.html
This is what happens when I launch bb
[root@atlassian2 bin]# service atlbitbucket status
Bitbucket is not running (pidfile exists)
[root@atlassian2 bin]# service atlbitbucket start
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
[root@atlassian2 bin]#
[root@atlassian2 bin]# nano set-jre-home.sh
Displaying Java information below shows the same path I put in the set-jre-home.sh script.
[root@atlassian2 bin]# echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.275.b01-1.el8_3.x86_64
[root@atlassian2 bin]# echo $JRE_HOME
Thank you in advance for any assistance.
|
What is the output of echo $PATH ?
Check if it has set the correct path to the java executable.
If it doesn't, then set the path with following.
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.275.b01-1.el8_3.x86_64
export PATH=$JAVA_HOME/bin:$PATH
Hi @Suhas P thanks for the response. It went into Spam so I apologize for the late reply.
I have reverted back to a snapshot prior to setting things up. I have done a
sudo ./atlassian-bitbucket-5.15.1-linux-x64.bin to get it to install successfully as a Service.
the results of your query is below, so it appears correct.
[root@atlassian2 bitbucket]# echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.275.b01-1.el8_3.x86_64
[root@atlassian2 bitbucket]# echo $JRE_HOME
[root@atlassian2 bitbucket]# echo $PATH
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.275.b01-1.el8_3.x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
Now I need to get my data incorporated into this instance. I was hoping copying the existing Production Home and Install directories and their subdirectories (and import the mysql database) would get me back to where I need to be. Do you have an opinion/suggestion on this approach?
Thank you again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In reviewing the set-jre-home.sh file it contains a totally different path:
[root@atlassian2 bin]# cat set-jre-home.sh
if [ -z "$JRE_HOME" ]; then
if [ -z "$JAVA_HOME" ]; then
# If JRE_HOME and JAVA_HOME are not defined, edit this line to define JRE_HOME
JRE_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/jre"
elif [ -n "$JAVA_HOME" ] && [ -x "$JAVA_HOME/jre/bin/java" ]; then
# If JAVA_HOME points to a valid JDK, use its JRE
JRE_HOME="$JAVA_HOME/jre"
elif [ -n "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
# If JAVA_HOME appears to point to a JRE and not a JDK use this anyway
JRE_HOME="$JAVA_HOME"
How does that happen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That explains it, you need to modify the set-jre-home.sh with the correct JRE path. It's referring to the non-existing JAVA version.
Regarding copying prod directories, you can do it as long as it's the same instance (not prod to non-prod). Make sure, your database is reachable from the app server.
you would never be able to get it working in the first shot, you will have to deal with many issues for sure. So i would recommend migrating the non-prod to the non-prod server first, fix all the issues there, document them, and then plan the production.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does indeed however I did not update Java so that's a mystery. I originally installed java-1.8.0-openjdk-1.8.0.275.b01-1.el8_3.x86_64
Anyways, I will make the change and see how it goes. Thank you for your direction.
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.