On setting up confluence with jira user management, confluence giving me an error.
Asked by David Raba:

Jira: 8.16.0

Confluence version:7.12

### Cause {#toc-hId-1282050888}

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

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: Nic Brough -Adaptavist-
body: The 401 code in the status implies that Confluence is not authorised to use it (think of a http 401 error) Check the settings you've put for the Jira server connection.

comments: author: rvs Support
body: I have tried a very simple setup in a local VM:

the credentials for the admin user are just:

user: admin

pass: admin

I copy and pasted it like I did here. (I also tried logging into Jira with that method, it works)

Tried several times, every time I get 401. Which permissions does that user require?

I also noticed that Jira might not consider itself fully set up without the first project. So I assume it is wort mentioning that I created exactly one project. It got auto populated with example issues.

I created a non admin user to check if I would get the same error:

The given credential is not a valid Jira admin.

Not the case. If I try a non admin it just tells me in red letters.


author: rvs Support
body: Further investigation in combination with the knowledge obtained by testing a less privileged user leads me to assume that I need to set up an application link. At which I am currently stuck.

My current best guess is that I don't know the "application name". I looked at our existing install ad it seems to include some kind of unique ID, Where can I find out that id?

I already tried the user name I use to connect since it also asked for a password.

also: attempting to connect to a wrong address has its own red error message too:

Connection refused. Check if an instance of Jira 4.3 or later is running on the given url.

This means I am also fairly certain that the address has to be correct.


author: rvs Support
body: Jira security log says I pass authentification (and also that I need to configure the timezone, also yes I treid another user with proper privileges in case it just does not like the "superuser" or something):

2022-04-12 09:44:56,665+0000 http-nio-8080-exec-22 anonymous 584x838x1 - 192.168.122.156 /rest/applinks/1.0/authenticationinfo HttpSession created \[9vcvlr\]  
2022-04-12 09:44:56,706+0000 http-nio-8080-exec-22 confluence_admin 584x838x1 - 192.168.122.156 /rest/applinks/1.0/authenticationinfo The user 'confluence_admin' has  
PASSED authentication.  
2022-04-12 09:44:56,722+0000 http-nio-8080-exec-24 anonymous 584x839x1 - 192.168.122.156 /rest/applinks/1.0/authenticationinfo HttpSession created \[6yqsu9\]  
2022-04-12 09:44:56,723+0000 http-nio-8080-exec-24 confluence_admin 584x839x1 - 192.168.122.156 /rest/applinks/1.0/authenticationinfo The user 'confluence_admin' has  
PASSED authentication.  
2022-04-12 09:44:56,740+0000 http-nio-8080-exec-2 anonymous 584x840x1 - 192.168.122.156 /rest/applinks/1.0/applicationlink/79e8a7b1-ceec-361d-8b62-043c0137e4b5 HttpS  
ession created \[178g5ek\]  
2022-04-12 09:44:56,740+0000 http-nio-8080-exec-2 confluence_admin 584x840x1 - 192.168.122.156 /rest/applinks/1.0/applicationlink/79e8a7b1-ceec-361d-8b62-043c0137e4b  
5 The user 'confluence_admin' has PASSED authentication.  
2022-04-12 09:44:56,853+0000 http-nio-8080-exec-6 anonymous 584x842x1 - 192.168.122.156 /rest/applinks/3.0/status/79e8a7b1-ceec-361d-8b62-043c0137e4b5/oauth HttpSess  
ion created \[1o9oaun\]  
2022-04-12 09:44:56,854+0000 http-nio-8080-exec-6 confluence_admin 584x842x1 - 192.168.122.156 /rest/applinks/3.0/status/79e8a7b1-ceec-361d-8b62-043c0137e4b5/oauth T  
he user 'confluence_admin' has PASSED authentication.  
2022-04-12 09:44:56,979+0000 http-nio-8080-exec-11 anonymous 584x844x1 - 192.168.122.156 /rest/appmanagement/1/application HttpSession created \[v6uq94\]  
2022-04-12 09:44:56,980+0000 http-nio-8080-exec-11 confluence_admin 584x844x1 - 192.168.122.156 /rest/appmanagement/1/application The user 'confluence_admin' has PAS  
SED authentication.  


Tags: confluence-server

jira

server

user-management