Trying to link Confluence to Jira ServiceDesk and getting a Status 401 error
Asked by Wade Grimm:

Hi there, I'm new to ServiceDesk, Confluence and Insight. Just setting up a demo environment and am having issues connecting(linking) the Confluence instance to the Service Desk instance.

at the /setup/connecttojira-start.action url I put in all the relevant info (verified the username and password several times) and when I click next I get a System Error message:

I thought a 401 might be an unauthorized message but I've triple checked the username and password

Any help would be appreciated

Cause  
java.lang.RuntimeException: Error while setting up connection to Jira  
at com.atlassian.confluence.setup.actions.ConnectToJiraAction.configureJira(ConnectToJiraAction.java:223)

caused by: com.atlassian.dragonfly.api.JiraIntegrationConfigurationException: cannot create application in Jira. Status Code =401  
at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.createApplicationInCrowd(CrowdIntegrationConfiguratorImpl.java:87)


Answers:
author: Dmitriy Smotrov (dsxack)
body: I have the same error

comments: author: Wade Grimm
body: Well at least I'm not the only one :)

Hopefully someone will have an answer for us.


author: Dmitriy Smotrov (dsxack)
body: In JIRA logs everything is fine, authentication has PASSED:

```
2020-11-10 23:22:45,625+0000 http-nio-8080-exec-8 anonymous 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1c9livd]

2020-11-10 23:22:45,647+0000 http-nio-8080-exec-8 dsxack 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,696+0000 http-nio-8080-exec-9 anonymous 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1yf9lub]

2020-11-10 23:22:45,731+0000 http-nio-8080-exec-9 dsxack 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,776+0000 http-nio-8080-exec-6 anonymous 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HttpSession created [18mn1zg]

2020-11-10 23:22:45,804+0000 http-nio-8080-exec-6 dsxack 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,987+0000 http-nio-8080-exec-5 anonymous 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HttpSession created [1vcuxiq]

2020-11-10 23:22:46,010+0000 http-nio-8080-exec-5 dsxack 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:46,153+0000 http-nio-8080-exec-3 anonymous 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application HttpSession created [3w9g0h]

2020-11-10 23:22:46,170+0000 http-nio-8080-exec-3 dsxack 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application The user 'dsxack' has PASSED authentication.
```

But in confluence logs I see the same error as you:

```
Caused by: com.atlassian.dragonfly.api.JiraIntegrationConfigurationException: cannot create application in Jira. Status Code =401

 at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.createApplicationInCrowd(CrowdIntegrationConfiguratorImpl.java:87)

 at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.configureCrowdAuthentication(CrowdIntegrationConfiguratorImpl.java:49)

 at com.atlassian.confluence.setup.actions.ConnectToJiraAction.configureJira(ConnectToJiraAction.java:219)

 ... 386 more
```

In nginx access logs I have 401 error:

```
192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 534 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 2326 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 41 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "PUT /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HTTP/1.1" 201 208 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 64 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 654 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "PUT /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HTTP/1.1" 204 0 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 541 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"

62.217.185.142 - - [11/Nov/2020:00:22:46 +0100] "POST /setup/connecttojira.action HTTP/1.1" 500 64832 "https://confluence.scloud.dsxack.com/setup/connecttojira-start.action" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /opensearch/osd.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /bootstrap/selectsetupstep.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /setup/setupusermanagementchoice-start.action HTTP/1.1" 200 2126 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
```

