How Do I update the java plugin in stash?

I'm currently building a Test Stash server version 3.4.1. It is installed on a Linux Machine (Red hat enterprise Linux server version 6.7) I have it pretty much running. I'm building it with the purpose of mimicking my production server because I will run an upgrade to the latest Bitbucket release; However even though  I was able to install all the plugins that are currently being used on the productions server, I could not install one: stashbot

When trying to install it, it would hang for ever on the UI and stash would tell me that there was an error installing the said add on. according to this website: https://confluence.atlassian.com/display/BitbucketServerKB/Installing+Add-on+Gets+stuck+and+throws+Unsupported+major.minor+version+52.0 I went ahead and checked the java version of both stash servers (the test server and the production server), and I notice that on my stash test sever the java plugin version is 1.7 not 1.8 as stashbot requires. I need help on this (Thanks in advance):

How my prod server is actually pointing to /apps/stash/jdk1.8.0_40 ?

Production server:

/apps/stash/jdk1.8.0_40/jre/lib/resources.jar:/apps/stash/jdk1.8.0_40/jre/lib/rt.jar:/apps/stash/jdk1.8.0_40/jre/lib/sunrsasign.jar:/apps/stash/jdk1.8.0_40/jre/lib/jsse.jar:/apps/stash/jdk1.8.0_40/jre/lib/jce.jar:/apps/stash/jdk1.8.0_40/jre/lib/charsets.jar:/apps/stash/jdk1.8.0_40/jre/lib/jfr.jar:/apps/stash/jdk1.8.0_40/jre/classes

Test Server:


How do I update or install the new java version (1,8) in a non-root location on my test server so as to being able to install stashbot?

Your help will be infinitely appreciated. Thank you

Jesse


1 answer

Hi Jesse,

I think that if you just download and install a JDK 1.8, then point your JAVA_HOME to it, that should do the trick (you may refer to step 2 under https://confluence.atlassian.com/bitbucketserver/install-bitbucket-server-from-an-archive-file-776640148.html for setting JAVA_HOME).

If you actually do not want do to it as root, or can't do it as root, you may download the tarball from Oracle, unzip it wherever you like then properly set your JAVA_HOME and PATH, as stated in http://stackoverflow.com/questions/27003920/how-to-install-java-locally-no-root-on-linux-if-possible.

Regards,

Gustavo Refosco

Thanks for your help Gustavo, the situation that I see here is that, the procedure stated on http://stackoverflow.com/questions/27003920/how-to-install-java-locally-no-root-on-linux-if-possible it only works for shell ran by a specific user, however stash is running as a service and it does not create a shell to run into As far as I can see it only applies to java applications ran from a shell either in the forground or the background, on the fly. What I mean is that the user manually runs the applications from the given shell. Please correct me if I'm wrong. Thanks again for you feedback.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

28,777 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you