Rebuild index button grayed out not able to rebuild the index
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
The Confluence Rebuild button under > General Configuration > Content Indexing using existing index files is grayed out and not able to rebuild the index.
Environment
- Confluence version < Confluence 8.4.0.
- Confluence is running behind a reverse proxy.
Diagnosis
Check the Confluence database with the below SQL Query, confirm that there are no rows returning from the query:
SELECT * FROM BANDANA WHERE BANDANAKEY='reindex.status'
- Ensure you are logged into Confluence Administration » General Configuration » Content Indexing
- Directly open this URL:
- <Confluence-Base-URL>/rest/rebuildindex/latest/job
- Directly open this URL:
- Check network communication from the Developers Tools of the browser:
If you are seeing HTTP 404 errors from
/rest/rebuildindex/latest/job
URL with the following JSON text response:{"error": "no current re-index jobs"}
this is normal when no previous Index jobs have been run- If you are seeing HTTP 404 errors from
/rest/rebuildindex/latest/job
URL with anything other than the above JSON output . e.g. Sample customised error page from IIS that comes back with:
Cause
The reverse proxy has overridden the HTTP 404 response from Tomcat and displays its own custom HTTP 404 error page.
This results in the Confluence Indexing page unable to find the expected {"error": "no current re-index jobs"} text and consequently disables the Rebuild button.
Solution
We can try to trigger the rebuild job by using the below curl command: (UUID is a randomly generated value you may use this one or generate a new one by yourself)
curl -k -i -u admin -H "X-Atlassian-Token:no-check" -X POST <Confluence-Base-URL>/rest/prototype/latest/index/reindex?uuid=6bb3f39f-cd46-4f0a-afc0-0a2dd2a70682
- Then you may check Confluence Administration » General Configuration » Content Indexing again it should show the progress of the rebuild index job. The Rebuild button will be enabled after the job finishes so it can rebuild the index from now on by using the button.
Alternatively, upgrade to Confluence 8.5.0 LTS or newer which are not affected by this issue.