I see the Confluence or JIRA (I don't know for sure) have an 503 error error at this request: <https://docs.atlassian.com/mywork-confluence-host-plugin/REST/0.1.1582/#id265678>

```
192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"
```

After that, I have a 401 error

```
192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"
```


author: Dmitriy Smotrov (dsxack)
body: In JIRA logs everything is fine, authentication has PASSED:

```
2020-11-10 23:22:45,625+0000 http-nio-8080-exec-8 anonymous 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1c9livd]

2020-11-10 23:22:45,647+0000 http-nio-8080-exec-8 dsxack 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,696+0000 http-nio-8080-exec-9 anonymous 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1yf9lub]

2020-11-10 23:22:45,731+0000 http-nio-8080-exec-9 dsxack 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,776+0000 http-nio-8080-exec-6 anonymous 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HttpSession created [18mn1zg]

2020-11-10 23:22:45,804+0000 http-nio-8080-exec-6 dsxack 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,987+0000 http-nio-8080-exec-5 anonymous 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HttpSession created [1vcuxiq]

2020-11-10 23:22:46,010+0000 http-nio-8080-exec-5 dsxack 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:46,153+0000 http-nio-8080-exec-3 anonymous 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application HttpSession created [3w9g0h]

2020-11-10 23:22:46,170+0000 http-nio-8080-exec-3 dsxack 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application The user 'dsxack' has PASSED authentication.
```

But in confluence logs I see the same error as you:

```
Caused by: com.atlassian.dragonfly.api.JiraIntegrationConfigurationException: cannot create application in Jira. Status Code =401

 at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.createApplicationInCrowd(CrowdIntegrationConfiguratorImpl.java:87)

 at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.configureCrowdAuthentication(CrowdIntegrationConfiguratorImpl.java:49)

 at com.atlassian.confluence.setup.actions.ConnectToJiraAction.configureJira(ConnectToJiraAction.java:219)

 ... 386 more
```

In nginx access logs I have 401 error:

```
192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 534 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 2326 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 41 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "PUT /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HTTP/1.1" 201 208 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 64 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 654 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "PUT /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HTTP/1.1" 204 0 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 541 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"

62.217.185.142 - - [11/Nov/2020:00:22:46 +0100] "POST /setup/connecttojira.action HTTP/1.1" 500 64832 "https://confluence.scloud.dsxack.com/setup/connecttojira-start.action" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /opensearch/osd.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /bootstrap/selectsetupstep.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /setup/setupusermanagementchoice-start.action HTTP/1.1" 200 2126 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
```

I see the Confluence or JIARA (I don't know for sure) have an 503 error error at this request: <https://docs.atlassian.com/mywork-confluence-host-plugin/REST/0.1.1582/#id265678>

```
192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"
```

After that, I have a 401 error

```
192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"
```


author: Wade Grimm
body: My setup is very basic, Windows 2019 Std vm, with all three components installed on the one server.


author: Dmitriy Smotrov (dsxack)
body: In JIRA logs everything is fine, authentication has PASSED:

```
2020-11-10 23:22:45,625+0000 http-nio-8080-exec-8 anonymous 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1c9livd]

2020-11-10 23:22:45,647+0000 http-nio-8080-exec-8 dsxack 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,696+0000 http-nio-8080-exec-9 anonymous 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1yf9lub]

2020-11-10 23:22:45,731+0000 http-nio-8080-exec-9 dsxack 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,776+0000 http-nio-8080-exec-6 anonymous 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HttpSession created [18mn1zg]

2020-11-10 23:22:45,804+0000 http-nio-8080-exec-6 dsxack 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,987+0000 http-nio-8080-exec-5 anonymous 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HttpSession created [1vcuxiq]

2020-11-10 23:22:46,010+0000 http-nio-8080-exec-5 dsxack 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:46,153+0000 http-nio-8080-exec-3 anonymous 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application HttpSession created [3w9g0h]

2020-11-10 23:22:46,170+0000 http-nio-8080-exec-3 dsxack 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application The user 'dsxack' has PASSED authentication.
```

But in confluence logs I see the same error as you:

```
Caused by: com.atlassian.dragonfly.api.JiraIntegrationConfigurationException: cannot create application in Jira. Status Code =401

 at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.createApplicationInCrowd(CrowdIntegrationConfiguratorImpl.java:87)

 at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.configureCrowdAuthentication(CrowdIntegrationConfiguratorImpl.java:49)

 at com.atlassian.confluence.setup.actions.ConnectToJiraAction.configureJira(ConnectToJiraAction.java:219)

 ... 386 more
```

In nginx access logs I have 401 error:

```
192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 534 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 2326 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 41 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "PUT /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HTTP/1.1" 201 208 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 64 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 654 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "PUT /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HTTP/1.1" 204 0 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 541 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"

62.217.185.142 - - [11/Nov/2020:00:22:46 +0100] "POST /setup/connecttojira.action HTTP/1.1" 500 64832 "https://confluence.scloud.dsxack.com/setup/connecttojira-start.action" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /opensearch/osd.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /bootstrap/selectsetupstep.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /setup/setupusermanagementchoice-start.action HTTP/1.1" 200 2126 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
```

I see the Confluence or JIARA (I don't know for sure) have an 503 error error at this request: <https://docs.atlassian.com/mywork-confluence-host-plugin/REST/0.1.1582/#id265678>

```
192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"
```

After that, I have a 401 error

```
192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"
```


author: Dmitriy Smotrov (dsxack)
body: My comments have been removed (

And I tried so hard to give more information


author: Dmitriy Smotrov (dsxack)
body: [@Wade Grimm](/t5/user/viewprofilepage/user-id/4134701) I solved my problem chose the first option: do not connect Confluence to JIRA at the start and create Confluence admin user.

After that I went to jira applications links:

https://jira-domain/plugins/servlet/applinks/listApplicationLinks

and added link to the Confluence:

https://confluence-domain/

After that JIRA and Confluence were linked.


author: Dmitriy Smotrov (dsxack)
body: ![Screenshot 2020-11-11 at 03.28.41.png](https://community.atlassian.com/t5/image/serverpage/image-id/117778i36F556409FD79F36/image-size/large?v=v2&px=999 "Screenshot 2020-11-11 at 03.28.41.png")


author: Dmitriy Smotrov (dsxack)
body: It uses different users for Confluence and JIRA but it is fine for me.


author: Wade Grimm
body: Thanks for this, just uninstalling it now and will try this. I'll post back if I am successful


author: Wade Grimm
body: [@Dmitriy Smotrov (dsxack)](/t5/user/viewprofilepage/user-id/1048054) That seems to have fixed that issue! thank you for that. Now to finish the setup so I can properly demo this product!

Cheers


author: Dmitriy Smotrov (dsxack)
body: [@Wade Grimm](/t5/user/viewprofilepage/user-id/4134701) keep in mind Atlassian will stop selling server licenses in February 2021

Link: <https://www.atlassian.com/migration/key-offering-changes?tab=server-dates#important-dates>

Link2: <https://www.atlassian.com/migration/journey-to-cloud>


author: Bar?? T?rkkal
body: Before setting up Jira connection from confluence, add jira admin user to Confluence. This worked for me


author: Dmitriy Smotrov (dsxack)
body: In JIRA logs everything is fine, authentication has PASSED:

```
2020-11-10 23:22:45,625+0000 http-nio-8080-exec-8 anonymous 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1c9livd]

2020-11-10 23:22:45,647+0000 http-nio-8080-exec-8 dsxack 1402x895x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,696+0000 http-nio-8080-exec-9 anonymous 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo HttpSession created [1yf9lub]

2020-11-10 23:22:45,731+0000 http-nio-8080-exec-9 dsxack 1402x896x1 - 192.168.10.1 /rest/applinks/1.0/authenticationinfo The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,776+0000 http-nio-8080-exec-6 anonymous 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HttpSession created [18mn1zg]

2020-11-10 23:22:45,804+0000 http-nio-8080-exec-6 dsxack 1402x897x1 - 192.168.10.1 /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:45,987+0000 http-nio-8080-exec-5 anonymous 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HttpSession created [1vcuxiq]

2020-11-10 23:22:46,010+0000 http-nio-8080-exec-5 dsxack 1402x899x1 - 192.168.10.1 /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth The user 'dsxack' has PASSED authentication.

2020-11-10 23:22:46,153+0000 http-nio-8080-exec-3 anonymous 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application HttpSession created [3w9g0h]

2020-11-10 23:22:46,170+0000 http-nio-8080-exec-3 dsxack 1402x901x1 - 192.168.10.1 /rest/appmanagement/1/application The user 'dsxack' has PASSED authentication.
But in confluence logs I see the same error as you:

Caused by: com.atlassian.dragonfly.api.JiraIntegrationConfigurationException: cannot create application in Jira. Status Code =401

at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.createApplicationInCrowd(CrowdIntegrationConfiguratorImpl.java:87)

at com.atlassian.dragonfly.core.CrowdIntegrationConfiguratorImpl.configureCrowdAuthentication(CrowdIntegrationConfiguratorImpl.java:49)

at com.atlassian.confluence.setup.actions.ConnectToJiraAction.configureJira(ConnectToJiraAction.java:219)

... 386 more

```

In nginx access logs I have 401 error:

```
192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 534 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/authenticationinfo HTTP/1.1" 200 97 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/1.0/manifest HTTP/1.1" 200 2326 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 41 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:45 +0100] "PUT /rest/applinks/1.0/applicationlink/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b HTTP/1.1" 201 208 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:45 +0100] "GET /rest/applinks/latest/capabilities HTTP/1.1" 200 64 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 654 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "PUT /rest/applinks/3.0/status/b719b0e8-0a55-34bc-9a3c-5e0add55ca8b/oauth HTTP/1.1" 204 0 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"

192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "GET /plugins/servlet/oauth/consumer-info HTTP/1.1" 200 541 "-" "Apache-HttpClient/4.5.12 (Java/11.0.9)"

192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"

62.217.185.142 - - [11/Nov/2020:00:22:46 +0100] "POST /setup/connecttojira.action HTTP/1.1" 500 64832 "https://confluence.scloud.dsxack.com/setup/connecttojira-start.action" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /opensearch/osd.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /bootstrap/selectsetupstep.action HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

62.217.185.142 - - [11/Nov/2020:00:22:47 +0100] "GET /setup/setupusermanagementchoice-start.action HTTP/1.1" 200 2126 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"

```

I see the Confluence or JIARA (I don't know for sure) have an 503 error error at this request: <https://docs.atlassian.com/mywork-confluence-host-plugin/REST/0.1.1582/#id265678>

```
192.168.10.155 - - [11/Nov/2020:00:22:46 +0100] "POST /rest/mywork/1/client HTTP/1.1" 503 771 "-" "Apache-HttpClient/4.5.10 (Java/1.8.0_272)"
```

After that, I have a 401 error

```
192.168.10.155 - dsxack [11/Nov/2020:00:22:46 +0100] "POST /rest/appmanagement/1/application?include-request-address=true HTTP/1.1" 401 176 "-" "Jakarta Commons-HttpClient/3.1"
```


Tags: confluence-server

server