I have started working on Elasticsearch 7 and trying to start the elasticsearch-sql-cli using the following command:
~/Documents/backups/es7/bin$ ./elasticsearch-sql-cli
But it is not started and getting the following error:
./elasticsearch-sql-cli: line 9: ./x-pack-env: No such file or directory
I opened up the ./x-pack-env file and found that it is using ES_HOME environment variable. Here is the content for the x-pack-env file:
#!/bin/bash
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License;
# you may not use this file except in compliance with the Elastic License.
# include x-pack-core jars in classpath
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/modules/x-pack-core/*"
So i added up the environment variable in bash_profile,
#ES
export ES_HOME=/Users/Documents/backups/es7
export PATH=$ES_HOME/bin:$PATH
But still i am getting the same error for
./elasticsearch-sql-cli: line 9: ./x-pack-env: No such file or directory
Please suggest how to solve this issue.