Actions in JIRA Fail due to Missing link detected in Global Rank table error
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
Symptoms
When trying to convert an issue into subtask, the process fails.
Attempting to view XML fails.
Attempting to create an issue can fail.
The following exceptions appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2012-08-24 15:42:32,648 http-8080-49 ERROR infddys 942x4114x1 4xb6xx 172.16.104.158 /secure/CreateSubTaskIssueDetails.jspa [atlassian.event.internal.EventPublisherImpl] There was an exception thrown trying to dispatch event 'com.atlassian.jira.event.issue.IssueEvent@29e8b157[issue=PROVPREVPMT-2626,comment=<null>,worklog=<null>,changelog=<null>,eventTypeId=1,sendMail=true,params={eventsource=workflow, baseurl=http://svn-bru-151.admbnet.be:8080},subtasksUpdated=false]' from the invoker 'com.atlassian.event.internal.SingleParameterMethodListenerInvoker@65c530da'.
java.lang.RuntimeException: Missing link detected in Global Rank table: Issue #55868 points to issue #55869 as next value, but that issue is not in the database.
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56)
at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:151)
at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:70)
at com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17)
at com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23)
at com.atlassian.jira.event.issue.IssueEventDispatcher.dispatchEvent(IssueEventDispatcher.java:254)
at com.atlassian.jira.event.issue.IssueEventDispatcher.dispatchEvent(IssueEventDispatcher.java:183)
at com.atlassian.jira.workflow.function.event.FireIssueEventFunction.execute(FireIssueEventFunction.java:57)
at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869)
at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265)
at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:618)
...
Caused by: com.atlassian.greenhopper.service.rank.RankException: Missing link detected in Global Rank table: Issue #55868 points to issue #55869 as next value, but that issue is not in the database.
at com.atlassian.greenhopper.service.rank.RankIndexFactory.createElements(RankIndexFactory.java:89)
at com.atlassian.greenhopper.service.rank.RankIndexFactory.buildIndex(RankIndexFactory.java:29)
at com.atlassian.greenhopper.service.rank.RankIndexServiceImpl$1.get(RankIndexServiceImpl.java:50)
at com.atlassian.greenhopper.service.rank.RankIndexServiceImpl$1.get(RankIndexServiceImpl.java:34)
at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:93)
at com.atlassian.greenhopper.service.rank.RankIndexServiceImpl.rankLast(RankIndexServiceImpl.java:120)
at com.atlassian.greenhopper.customfield.rank.RankIssueEventListener.onIssueEvent(RankIssueEventListener.java:32)
at sun.reflect.GeneratedMethodAccessor920.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
Cause
This problem occurs because JIRA couldn't find the ISSUE_ID specified as the next value ID in the ao_60db71_rank_issue_link
table. It is known not what has caused the DB to get into this state and we have a bug raised for it under JSWSERVER-9712 - GreenHopper Actions fail with com.atlassian.greenhopper.service.rank.RankException: Missing link detected in Global Rank table.
Resolution
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.
We may try to fix the problem from the database level, by inserting the missing issue ID. The suggested steps are:
Check the stack trace, and get specified the next value ID, for example:
1
Missing link detected in Global Rank table: Issue #55868 points to issue #55869 as next value, but that issue is not in the database.
From the above, we can see that the missing issue ID is
55869
. Search for the missing issue in theao_60db71_rank_issue_link
table:1
select * from ao_60db71_rank_issue_link where issue_id=55869;
ℹ️It's expected that no results are returned. If they are not, the record can be manually inserted in to the DB as a preventative fix as below.
Stop JIRA.
Execute the following SQL, replacing
55869
with the ID from step 1.1
insert into ao_60db71_rank_issue_link (ISSUE_ID) values (55869);
Start JIRA.
Verify the problem is fixed by attempting the action that was previously failing.
Was this helpful?