Trying to create a new Advanced Roadmaps plan leads to internal server 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
Summary
When trying to create a new Advanced Roadmaps plan you receive an internal server error. Even if the issue source only contains a few projects, the UI may also state
1
Your plan contains more than 100 projects. Remove issues sourcess or use the section below to refine your plan.
Environment
Jira Software 8.15 or later, Jira Software 9.x
Jira with Advanced Roadmaps app installed
Diagnosis
Checking the logs the following errors can be found in the atlassian-jira.log
file
1
2
3
2024-05-10 14:23:04,693+0100 http-nio-8081-exec-121 ERROR USER 863x16030241x12 cvjrrm X.X.X.X /rest/jpo/1.0/plan/setup/projects [c.a.r.c.r.provider.exception.DefaultExceptionMapper] java.lang.RuntimeException: Could not find suitable distance for rank.
com.atlassian.rm.common.env.EnvironmentServiceException: java.lang.RuntimeException: Could not find suitable distance for rank.
at com.atlassian.rm.jpo.env.rank.BaseJiraEnvironmentRankService.rankLast(BaseJiraEnvironmentRankService.java:59)
When running the database query
1
SELECT * FROM "AO_60DB71_LEXORANK" WHERE "TYPE" IN (0, 2);
the result should show
2 rows for each Rank field in Jira
2 additional rows for FIELD_ID-859340285902835 (these are for Advanced Roadmaps)
In this situation, there will be 2 additional rows for the Advanced Roadmaps FIELD_ID. A result will look similar to this:

Cause
As the error message states this is related to the Lexorank and maximum and minimum markers in the lexorank database tables.
The Lexorank Management page in Jira itself will not show any issues, as Advanced Roadmaps is adding its own ranking details into the same tables, which is not checked as part of the balancing.
At this moment it is unclear how the additional marker rows get created in the first place.
Solution
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.
To solve the situation, the additional marker rows need to be removed. It is recommended that the newer set of rows, which means the rows with the higher ID, be removed.
In the case of the above example, this would be the rows with the ID 1681033 and 1681035 using the following steps
Stop Jira (Ensure you have a working backup)
Run the SQL query
1
delete from AO_60DB71_LEXORANK where ID in ('1681033','1681035');
Restart Jira
Please contact Atlassian Support if you are unsure of which rows to remove or if you encounter any issues during these operations.
Was this helpful?