Connection test failed. Response from the server: com.atlassian.crowd.exception.ApplicationPermissionException:
Asked by Rebecca Smith:

I am trying to connect Confluence to JIRA for user authentication. I have followed all the steps (Even disabled whitelisting on both) but when I test the connection I get.

Connection test failed. Response from the server:  
com.atlassian.crowd.exception.ApplicationPermissionException: ??YYs??\~????Y?-+? $p?P??J??-????n??a????6ks2ax?P?????O?\^ttT?-6"?V? ?:R?o!????y?\|?1I??8???\^? ?d?I?\>?Pyyv?Z???$??W??:Z???L(b???\*? B?A?????\[? M$? e????\^7??-Mp??\|z???????oO?????'???1G2V?G?avj????@9?? ?? 7??Q6\`?H???\^?-\\ \[v?\]??\[NF????F??tK?4+??C?F\]?(?{X"??I?+? F???Le0???Q?=-???{?K??:b???sn h?? J8?Mm?????\`Cp ?a??\`9???\>??bc??YB?\&\|????}p???;}l???#n?F)?\`C?5? TT9???b??\&_??5H??r?\\? gT?:?Y??J?J?(??Rp?+(??'$ ?c?=0? %hM??V?J???0 O0??n\\?U??(??B(?o??8\| ?J?A??4W 5??@??j'B?\`3?????8?cfB?C(?? ?\&??(???Zs?v?0}???\&?????\\?,???? ?I?E)?n??(???????8t? ?U????Mb"\`??k?{mR??Zh?ms??{? ??(p?!q}? o?e:?\&?e?$Q???Fv?\&??d-x(z\\,?(?Q?r ?iD?K?uq??n"??\]???'7h?y????8?nn???\~? ?p?P???=g:7 34\]?i???A??????f??C2?B?y\& ?3?M? R?2J?+???}????????SH3????D? ??? 8?? ??.??k?("K?h/???j???\>?B???5???????? ??S? ??/??j??G?\`1?T???\*?G?t {n6rm?2l? g\^h9!??????W??ha?U?X\^??\|?????\>?W??7C??ln??4?\|b?=s:????????7?? -L?,??SIQ??_?\^?W/??J??+???p ?B?wu6q\&??xz??n?x?P\\?????j??P?c?V4\\\^?\*,???l,9?U?T?1?m?-?3?h??4?@??RD???$(.X?Y?P???????$ ???\`1f?@? ?1??=?{3???R????????(?1??\\\`???p\^r?EC?8??\~\`??QZ???D ???B??? ?!?\`)? ?d????? ur}!?

They are both hosted on the same box, and JIRA is authenticating fine. I have connected to the rest service through a browser and get the same. Authentication details are correct. It just seems that JIRA is returning rubbish.


Answers:
author: Jon Matthews
body: I received this error as well when attempting to connect to our JIRA instance via the URL we had setup with Apache. Apache in our instance is proxying to our JIRA instance. I used the FQDN of the JIRA server including the port number and everything worked great.

comments: author: Kenneth Flynn
body: We are also using Apache and have just started getting the same error. The line noise up above accurately reflects what we see both in the logs and the user interface.


author: John Goetz
body: The first problem, the funky text in the response, is solved with vlad's solution: turn off GZip compression.

Then you can read the actual error message, which is really a 403 error.

My solution is to put your server's IP address in the IP Addresses box (no need to put the port number), even if you are using the same server for both JIRA and Bitbucket (or any other Atlassian product).

comments: author: bryan.bai@wdc.com
body: this is the solution to solve my problem. somehow our crucible server cannot resolve the common name of jira server (crowd), after add the entry into /etc/hosts, it works.

the first step: disable gzip. allowing me to see the real error.


author: vlad navrocky
body: To fix this rubbish message try to disable GZip compression in JIRA general settings:snapshot2.png

Good luck  
[](https://community.atlassian.com/t5/Confluence-questions/Connection-test-failed-Response-from-the-server-com-atlassian/qaq-p/172563?attachment-id=1899){#link_1187f75206b681}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/28833/1/snapshot2.png){#display_1187f75206b681_0}


author: toparch
body: After created a new "user directory", then this issue gone.


author: John Mohan
body: I faced the same issue after installing a new confluence instance and restoring data from another instance. We use MySQL as the external DB.

I was unable to login via the GUI and the way I resolved this is by;

- logging into the MySQL instance

- use confluence; (or the relevant DB name)

- select \* from cwd_directory_attribute;

This displays all CROWD configs details and it would contain the config of the Confluence instance you restored from. Modify as needed and restart confluence.


author: John Pavlick
body: I've been fighting with this all morning.

The answer was surprising. I have Confluence hooked up to JIRA via an application link, and when the application link was created, it set itself up to use the JIRA user directory.  

I went into the Confluence admin and noticed that the user directory entry was set to type "Atlassian Crowd", not "Atlassian JIRA".  

So in Crucible, I created a new user directory link and chose "Atlassian Crowd" as the user directory source - NOT "Atlassian JIRA" - and it worked.


author: Enrique Cadalso
body: Hello,

I had this problem after cloning JIRA and Confluence servers. I solved the problem making sure the servers were able to resolve themselves ok, that the hostnames were ok. Their hostnames were setup with the original servers hostnames. I changed the hosts file to be like this.

```
root@jira:~# cat /etc/hosts
```

```
...
127.0.0.1 localhost
127.0.1.1 jira.mydomain.com 
NNN.NNN.NNN.NNN jira.mydomain.com jira
...
```

```
root@jira:~# hostname --fqdn
jira.mydomain.com
```

```
?
```

Cheers,

Enrique.


author: vlad navrocky
body: Plz check my suggestion below


author: Vital4ik
body: I am having same issue as well. application links are established, application/pw is created, whitelist is set, yet it is still not working


author: Chris Dunne
body: Hi

Did you resolve this? I am getting the exact same error.

Chris


author: Thiago Zandona
body: Hi Thomas,

The first line of the exception is the only one readable. As far as I can see you might be facing the issue reported below:

<https://confluence.atlassian.com/display/CONFKB/Exception+when+delegating+user+management+to+JIRA>

If that's not the case I would suggest you to open a case against Atlassian Support and add there your [support.zip](https://confluence.atlassian.com/display/DOC/Troubleshooting+Problems+and+Requesting+Technical+Support#TroubleshootingProblemsandRequestingTechnicalSupport-Creatingasupportzipfile) file for deep analysis on the logs.

Cheers,


Tags: confluence-administration