JIRA throws Internal Server Error when a user attempts a log in

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When a user tries to log in, they can face the following error message:

1 An internal server error occurred when requesting resource

A screenshot of log in attempt

(Auto-migrated image: description temporarily unavailable)

ℹ️ A 500 error screen may appear instead

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 12 2015-04-01 14:58:42,491 http-bio-8080-exec-23 DEBUG [500ErrorPage.93a7827e-6dbd-4247-b393-5e2806c81e8c] { generalInfo = { interpretedMsg = , cause = java.lang.IllegalArgumentException: guid should be of length 32 (as encoded by getGUIDAsString), stacktrace = java.lang.IllegalArgumentException: guid should be of length 32 (as encoded by getGUIDAsString) [^] at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) [^] at com.atlassian.crowd.directory.ldap.util.GuidHelper.encodeGUIDForSearch(GuidHelper.java:59) [^] at com.atlassian.crowd.search.ldap.filter.EqualsExternalIdFilter.encodeValue(EqualsExternalIdFilter.java:28) [^] at org.springframework.ldap.filter.CompareFilter.<init>(CompareFilter.java:39) [^] at org.springframework.ldap.filter.EqualsFilter.<init>(EqualsFilter.java:40) [^] at com.atlassian.crowd.search.ldap.filter.EqualsExternalIdFilter.<init>(EqualsExternalIdFilter.java:15) [^] at com.atlassian.crowd.search.ldap.ActiveDirectoryQueryTranslaterImpl.getStringTermEqualityFilter(ActiveDirectoryQueryTranslaterImpl.java:81)

Cause

There is inconsistency in the external_id column of the cwd_user table in the database.

There is a bug report that covers a specific situation where this error might also happen: JRASERVER-41333 - Migrated users that already existed on LDAP directory are unable to login.

Workaround

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Get the directory's ID;

    1 SELECT id, directory_name FROM cwd_directory WHERE directory_type = 'DELEGATING';
  2. Remove the value for external_id of the migrated users directly on the cwd_user table in JIRA's database;

    • For MySQL and PostgreSQL

      1 UPDATE cwd_user SET external_id = '' WHERE directory_id = <directory-id>;
    • For Microsoft SQL Server:

      1 UPDATE cwd_user SET external_id = NULL WHERE directory_id = <directory-id>;
  3. Restart JIRA;

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.