Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-8147

Improve error message formatting upon failure to add JIRA as an external user directory

    XMLWordPrintable

Details

    Description

      Summary

      While hitting the problem/solution described on the KB below:

      A very convoluted stack trace is thrown by Stash, making it hard to identify what's actually causing the problem.

      Steps to Reproduce

      1. The issue happens while testing connection against a JIRA during the process of adding it as a User Management directory but we were unable to reproduce the circumstances.

      Expected Results

      JIRA is not added and the following exception is thrown on the application logs:

      2014-07-31 09:03:44,168 ERROR [http-bio-7990-exec-5] Csmarkus @1QMMOPRx543x995x0 8qk0ii 192.168.1.1 "POST /plugins/servlet/embedded-crowd/configure/jira/ HTTP/1.1" c.a.c.e.a.ConfigurationController Configuration test failed for user directory: [ JIRA Server], type: [ CROWD ]
      com.atlassian.crowd.exception.runtime.OperationFailedException: com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. Go to JIRA home
          at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.testConnection(CrowdDirectoryServiceImpl.java:78) ~[embedded-crowd-core-2.7.2.jar:na]
          at com.atlassian.stash.internal.crowd.SecureCrowdDirectoryServiceImpl.testConnection(SecureCrowdDirectoryServiceImpl.java:52) ~[stash-service-impl-3.2.0.jar:na]
          ...
      Caused by: com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. Go to JIRA home
          ...
      

      Actual Results

      The screen below is shown:

      Stash/Bitbucket shows a convoluted stack trace in the application logs:

      2015-11-08 22:04:56,004 ERROR [http-nio-7990-exec-5] mdkf @1SQCJEZx1324x106x0 vtfg7z 10.64.220.154 "POST /plugins/servlet/embedded-crowd/configure/crowd/ HTTP/1.1" c.a.c.e.a.ConfigurationController Configuration test failed for user directory: [ JIRA User Directory], type: [ CROWD ]
      com.atlassian.crowd.exception.runtime.OperationFailedException: com.atlassian.crowd.exception.ApplicationPermissionException: ���������X[S�8~�W�yض;�s�RR����N) ��0 �:I�����#�v|Qvf�HG߹_|��1��� ���B�;~�S ?q1e�B����_ � 9�h��{�fΗ��ã7Q6�u��Α�����1 ��V�;�$��.�p| i�Q ��y���Q� �Ý�(_yחgǛ�?��6[�W�DH��D��m)�N�|��y�)��8H�,���Q�LH� 2� s�����i� �&�ײj�c�x%qr@� uHԅ�KFAx��0i� eNZ��Ikt6i���.��Ai�HF�� D���W%D���O��؜�/ [,X�����$�l�(�'R��1� �)�tw�+��������l�1i��Bv�6�����M�-� ɭ���s�F� ���uY�8�u���Ub��j����$��ATUV!�f֡�|��d�F��f�bE�A���'"��>ڋ�Z�i a�y> ��(k`Q?�� G&q��&��i0#����C�z,�ȫ�22�L�2��Lg��# �'xb��J�R$�GI�Gކ:N���6��U1��J�r�n�V��T�&1�m�M|�*"���ǶL�z�L�$$,`���� =�����~7M�\���B�����������i�[Ǧ�ӆ����#kLy��}U���2mk�ۈ�7����H���:c��Ժ�߯��>��Ң���=鐈:�Da�EŰ~ð3�9����U��� ��, Q�_v�qmTW� � ����BH���oH��U~#��V �@�g ��R�_4��c%?����Pre�aݛ�i��s۔�5���av��N5;\{n�7ʼ䶕�1dK��2��A�b!88��{�a���eQ��/������.�O�);9�u^w���;��4$]�d=7���o�� �`}�1�^-����dK�Z�M)?������M�"L�z�:�0�K�;�h�k�Je�L���Z�ܙ`������m� ^9�]��/ �jq�E!g����_�#�i���"ؚ+��gC,,k렛e���=u>+3��%�~9�nV4�-|� �,+�P�3;tH�=؜]��u�Gp^����z�i*#Kj!�0C�', �� �KƦ��I��s�N�^Y_f�-��� ��-c�|㥰µ!䇎�� �7�.�oD��xxHGY߽]�ʙj�Yޘ�(���bR��1h���K(�+�l`��M�0��2�&j���!7:ۻ�DѰ �#L�kOR��+:qR�d'��xD�& �YY�>�ն�Y�����z��Ҁ�,��|�ɣQx���Ej���%���5��_�����a�#p��&�9�j�.|T?�`����Zumb� �"hK�(J��@��|�|��s4Ɣ\�$�o�:~���l��*�5����8O���Z��g��Nf�����=[xVOI6�\q��aF�A��/��s�� � h ���'Ɍ��� ST ��u�V[� ��6�BQ k�nL�ц�8>I-� �K;��]L��(��50�6 �C,OFԻ.�7�2��^�����x��;�ܱ�޸w�vK�ޓ��Y����C � bwboH�*Y����&N�n�&S����d4��"��gnX��G _R�.�#���iėpGX6�z1������6���Mo>}�M/�Ӟ�������Y�N�@�ځ!Ѥ�RŔ4`[" ��;'�����+b�e�f|w����$C�/�������ڊ��]��1�m��B��\���Gk�BSY�٧0�`GÚ�O?_]��+Ń ��{^S �e�'������a�f���4�  �����Z�����=�� ��!��6&�e�5���;�{o?��6���Jj��D7���z���Ci���2��({��i�~�^�fքІI'`�X=�#*  �R Ȥbg3��g_qg ��G��@MK(��̳4�ž�b('�fY�)W����Ϣ\�B8�mAlJ~?�B�3��������BlOB|�����} �LH��«�vd�nG�hJ�@Tg; �?�.�����Y�;� ��d;�F<��vU������?�k�TF.��
      	at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.testConnection(CrowdDirectoryServiceImpl.java:78) ~[embedded-crowd-core-2.8.4-m1.jar:na]
      	at com.atlassian.stash.internal.crowd.CustomizedCrowdDirectoryService.testConnection(CustomizedCrowdDirectoryService.java:43) ~[stash-service-impl-3.11.4.jar:na]
      	at com.atlassian.crowd.embedded.admin.ConfigurationController.onSubmit(ConfigurationController.java:95) ~[embedded-crowd-admin-plugin-1.8.4_1443094112000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) [applinks-plugin-4.3.7_1443094112000.jar:na]
      	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:181) [sitemesh-2.5-atlassian-11.jar:na]
      	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:85) [sitemesh-2.5-atlassian-11.jar:na]
      	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:88) [StashAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:109) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:103) [atlassian-trusted-apps-core-4.0.0.jar:na]
      	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79) [atlassian-oauth-service-provider-plugin-1.9.10_1443094112000.jar:na]
      	at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:36) [analytics-client-3.70.1_1443094116000.jar:na]
      	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) [analytics-client-3.70.1_1443094116000.jar:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:87) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:85) [stash-service-impl-3.11.4.jar:na]
      	at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) [ConfigurableWebFilter.class:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
      	... 228 frames trimmed
      Caused by: com.atlassian.crowd.exception.ApplicationPermissionException: ���������X[S�8~�W�yض;�s�RR����N) ��0 �:I�����#�v|Qvf�HG߹_|��1��� ���B�;~�S ?q1e�B����_ � 9�h��{�fΗ��ã7Q6�u��Α�����1 ��V�;�$��.�p| i�Q ��y���Q� �Ý�(_yחgǛ�?��6[�W�DH��D��m)�N�|��y�)��8H�,���Q�LH� 2� s�����i� �&�ײj�c�x%qr@� uHԅ�KFAx��0i� eNZ��Ikt6i���.��Ai�HF�� D���W%D���O��؜�/ [,X�����$�l�(�'R��1� �)�tw�+��������l�1i��Bv�6�����M�-� ɭ���s�F� ���uY�8�u���Ub��j����$��ATUV!�f֡�|��d�F��f�bE�A���'"��>ڋ�Z�i a�y> ��(k`Q?�� G&q��&��i0#����C�z,�ȫ�22�L�2��Lg��# �'xb��J�R$�GI�Gކ:N���6��U1��J�r�n�V��T�&1�m�M|�*"���ǶL�z�L�$$,`���� =�����~7M�\���B�����������i�[Ǧ�ӆ����#kLy��}U���2mk�ۈ�7����H���:c��Ժ�߯��>��Ң���=鐈:�Da�EŰ~ð3�9����U��� ��, Q�_v�qmTW� � ����BH���oH��U~#��V �@�g ��R�_4��c%?����Pre�aݛ�i��s۔�5���av��N5;\{n�7ʼ䶕�1dK��2��A�b!88��{�a���eQ��/������.�O�);9�u^w���;��4$]�d=7���o�� �`}�1�^-����dK�Z�M)?������M�"L�z�:�0�K�;�h�k�Je�L���Z�ܙ`������m� ^9�]��/ �jq�E!g����_�#�i���"ؚ+��gC,,k렛e���=u>+3��%�~9�nV4�-|� �,+�P�3;tH�=؜]��u�Gp^����z�i*#Kj!�0C�', �� �KƦ��I��s�N�^Y_f�-��� ��-c�|㥰µ!䇎�� �7�.�oD��xxHGY߽]�ʙj�Yޘ�(���bR��1h���K(�+�l`��M�0��2�&j���!7:ۻ�DѰ �#L�kOR��+:qR�d'��xD�& �YY�>�ն�Y�����z��Ҁ�,��|�ɣQx���Ej���%���5��_�����a�#p��&�9�j�.|T?�`����Zumb� �"hK�(J��@��|�|��s4Ɣ\�$�o�:~���l��*�5����8O���Z��g��Nf�����=[xVOI6�\q��aF�A��/��s�� � h ���'Ɍ��� ST ��u�V[� ��6�BQ k�nL�ц�8>I-� �K;��]L��(��50�6 �C,OFԻ.�7�2��^�����x��;�ܱ�޸w�vK�ޓ��Y����C � bwboH�*Y����&N�n�&S����d4��"��gnX��G _R�.�#���iėpGX6�z1������6���Mo>}�M/�Ӟ�������Y�N�@�ځ!Ѥ�RŔ4`[" ��;'�����+b�e�f|w����$C�/�������ڊ��]��1�m��B��\���Gk�BSY�٧0�`GÚ�O?_]��+Ń ��{^S �e�'������a�f���4�  �����Z�����=�� ��!��6&�e�5���;�{o?��6���Jj��D7���z���Ci���2��({��i�~�^�fքІI'`�X=�#*  �R Ȥbg3��g_qg ��G��@MK(��̳4�ž�b('�fY�)W����Ϣ\�B8�mAlJ~?�B�3��������BlOB|�����} �LH��«�vd�nG�hJ�@Tg; �?�.�����Y�;� ��d;�F<��vU������?�k�TF.��
      	at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.throwError(RestExecutor.java:639) ~[crowd-integration-client-rest-2.8.4-m1.jar:na]
      	at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:485) ~[crowd-integration-client-rest-2.8.4-m1.jar:na]
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:557) ~[crowd-integration-client-rest-2.8.4-m1.jar:na]
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:545) ~[crowd-integration-client-rest-2.8.4-m1.jar:na]
      	at com.atlassian.crowd.directory.RemoteCrowdDirectory.testConnection(RemoteCrowdDirectory.java:828) ~[crowd-remote-2.8.4-m1.jar:na]
      	at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.testConnection(CrowdDirectoryServiceImpl.java:69) ~[embedded-crowd-core-2.8.4-m1.jar:na]
      	... 19 common frames omitted
      

      Workaround

      Please apply the workaround described on:

      Attachments

        Issue Links

          Activity

            People

              crolf Christian
              tbomfim ThiagoBomfim (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: