Skip to content

Installation

Elasticsearch Installation


This installation guide aims to cover all mandatory steps required to install Elasticsearch onto an existing server running Autodesk Vault Server (ADMS).

Download Elasticsearch

From the Elasticsearch downloads page, find and download the Windows elasticsearch-8.14.3-windows-x86_64.zip file.

Extract Elasticsearch

Extract the contents of elasticsearch-8.14.3-windows-x86_64.zip into the directory C:\Program Files (x86)\Tentech\elasticsearch-8.14.3.

Install Elasticsearch via CMD

  1. Open up Windows Command Prompt, and type the following.
cd "C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\bin"

Note the version used in this example is Elasticsearch 8.14.3

elasticsearch-service.bat install

Note the CMD terminal return output

CMD
C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\bin>elasticsearch-service.bat install
Installing service : elasticsearch-service-x64
Using ES_JAVA_HOME : C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\jdk
[2024-07-25 19:38:09] [info]  ( prunsrv.c:2002) [ 8764] Apache Commons Daemon procrun (1.3.1.0 64-bit) started.
[2024-07-25 19:38:09] [debug] ( prunsrv.c:772 ) [ 8764] Installing service...
[2024-07-25 19:38:09] [info]  ( prunsrv.c:829 ) [ 8764] Installing service 'elasticsearch-service-x64' name 'Elasticsearch 8.14.3 (elasticsearch-service-x64)'.
[2024-07-25 19:38:09] [debug] ( prunsrv.c:857 ) [ 8764] Setting service description 'Elasticsearch 8.14.3 Windows Service - https://elastic.co'.
[2024-07-25 19:38:09] [debug] ( prunsrv.c:862 ) [ 8764] Setting service user 'LocalSystem'.
[2024-07-25 19:38:09] [info]  ( prunsrv.c:879 ) [ 8764] Service 'elasticsearch-service-x64' installed.
[2024-07-25 19:38:09] [info]  ( prunsrv.c:2086) [ 8764] Apache Commons Daemon procrun finished.
The service 'elasticsearch-service-x64' has been installed
  1. Next, create the elasticsearch keystore.
elasticsearch-keystore.bat create

Note the CMD terminal return output

CMD
C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\bin>elasticsearch-keystore.bat create
Created elasticsearch keystore in C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\config\elasticsearch.keystore
  1. Assign a bootstrap password, in this example detailed below QUxWg1w3y9or2O9G.
elasticsearch-keystore.bat add bootstrap.password
QUxWg1w3y9or2O9G

Note the CMD terminal return output

CMD
C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\bin>elasticsearch-keystore.bat add bootstrap.password
Enter value for bootstrap.password:

Warning

A specified bootstrap.password may not be required as per Elastic article The Elastic bootstrap password

  1. Start the Elasticsearch service.
elasticsearch-service.bat start

Note the CMD terminal return output

CMD
C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\bin>elasticsearch-service.bat start
[2024-07-25 19:54:02] [info]  ( prunsrv.c:2002) [ 5976] Apache Commons Daemon procrun (1.3.1.0 64-bit) started.
[2024-07-25 19:54:02] [info]  ( prunsrv.c:982 ) [ 5976] Starting service 'elasticsearch-service-x64'...
[2024-07-25 19:54:05] [debug] ( service.c:573 ) [ 5976] apxServiceControl(): Sleeping 1000 milliseconds
[2024-07-25 19:54:06] [debug] ( service.c:577 ) [ 5976] apxServiceControl(): QueryServiceStatus OK
[2024-07-25 19:54:06] [info]  ( prunsrv.c:1000) [ 5976] Started service 'elasticsearch-service-x64'.
[2024-07-25 19:54:06] [info]  ( prunsrv.c:1011) [ 5976] Finished starting service 'elasticsearch-service-x64', returning 1.
[2024-07-25 19:54:06] [info]  ( prunsrv.c:2086) [ 5976] Apache Commons Daemon procrun finished.
The service 'elasticsearch-service-x64' has been started

Check that the service Elasticsearch 8.14.3 (elasticsearch-service-x64) has started within Windows services. Note that the service boot sequence takes ~15 seconds before becoming available for further testing/debug.

Windows Services Elasticsearch service

  1. The following step sets Elasticsearch passwords against the following accounts:

    • elastic
    • apm_system
    • kibana_system
    • logstash_system
    • beats_system
    • remote_monitoring_user

Warning

This method of password allocation has been depreciated and is soon to be removed from future releases of Elasticsearch. Password setup/maintenance for future versions will need to utilise elasticsearch-reset-password

elasticsearch-setup-passwords.bat interactive
y
ABC123
ABC123
0GdG2fOFkCGFFEwR
0GdG2fOFkCGFFEwR
gj1f79y9MsPOCjHU
gj1f79y9MsPOCjHU
aoI5k0cOTvM81AvJ
aoI5k0cOTvM81AvJ
RAxWRzVEhVRoRfI3
RAxWRzVEhVRoRfI3
2oR706J7GtGt46Lh
2oR706J7GtGt46Lh
CMD
C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\bin>elasticsearch-setup-passwords.bat interactive
******************************************************************************
Note: The 'elasticsearch-setup-passwords' tool has been deprecated. This       command will be removed in a future release.
******************************************************************************

Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana_system]:
Reenter password for [kibana_system]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]

YAML

With the Elasticsearch service running and passwords configured, stop the service via Windows Services and then configure the following elasticsearch.yml file (replacing "SERVERNAME" with the hostname of the Elasticsearch server.)

C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\config\elasticsearch.yml
discovery.type: single-node
discovery.seed_hosts: []
network.host: 0.0.0.0
http.port: 9200
xpack.security.enabled: true

If an accounts password issue is suspected, the xpack.security.enabled setting can be set to false for further troubleshooting.

xpack.security.enabled: false

Elasticsearch Logs

Elasticsearch log files should be reviewed after initial setup or troubleshooting of any issue.

C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\config

Uninstall Elasticsearch

If updating or troubleshooting Elasticsearch requires the manual removal of the Elasticsearch service, follow these steps.

  1. Execute the following commands within Windows CMD to remove the Elasticsearch Windows service.
net stop elasticsearch-service-x64
sc remove elasticsearch-service-x64
  1. Check Windows Services that the service has been removed.
  2. Restart the computer and then log back into the system.
  3. Rename the Elasticsearch install directory with a prefix of old, for example C:\Program Files (x86)\Tentech\elasticsearch-8.14.3.

The server should now be able to have a new install of Elasticsearch installed.

Non-Prod Configuration

The default Elasticsearch configuration requires considerable amount of system memory, not typically found in either development or sandbox environments. The following settings may be considered to reduce Elasticsearch system RAM usage.

Create a file called jvmCustom.options under the \jvm.options.d\ directory, for example;

C:\Program Files (x86)\Tentech\elasticsearch-8.14.3\config\jvm.options.d\jvmCustom.options

Within the .options file, set the following to lock the RAM usage to 2GB. For specific information on this configuration, refer to the Elasticsearch manual with further information found within the JVM settings.

-Xms2g
-Xmx2g

Further configuration may be considered within the elasticsearch.yml file.

  • bootstrap.memory_lock: true will prevent page file usage, preventing disk thrashing (through excessive system pagefile usage)
  • xpack.ml.enabled: false disables Elasticsearch machine learning features, which are typically not needed within a sandbox/development environment.
bootstrap.memory_lock: true
xpack.ml.enabled: false

Tentech 2024