Logs are full of DVCS Sync warnings: "found more than one match for"

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 syncing a DVCS Account (Bitbucket Cloud, Github, Github Enterprise), JIRA throws a lot of warnings and the sync may fail intermittently:

1 2 2018-06-13 09:26:55,367 DVCSConnector.MessageExecutor:thread-1 WARN anonymous 574x1658718x1 qhlua0 10.0.0.108 /rest/bitbucket/1.0/repository/579/sync [c.a.j.p.d.dao.impl.MessageQueueItemAoDaoImpl] found more than one match for 956 com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer 2018-06-13 09:26:55,367 DVCSConnector.MessageExecutor:thread-1 WARN anonymous 574x1658718x1 qhlua0 10.0.0.108 /rest/bitbucket/1.0/repository/579/sync [c.a.j.p.d.dao.impl.MessageQueueItemAoDaoImpl] found more than one match for 957 com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer

The key phrase here is found more than one match for <Message_ID>.

Cause

There are duplicate Sync entries for individual message IDs in the database. This SQL query can be run to find them out:

Query (MySQL)

1 SELECT message_id, queue, count(3) FROM AO_E8B6CC_MESSAGE_QUEUE_ITEM GROUP BY message_id, queue HAVING count(3) > 1;

Query (PostgreSQL)

1 select "MESSAGE_ID", "QUEUE", count(3) from "AO_E8B6CC_MESSAGE_QUEUE_ITEM" as ao group by ao."MESSAGE_ID", ao."QUEUE" having count(3) >1;

Output

1 2 3 4 5 6 7 8 9 SELECT message_id, queue, count(3) FROM AO_E8B6CC_MESSAGE_QUEUE_ITEM GROUP BY message_id, queue HAVING count(3) > 1; +------------+----------------------------------------------------------------------------------+----------+ | message_id | queue | count(3) | +------------+----------------------------------------------------------------------------------+----------+ | 956 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 2 | +------------+----------------------------------------------------------------------------------+----------+ | 957 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 3 | +------------+----------------------------------------------------------------------------------+----------+ 2 rows in set (0.00 sec)

In this specific example, there are 2 entries for message ID 956 and 3 entries for message ID 957 in the same queue BitbucketSynchronizeActivity. JIRA will throw a lot of warnings for these in the logs.

The sync may fail if there are too many duplicate entries (JIRA keeps retrying probably leading to Rate Limit Exceeded).

Resolution

Upon identifying the message IDs with duplicate entries, run this query to list them down (replace 956 and 957 with the right message IDs identified above):

Query (MySQL)

1 SELECT message_id, queue, id FROM AO_E8B6CC_MESSAGE_QUEUE_ITEM WHERE message_id IN (956, 957);

Query (PostgreSQL)

1 SELECT "MESSAGE_ID","QUEUE","ID" FROM "AO_E8B6CC_MESSAGE_QUEUE_ITEM" WHERE "MESSAGE_ID" IN (956, 957);

Output

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 SELECT message_id, queue, id FROM AO_E8B6CC_MESSAGE_QUEUE_ITEM WHERE message_id IN (956, 957); +------------+----------------------------------------------------------------------------------+----------+ | message_id | queue | id | +------------+----------------------------------------------------------------------------------+----------+ | 956 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 10002 | +------------+----------------------------------------------------------------------------------+----------+ | 956 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 10003 | +------------+----------------------------------------------------------------------------------+----------+ | 957 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 20004 | +------------+----------------------------------------------------------------------------------+----------+ | 957 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 20005 | +------------+----------------------------------------------------------------------------------+----------+ | 957 | com.atlassian.jira.plugins.dvcs.sync.BitbucketSynchronizeActivityMessageConsumer | 20006 | +------------+----------------------------------------------------------------------------------+----------+ 5 rows in set (0.00 sec)

Delete all the duplicate entries with older (smaller) IDs (keep only 1 entry for each message ID) then restart JIRA. In this example 10002, 20004, and 20005 are to be deleted:

Query (MySQL)

1 DELETE FROM AO_E8B6CC_MESSAGE_QUEUE_ITEM WHERE id IN (10002, 20004, 20005);

Query (PostgreSQL)

1 DELETE FROM "AO_E8B6CC_MESSAGE_QUEUE_ITEM" WHERE "ID" IN (10002, 20004, 20005);

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.