ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Document Search ReIndexing

book

Article ID: 240410

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

In the user interface the following error is seen when attempting to upload an attachment:

SRCH-02001: Error while retrieving search contents. Contact your system administrator.

The logs show an error like:

ERROR 2022-04-27 06:24:42,490 [http-nio-8080-exec-280] niku.search (clarity:admin:19542321__9F7A1723-B1B4-40EC-B752-59AD877184F8:itl.changeObjectUpdate) LuceneSearchEngine.addFileToIndex: IO problem while adding to index org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: [email protected]/nspiderfile/write.lock at org.apache.lucene.store.Lock.obtain(Lock.java:85)

Cause

Document Search Reindexing may be needed in cases with problems with attachments, the write.lock and similar.

Environment

Release : Any

Resolution

The actions below must be performed out of work hours as downtime is needed, also reindexing is an intensive operation

1. Pause the "Index contents and documents for search" scheduled job

2. Turn off synchronous indexing in the CSA. NOTE: Make sure you restart services after doing this.

3. Using CSA add "-Djava.io.tmpdir=c:\javatmp" to app service jvm parameters (unless this parameter is already present) 

4. Using CSA add "-Djava.io.tmpdir=c:\javatmp" to bg service jvm parameters  (unless this parameter is already present)

5. Search for and delete any files that end in write.lock on your app  server(s).

They will look something like this:

lucene-62db5567fbeaae16396e79fb8fe42895-write.lock

6. Restart app and bg services.

7. Delete the nspider and nspiderfile folders from the file server

8. Log into the app server as someone who has full control of the filestore folders including the ability to create new folders/files like the nspiderfiles folders

9.  Run the "admin search recreate-index-data" command

10. When this has completed, turn on synchronous indexing or restart the "Index contents and documents" job.

 

***IMPORTANT: Please perform the activity after-hours, as it is very resource-intensive and could impact performance and ensure to stop all the clarity services before performing the steps. For very large filestores, please don't run the command's without contacting Broadcom Support***