Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Link JIRA with Confluence

thomas.newton@pwc.com September 21, 2018

Hello,

 

I have JIRA and confluence both hosted in different VM. I can access jira with baseURL but confluence I cant access via baseURL but using localhost:8090 I can access internally. But outside VM I can access both applications.  

I can ping JIRA baseURL in confluence and confluence baseURL in JIRA (so both can see each other) but I cannot open JIRA in confluence box and confluence in JIRA.

Steps to link JIRA with Confluence:

When linking applications (in Confluence I clicked -> General configuration -> Application link -> and added  https://mycompany.com after clicking creating I get an error as shown:

error.PNG

If I click continue it asks for additional details:

error-2.PNG

 

If I click continue I get a link created with a error and if I click edit I get this error:

error-3.PNG

Not sure why JIRA is not reachable because I can ping the host fine. This is what my server.xml file looks like:

 

<Server port="8000" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="48" minSpareThreads="10"
enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" proxyName="mycompany.com" proxyPort="443"/>

<!-- scheme="https" proxyName="mycompany.com" proxyPort="443" secure="true"-->


<Engine name="Standalone" defaultHost="localhost" debug="0">

<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">

<Context docBase="../confluence" path="" reloadable="false" useHttpOnly="true" debug="0">
<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
<Manager pathname="" />
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
</Context>

<Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
</Context>
</Host>

</Engine>

<!--
To run Confluence via HTTPS:
* Uncomment the Connector below
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and the keystore itself.
* Restart and visit https://localhost:8443/

For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS
-->


<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
URIEncoding="UTF-8" keystoreFile="E:\Program Files\Atlassian\Confluence\jre\confluence_newcert" keystoreType="PFX" keystorePass="PASSWD"/>
</Service>
</Server>

 

NOTE: if I add security="true" in my connector I cannot log into confluence localhost:8090 in VM (but outside I can) - it redirects me to login page even after logging in.

Confluence do have SSL certificate and uses Tomcat.

When looking into host file in windows where confluence is configured I dont see any DNS entry.

Can someone tell me why I cannot link both app?

 

Regards,

Dipesh

1 answer

1 vote
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 24, 2018

Hi Dipesh,

Sorry you're having some trouble getting applinks set up! From the looks of things, I'd actually recommend using a reverse proxy instead of trying to serve HTTPS directly from Tomcat. Since you're on Windows, the common reverse proxies we see are IIS (should work easily with the PFX certificate you already have), Apache, and nginx now even has a mainline branch build for Windows.

The instructions should help you reconfigure the connector in your server.xml file in addition to configuring your reverse proxy itself. Don't forget to double-check the base URLs in your applications to make sure they are https and have the right addresses. Restart your applications after making changes in server.xml and the proxy.

I think that will mostly get you where you need to be - we do see a lot of issues with trust in the internal keychain and terminating SSL at a reverse proxy is the best way to clear those up.

Cheers,
Daniel

thomas.newton@pwc.com September 25, 2018

Hi Daniel,

 

I followed the first link: and this is what my server.xml file looks like now:

<Server port="8000" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">
    <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                maxThreads="48" minSpareThreads="10"
                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="http" proxyName="mycompany.com" proxyPort="80"/>
    

        <Engine name="Standalone" defaultHost="localhost" debug="0">

            <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
   
                <Context docBase="${catalina.home}/confluence" path="/confluence" reloadable="false" useHttpOnly="true" debug="0">
                    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                    <Manager pathname="" />
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>

                <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>
            </Host>

        </Engine>

        <!--
            To run Confluence via HTTPS:
             * Uncomment the Connector below
             * Execute:
                 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
                 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
               with a password value of "changeit" for both the certificate and the keystore itself.
             * Restart and visit https://localhost:8443/

             For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS
        -->
 

<Connector port="8443" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" disableUploadTimeout="true"
                   acceptCount="100" scheme="https" secure="true"
                   clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
                   URIEncoding="UTF-8" keystoreFile="E:\Program Files\Atlassian\Confluence\jre\certificate" keystoreType="PFX" keystorePass="PASSWORD"/>
    </Service>
</Server>

 

After restarting confluence server, I cannot load localhost:8090 page or baseURL?

I get error Web Page cannot be found HTTP 404 error

Could you tell me what I need to change in my server.xml file?

 

 

Regards,

Dipesh

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2018

Hi Dipesh,

I think you'll want to comment out that HTTPS connector that's still at the bottom of your server.xml, and make sure to restart Confluence after saving the file. From there, based on the connector you've configured you should be accessing Confluence via port 80 (at "mycompany.com") which should be proxying through IIS.

thomas.newton@pwc.com September 26, 2018

Hi Daniel,

This is my new server.xml file

<Server port="8000" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">
    <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                maxThreads="48" minSpareThreads="10"
                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="http" proxyName="mycompany.com" proxyPort="80"/>
    
       
 

         <Engine name="Standalone" defaultHost="localhost" debug="0">

            <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
   
                <Context path="/confluence" docBase="${catalina.home}/confluence" reloadable="false" useHttpOnly="true" debug="0">
                    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                    <Manager pathname="" />
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>

                <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>
            </Host>
   <Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%a %{confluence.request.id}r %{confluence.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{confluence.request.assession.id}r&quot;"/>

        </Engine>
 
        <!--
            To run Confluence via HTTPS:
             * Uncomment the Connector below
             * Execute:
                 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
                 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
               with a password value of "changeit" for both the certificate and the keystore itself.
             * Restart and visit https://localhost:8443/

             For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS
        -->
    </Service>
</Server>

 I cannot reach localhost:80 or http://mycompany.com or http://mycompany.com:80 I've looked at hostfile under C:\windowszsystem32\drivers\etc\hosts and I dont see the http://mycompany.com entry there.

Regards,

Dipesh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events