Skip to content
logo Knowledgebase

Additional notes when upgrading ElasticSearch

Created on  | Last modified on 

Description

Recent versions of X3 Version 11 and Version 12 have been certified with more recent versions of ElasticSearch. It is  strongly recommended  to install the latest version of Elasticsearch compatible with your release, as described in the Prerequisites Overview at  http://online-help.sageerpx3.com/erp/12/public/prerequisites_overview.html

 This article provides additional information you may find useful when upgrading your ElasticSearch component

Cause


Resolution

CAUTION: If you use third-party products that integrate with your Sage product, check with the vendor of your third-party product to ensure their product is fully compatible with this release. If you integrate with other Sage products, check with your business partner or Sage to ensure that these components are compatible. 

You should first review the ElasticSearch documentation for the appropriate version of Elastic Search for your X3 installation, and download from the Elastic Search web site

For example:
6.4 https://www.elastic.co/guide/en/elasticsearch/reference/6.4/install-elasticsearch.html
6.8 https://www.elastic.co/guide/en/elasticsearch/reference/6.8/install-elasticsearch.html
7.9 https://www.elastic.co/guide/en/elasticsearch/reference/7.9/install-elasticsearch.html
7.16 https://www.elastic.co/guide/en/elasticsearch/reference/7.16/install-elasticsearch.html


NOTE: Elasticsearch JDK version certification is listed at https://www.elastic.co/support/matrix#matrix_jvm As per this information, you could potentially install the latest JDK version certified for Elastic Search, provided you keep the JDK 8 version that Sage X3 needs as the default JDK version. For example you can use the embedded JDK provided in the Elastic Search installation media.

The steps needed to upgrade are listed in the Elastic Search web site, for example https://www.elastic.co/guide/en/elasticsearch/reference/7.16/setup.html

NOTE: on Windows platforms you can choose to install using either a ZIP file or MSI file


The basic steps are if using ZIP file option:

1. Stop the existing Elastic Search windows service


2. Launch Windows Command prompt (CMD) using the "As administrator" option


3. Uninstall existing ElasticSearch version if available, or remove Service if previously used ZIP file method

Check in Control Panel> Programs and Features. If the old version is listed, then use the "Uninstall" option to remove the previous version.

Otherwise, from the existing Elastic Search installation directory , run the "servicedelete.cmd" command, which will remove the existing Elastic Search service

For example:
cd \Sage\ElasticSearch
servicedelete.cmd

OR

cd c:\Sage\elasticsearch-6.8.6\bin
elasticsearch-service.bat remove


4. Extract the new Elastic Search ZIP file contents into a different directory < ES_HOME_NEW >, for example, extract into "c:\Sage" directory which will create a new directory below that called "elasticsearch-7.9.3"

For example, in the above case the new Elastic Search installation directory < ES_HOME_NEW > will be:

C:\Sage\elasticsearch-7.16


5. From the < ES_HOME_NEW >\bin directory, run the "elasticsearch-service.bat" with the "install" argument. Use the "as administrator" option to create the service otherwise you may get permissions issue preventing this

For example, launch CMD prompt using "as administrator" then run these commands
REM Set the following variables to suit your environment
set "mzNewServiceName=ElasticSearch_7.16.3"
set "ES_HOME=C:\elasticsearch-7.16.3"
set "JAVA_HOME=C:\elasticsearch-7.16.3\jdk"
REM The following lines should not need to be changed
cd /d "%ES_HOME%\bin"
set "ES_PATH_CONF=%ES_HOME%\config"
set "ES_START_TYPE=auto"
set "SERVICE_ID=%mzNewServiceName%"
set "SERVICE_DISPLAY_NAME=%mzNewServiceName%"
set "SERVICE_DESCRIPTION=%mzNewServiceName%"
elasticsearch-service.bat install

NOTE: in the above example, you will notice you can set certain variables such as JAVA_HOME.


6. Edit the < ES_HOME_NEW >\config\elasticsearch.yml file

Add the appropriate "network.host" entry to allow network access from the Syracuse server(s)

Refer to the online help for clarifications https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

For example, the following allows access only from the localhost. Please review the Security Best Practices to confirm the most secure option for your needs:
network.host: 127.0.0.1

With version 7.x.x you also need to specify additional lines for the service to startup and function correctly:

node.name: node-1
discovery.seed_hosts: ["127.0.0.1", "[::1]"]
cluster.initial_master_nodes: ["node-1"]


7. Start Elastic Search windows service


8. In a browser on the Elastic Search Windows Server, navigate to the URL "http://localhost:9200" and confirm the Version number shows as the version you just installed


9. Restart Sage Syracuse service

a. Run the Elastic Search Index update
Navigate to Administration, Usage, Search Index Management

b. Perform an Elastic Search search to confirm it is working as expected

NOTE: the Elastic Search "head" add-in can no longer be used ( "http://localhost:9200/_plugin/head/"


10. Once you have completed your testing, you can remove the directory related to the old Elastic Search version


DocLink: How to replace Oracle JRE/JDK with OpenJDK