Elasticsearch Failed To Send Log Messages Action Metadata Line 1 Contains An Unknown Parameter Type

Issue Description: Orchestrator 2023.4 not compatible with Elasticsearch 8.9.0 (field _type not supported). Upgraded our Elasticsearch to version 8.9.0 and Orchestrator cannot write logs to Elasticsearch anymore, because of the following error that came back from Elasticsearch:“illegal_argument_exception Reason: 'Action/metadata line [1] contains an unknown parameter [_type] ”

The Orchestrator function may not be up to date. See in the documentation of Elasticsearch that this field since v8 no longer supported (see Migrating To 8.0 ).In your documentation it is mention that Orchestrator 2023.4 should support Elasticsearch 8.x (see Orchestrator 2023.4 - Software Requirements ).

Error Message: When upgrading Elasticsearch to version 8.x.x the Orchestrator cannot write logs to Elasticsearch anymore, because of the following error that came back from Elasticsearch:

  • “illegal_argument_exception Reason: "Action/metadata line [1] contains an unknown parameter [_type]"


Root Cause: The error from the Event Viewer logs is caused by the Orchestrator config file (UiPath.Orchestrator.dll.config) that has the DocumentType value set to '_type' or '_doc' as it was requested for previous Elastic versions.

Resolution:

For Elastic version 8.x, it is recommended to change the documentType value and let it empty and also to add the parameter enableApiVersioningHeader="true" like in the below screenshot.

Note: Take backup the config file into a different directory before changing the values.

After performing the changes, do an 'iisreset' and check the result. Note that doing an 'iisreset' will restart the web server and working Robots could be impacted. It is recommended to make this process in a maintenance window.