Authentication from JIRA -> Confluence fails
Asked by Normann P_ Nielsen _Netic_:

The user presses authenticate:

![Screenshot 2021-05-05 at 10.28.44.png](/t5/image/serverpage/image-id/142100iAE7F217167E866A9/image-size/large?v=v2&px=999 "Screenshot 2021-05-05 at 10.28.44.png")

A new browser windows opens at <https://jira.server.dk/plugins/servlet/applinks/oauth/login-dance/authorize?applicationLinkID=1c0df139-0bb1-3398-ad56-xxxxxxxxx>

Fails with:

![Screenshot 2021-05-05 at 10.58.09.png](/t5/image/serverpage/image-id/142103iA3FD85F0FF2B5CE6/image-size/large?v=v2&px=999 "Screenshot 2021-05-05 at 10.58.09.png")

Jira Log:

`2021-05-05 10:25:22,954+0200 http-nio-6060-``exec``-70 url:` `/plugins/servlet/applinks/oauth/login-dance/authorize``; user: kfr@server.dk ERROR kfr@server.dk 625x3011565x4 18xgbds 77.243.59.220,0:0:0:0:0:0:0:1` `/plugins/servlet/applinks/oauth/login-dance/authorize` `[c.a.a.oauth.auth.OAuthApplinksServlet] An error occurred when performing the oauth` `'dance'` `for` `application link` `'Confluence (1c0df139-0bb1-3398-ad56-xxxxxxxx)` [https://docs.server.dk](https://docs.netic.dk/) `confluence'`

Apache in front of confluence:

`docs.server.dk:443 77.247.10.10 - - [05``/May/2021``:10:25:12 +0200]` `"POST /plugins/servlet/oauth/request-token HTTP/1.1"` `200 3734` `"-"` `"Apache-HttpClient/4.5.10 (Java/1.8.0_202)"`

Nothing in the atlassian-confluence.log

Everything else works - servers are on same subnet with only apache as reverse-proxy on.


Answers:
author: Thiago Masutti
body: Hi [@Normann P_ Nielsen _Netic_](/t5/user/viewprofilepage/user-id/664692)   
I hope you are well.

What if you enable **DEBUG** for package **com.atlassian.applinks** on both Confluence and Jira, do you get any additional detail from the logs if you reproduce the problem?

With the current information from the post is hard to understand exactly what the problem is, but the read time out could be related to what is described [in this KB](https://confluence.atlassian.com/jirakb/java-net-sockettimeoutexception-read-timed-while-making-a-request-to-a-remote-server-788958227.html), but it is better to collect more information before changing anything.

Aside of the Apache as a reverse-proxy, do you have an outbound proxy configured?  
If you do, please check [this KB](https://confluence.atlassian.com/jirakb/unable-to-create-reciprocal-link-when-creating-application-link-855541357.html) to confirm you have the full configuration, including the *bypass*.

A more verbose debugging you could use is described [in this KB article](https://confluence.atlassian.com/jirakb/how-to-enable-debug-logging-for-outgoing-http-connections-in-jira-952073102.html).  
Since the error is occurring when Jira tries to reach Confluence, then enabling DEBUG for **org.apache.http.headers** on Jira could unveil detailed information about the error.  
I would recommend that only if we can't find anything from the previous debug.

For a broader troubleshooting of Application Links, refer to [Troubleshoot application links](https://confluence.atlassian.com/applinks/troubleshoot-application-links-755338283.html "Troubleshoot application links") document.

Let us know if you find any additional information on the error with the additional debug.

Kind regards,  
Thiago Masutti


Tags: confluence-server

server