search cancel

Virtual Service Catalog - SolrException: Exception writing document

book

Article ID: 256244

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

We have recently installed the Virtual Service Catalog release 10.6, and are seeing the following exception recorded in the vscatalog.log file. Is this something we should be concerned about?

o.a.solr.handler.RequestHandlerBase      : org.apache.solr.common.SolrException: Exception writing document id 8c541eda-4036-4b06-9ca4-4f3c6b762181 to the index; possible analysis error: Document contains at least one immense term in field="configDetails" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is: '[35, 87, 101, 100, 32, 83, 101, 112, 32, 49, 49, 32, 49, 53, 58, 50, 57, 58, 53, 56, 32, 80, 68, 84, 32, 50, 48, 49, 57, 10]...', original message: bytes can be at most 32766 in length; got 37870. Perhaps the document has an indexed string field (solr.StrField) which is too large

Environment

Release : 10.6 and 10.7.2

Cause

Root Cause Identified.

IllegalArgumentException as configDetails field value in the virtual service exceeds string data type limits.

As a result, updateSolrWithServiceTransactions failed with "bytes can be at most 32766 in length; got 37870" error.

Resolution

For Virtual Service Catalog 10.6 :

To resolve this error, change the configDetails field type from "string" to "text_general" in the following files:

    • managed-schema
    • VirtualServiceTransactions.java

Stop the Virtual Service Catalog service, clear the log, and restart the service.

 

For Virtual Service Catalog 10.7.2 :

To resolve this error, Engineering has provided a bespin-service-1.7.2.jar patch. Please open a support case and request a copy of the patch associated with DE551087.

Below are the steps to apply the patch:

    1. Stop Virtual Service Catalog service
    2. Delete solr-data folder (under VSC_HOME folder)
    3. Replace the attached managed-schema file with the existing file (located under VSC_HOME/solrHome/conf/)
    4. Back up the "bespin-service-1.7.2.jar" (located under  VSC_HOME\lib) and delete it.
    5. Replace the attached jar with "bespin-service-1.7.2.jar" (located in VSC_HOME\lib)
    6. Start Virtual Service Catalog service

Additional Information

To determine which Virtual Service was loaded prior to the exception being thrown, search the vscatalog.log file for the SolrException. Scroll up several lines until you find "updateSolrWithServiceTransactions - Virtual Service" <VirtualService_Name>. This will be the virtual service that you will need to check after applying the patch. The SolrException was thrown when <VirtualService_Name> VS appears in the list of virtual services. 

To verify this issue is resolved, do the following:

  • Login to Virtual Service Catalog
  • Click "View Virtual Services"
  • Refresh the Virtual Services list
  • Drill into <VirtualService_Name> virtual service  -->  make sure Operations & Config Details are present.
  • Check the vscatalog.log for the error mentioned in the defect is not showing in the log. (if you have not deleted the log file, the previous error will not go away)