Thursday, November 9, 2017

Sitecore SOLR Error getting file length for [segments_1]

After installing Sitecore 9 and deploying a simple site, I noticed that experience analytics were appearing but no experience profiles were visible. After allowing anonymous experience profile data, the experience profiles were still not visible. Looking into the SOLR admin logs there was a stream of the following error message:
Error getting file length for [segments_1]
 These errors were all for the xDB SOLR core.

Sitecore SOLR - error getting file length

Try rebuilding the index

The first step is to try rebuilding the index. In this case, these steps were followed:
  1. Turn the Windows SOLR service off
  2. Delete the data folder for the core with the error
  3. Turn the Windows SOLR service on
  4. Kick off an index rebuld
    1. For the xDB index, a rebuild has a special set of instructions as opposed to the control panel in Sitecore.
In my case, this did not resolve the issues.

Java Runtime Environment version

When installing SOLR, I had installed the latest version of the JRE (version 9). However SOLR prefers a slightly older version of JRE, version 1.8.0_111 aka jre-8u144-windows-x64. To resolve this error the following steps were followed:

  1. Turn off the Windows SOLR service
  2. Install the correct JRE version - re-8u144-windows-x64.exe
  3. Restart the PC
  4. Uninstall the incorrect, newer version of the JRE
  5. Update the Java_Home system variable to the new folder location of the older JRE
  6. Restart the SOLR service
After following these steps, the errors disappeared and the xDB data appeared correctly.

No comments:

Post a Comment