Not able to delete DVCS account in Jira Data Center

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

Summary

This page describes a problem where users are not able to delete a DVCS account. If they click on the Delete button, it doesn't do anything, and the account is still visible on the page.

Environment

Jira 8.x, 9.x

Diagnosis

  • Enable debug level logging for the packagecom.atlassian.jira.plugins.dvcs.scheduler.organizations. This will print account deletion releated logs in atlassian-jira.log file. Make sure to set this configuration before deleting the account.

  • In logs observed that Job for account or organisation deletion already exists.

    1 2023-05-25 22:30:28,590-0700 http-nio-8080-exec-26 url: /rest/bitbucket/1.0/organization/61; user: SOMEUSER DEBUG SOMEUSER 1350x10168068x9 abcd IP1,IP2 /rest/bitbucket/1.0/organization/61 [c.a.j.p.d.scheduler.organizations.RepoSyncScheduler] Job with ID com.atlassian.jira.plugins.dvcs.scheduler.organizations.OrganizationRemoveJob:61 already exists, dropping request
  • Check output of following SQL query. We found that next_run column is empty. Thus there appears to be some inconsistency as this field is empty.

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 $ select * from clusteredjob c where job_runner_key like '%OrganizationRemoveJob%'; id | job_id | job_runner_key | sched_type | interval_millis | first_run | cron_expression | time_zone | next_run | version | parameters --------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------------+------------+-----------------+-----------+-----------------+-----------+----------+ ---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 357160 | com.atlassian.jira.plugins.dvcs.scheduler.organizations.OrganizationRemoveJob:61 | com.atlassian.jira.plugins.dvcs.scheduler.organizations.OrganizationRemoveJob | I | 0 | | | | | 2 | \xaced000573720037636f6d2e676f6f676c652e636f6d6d6f6e2e636f6c6c6563742e496d6d757461626c6542694d61702453657269616c697a6564466f726d000000000000000002000078720035636f6d2e676f6f676c652e636f6d6d6f6e2e636f6c6c6563742e496d6d757461626c654d617024536572696 16c697a6564466f726d00000000000000000200025b00046b6579737400135b4c6a6176612f6c616e672f4f626a6563743b5b000676616c75657371007e00027870757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c02000078700000000174000e6f7267616e697a6174696f6e49647571007e000 400000001737200116a6176612e6c616e672e496e746567657212e2a0a4f781873802000149000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b02000078700000003d (1 row)

Cause

  • When removing an organization/account, we should see a new scheduled job which can be inspected in theScheduler Detailsin Jira, the name should contain:OrganizationRemoveJob

  • We can inspect whether it ran or finished successfully.

  • In a happy path scenario no new synchronisation should start after an organisation is marked as deleted.

Solution

  • Deleting this job record should help in deletion of DVCS account as new Job can be created in database for account deletion. We can delete job with job_id which we can get from output of select query in Diagnosis section.

    1 delete from clusteredjob c where c.job_id = 'com.atlassian.jira.plugins.dvcs.scheduler.organizations.OrganizationRemoveJob:61';

Updated on March 3, 2025

Still need help?

The Atlassian Community is here for you.