Problem integrating Stash with JIRA

I have both JIRA (5.2.5) and Stash (2.1.2) running behind Apache2 on the same physical machine. Both are accessible via their respective base URLs (over https). I'm in the process of setting up Stash via the Stash Installer web interface (database connection is fine), and I'm at the JIRA integration step. I put in the information it asks for, and I get an error message about my base URL for JIRA: "There doesn't seem to be a running JIRA server (version 4.3 or later) at this URL."

My best guess is that it has something to do with my self-signed SSL certificate, but I'm not sure. Does anyone have any insight into what might be going on here? Thanks.

3 answers

1 accepted

1 vote
Accepted answer

can you please check if both apps are using the same JAVA binary?

i.e.

ps axf|grep jira
ps axf|grep stash

by default Jira uses its own JRE

i think stash choses the JAVA from your hosts environment

in that case the cert file needs to be imported in this keychain as well.

OR

you configure boths apps (JIRA & Stash) to use the same JAVA <- thats what i preferred.

Thanks for your input. Running the suggested ps and grep commands did show JIRA and Stash use different JREs; JIRA using its own, and stash using the $JAVA_HOME JRE. I like your suggestion of both of them using the same; I'm leaning torwards both of them using the one in JIRA's installation directory. How do I configure Stash to use that JRE? Thanks again.

You can add java_home in /etc/environment or in ~/.bash_profile for example. Or in $stash_install/bin/setenv.sh Take a look at jiras setenv.sh. I believe you should be able to adapt this java_home variable setting

Thanks for the suggestion; I tried setting JAVA_HOME in stash/bin/setenv.sh, but after restarting Stash (and the machine) it didn't seem to pick up the change. I'd prefer not to change the system JAVA_HOME.

I looked in the JIRA setenv.sh, and it had a commented out JAVA_HOME assignment, so I figured adding the JAVA_HOME to Stash's setenv.sh would work (like you suggested), but no go.

I'm going to look around some more at how to set Stash's JAVA_HOME. Thanks again.

I'll try to find out. For now just import the cert into the keychain of the java that stash uses and see if integration works.

my recommendation would be to install java (oracle) and update your systems env by adding

export JAVA_HOME="/usr/java/latest"

then make jira use this java as well by making this change to the permgen.sh

#JAVA_HOME="/opt/atlassian/jira/jre/"; export JAVA_HOME
JAVA_HOME="/usr/java/latest"; export JAVA_HOME

now you just need to import the certfile into $JAVA_HOME/lib/security/cacerts and you should be fine

I ended up asking the specific question of whether it was possible to configure Stash to use a Java that's not necessarily JAVA_HOME or first found in PATH.

https://answers.atlassian.com/questions/137702/how-do-i-configure-stash-to-use-a-specific-java

My impression is that Stash must use the Java in JAVA_HOME or in PATH.

You can set JAVA_HOME and PATH in bin/setenv.sh and it be local to the Stash installation (link in previous comment).

So now I have both JIRA and Stash using the same Java, like you recommended. Thanks again.

Yes thats what i said in my second comment here. Great you figured it out

And I had tried that when you suggested it. Perhaps it's also necessary to include the value in JAVA_HOME in PATH.

JAVA_HOME="$JIRA_HOME/jre"
PATH=$JAVA_HOME/bin:$PATH

In case someone else comes across this, I'm looking at this as a possible solution: https://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services

I added my public self-signed ssl certificate to my JIRA JRE keystore as instructed from my previous comment (and restarted the machine), but I still get the same error at the JIRA integration step of configuring Stash. Any ideas?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,903 views 19 22
Read article

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