Linking issues from Jira to Confluence
Asked by Fr0zt:

Hello.

I am working with Jira Service Desk 3.5.3 and Confluence 6.7.1 in the same machine (different ports but same domain).

I have created some issues in Service Desk. By going to "Raise a Request" in Jira and searching for an article, I got the Confluence URL.

When posting a comment in the issue, with the URL, a pop up is displayed asking for Confluence login credentials while I am already logged in, in Confluence in another tab.

I have tried the solutions in Atlassian article:

<https://confluence.atlassian.com/confkb/logging-into-another-atlassian-application-logs-me-out-of-confluence-268043930.html?_ga=2.257760779.1858169875.1525698931-99236563.1519134127>

- Option 1 gives me HTTP error 404.

- Option 2 asks me for login again.

- Option 1 + option 2 gives me HTTP error.

How should I fix this?


Answers:
author: AnnWorley
body: Hi,

I understand when you followed [Logging into another Atlassian application logs me out of Confluence](https://confluence.atlassian.com/confkb/logging-into-another-atlassian-application-logs-me-out-of-confluence-268043930.html) you were not able to set a context path or change the cookie ID as described in the article.

Did you restart Confluence and change the base URL after adding the context path to the server.xml? Was Confluence restarted after changing the cookie setting? The 404 implies the context path was not set and the behavior of getting logged out when logged into Jira sounds like the cookies are still overwriting each other with the same name.

Thanks,

Ann

comments: author: Fr0zt
body: Hello.

Yes, I have restarted Confluence and changed the base URL after adding the context path to server.xml. And I also restarted it after changing the cookie setting.

Do you have any idea how to solve this issue? Can you help me?


author: AnnWorley
body: Please post your context directive from your server.xml with the context path added - maybe I can spot something of use. It should be similar to:

    <Context path="/confluence" docBase="${catalina.home}/confluence" reloadable="false" useHttpOnly="true">


author: Fr0zt
body: In Confluence, I have this server.xml:

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

<Context path="/kb" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
<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>
```

In Jira I have this:

```
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

<Context docBase="${catalina.home}/atlassian-jira" path="/jira" reloadable="false" useHttpOnly="true">


<Resource auth="Container" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60" name="UserTransaction" type="javax.transaction.UserTransaction"/>
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
</Context>

</Host>
```


author: Fr0zt
body: So, do you have any idea about this?


author: AnnWorley
body: The server.xml context paths you posted look fine. Is it possible your browser is caching the error page or that old cookies are present? Please try with a different browser or clear all the cookies and cache.


author: Fr0zt
body: I tried with a different browser. The same thing happens: When I try to access the Confluence URL I get a "Log in to Confluence" pop up. Even though I am logged in.

![xxx.png](https://community.atlassian.com/t5/image/serverpage/image-id/22052iDF1734019A4ED497/image-dimensions/413x422?v=v2 "xxx.png")


Tags: confluence-server

jira-service-desk

server