Upgrade Elasticsearch To Version 8 On Windows

Upgrade Elasticsearch to version 8 on Windows.

  1. Stop Elasticsearch service on every node or just on the server if it is a standalone deployment
  2. At this point navigate to Kibana->Management->8.0 Upgrade Assistant
  3. See if the environment is ready for upgrade or if there are critical issues that must be fixed beforehand. Some errors may be thrown.
  4. Stop the service, open the "C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.yml" and make sure to comment out the following lines as below:

#node.data: true

#node.ingest: true

#node.master: true

#node.max_local_storage_nodes: 1

  • Make sure to change the line "transport.tcp.port: 9300" to "transport.port: 9300"

  1. Create a new system environment variable called ES_JAVA_HOME (in newer versions, the jdk must be specified manually):
  • ES_JAVA_HOME="C:\Program Files\Elastic\Elasticsearch\elasticsearch_version\jdk"

  1. Change the ES_HOME env to reflect the new path:
  • ES_HOME="C:\Program Files\Elastic\Elasticsearch\elasticsearch_version"

  1. Open a CMD as admin and navigate to the new version of ES under the "bin" folder ("C:\Program Files\Elastic\Elasticsearch\elasticsearch-7.17.1\bin") and execute the command:
  • elasticsearch.bat

Make sure that is running and if there are no errors.

  1. After this, make it run as a service using your preferred method (Elasticsearch provided script or nssm)
  2. For Orchestrator, on each node (if multi-node is present), now edit the UiPath.Orchestrator.dll.config and change the following:
  • Locate the line "target xsi:type="ElasticSearch" name="robotElastic"" and make sure you set the "documentType" parameter from "logEvent" to "".
  1. After the documentType parameter add the parameter enableApiVersioningHeader="true"
  2. Open CMD as admin and execute command "iisreset" to restart the Orchestrator node
  3. These steps must be performed on all Orchestrator nodes.