Problem integrating Stash with JIRA

mickey13 February 11, 2013

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
Answer accepted
C_ Faysal
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.
February 12, 2013

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.

mickey13 February 13, 2013

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.

C_ Faysal
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.
February 13, 2013
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
mickey13 February 13, 2013

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.

C_ Faysal
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.
February 13, 2013
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.
C_ Faysal
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.
February 13, 2013

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

mickey13 February 14, 2013

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.

mickey13 February 15, 2013

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.

C_ Faysal
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.
February 15, 2013
Yes thats what i said in my second comment here. Great you figured it out
mickey13 February 15, 2013

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

0 votes
mickey13 February 12, 2013

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?

0 votes
mickey13 February 12, 2013

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

Suggest an answer

Log in or Sign up to answer