Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Installed on: Windows 11
Installed: opensearch-2.11.1; opensearch-dashboards-2.11.1
Describe the issue:
When I attempt to start opensearch-cli it does not start. This makes following the directions a little bit more difficult because I do not know alternative options.
Configuration:
In Windows 11, I have the following environment variable set on startup.
OPENSEARCH_JAVA_HOME D:\opensearch-2.11.1\jdk
When I type opensearch-cli.bat into a Command Prompt, I get the following:
D:\opensearch-2.11.1\bin>opensearch-cli.bat
D:\opensearch-2.11.1\bin>call “D:\opensearch-2.11.1\bin\opensearch-env.bat” || exit /b 1
D:\opensearch-2.11.1\bin>set SCRIPT=“D:\opensearch-2.11.1\bin\opensearch-env.bat”
D:\opensearch-2.11.1\bin>rem determine OpenSearch home; to do this, we strip from the path until we
D:\opensearch-2.11.1\bin>rem find bin, and then strip bin (there is an assumption here that there is no
D:\opensearch-2.11.1\bin>rem nested directory under bin also named bin)
D:\opensearch-2.11.1\bin>if not defined OPENSEARCH_HOME goto opensearch_home_start_setup
D:\opensearch-2.11.1\bin>goto opensearch_home_done_setup
D:\opensearch-2.11.1\bin>rem now set the classpath
D:\opensearch-2.11.1\bin>set OPENSEARCH_CLASSPATH=!OPENSEARCH_HOME!\lib*
D:\opensearch-2.11.1\bin>set HOSTNAME=KDPX2
D:\opensearch-2.11.1\bin>if not defined OPENSEARCH_PATH_CONF (set OPENSEARCH_PATH_CONF=!OPENSEARCH_HOME!\config )
D:\opensearch-2.11.1\bin>rem now make OPENSEARCH_PATH_CONF absolute
D:\opensearch-2.11.1\bin>for %I in (“D:\opensearch-2.11.1\bin!OPENSEARCH_HOME!\config…”) do set OPENSEARCH_PATH_CONF=%~dpfI
D:\opensearch-2.11.1\bin>set OPENSEARCH_PATH_CONF=D:\opensearch-2.11.1\bin!OPENSEARCH_HOME!\config
D:\opensearch-2.11.1\bin>set OPENSEARCH_DISTRIBUTION_TYPE=zip
D:\opensearch-2.11.1\bin>set OPENSEARCH_BUNDLED_JDK=true
D:\opensearch-2.11.1\bin>if “true” == “false” (echo “warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release” 1>&2 )
D:\opensearch-2.11.1\bin>cd /d “D:\opensearch-2.11.1”
D:\opensearch-2.11.1>rem now set the path to java, pass “nojava” arg to skip setting JAVA_HOME and JAVA
D:\opensearch-2.11.1>if “” == “nojava” (exit /b )
D:\opensearch-2.11.1>rem comparing to empty string makes this equivalent to bash -v check on env var
D:\opensearch-2.11.1>rem and allows to effectively force use of the bundled jdk when launching OpenSearch
D:\opensearch-2.11.1>rem by setting OPENSEARCH_JAVA_HOME= and JAVA_HOME=
D:\opensearch-2.11.1>if not “D:\opensearch-2.11.1\jdk” == “” (
set “JAVA=D:\opensearch-2.11.1\jdk\bin\java.exe”
set JAVA_TYPE=OPENSEARCH_JAVA_HOME
) else if not “” == “” (
set “JAVA=\bin\java.exe”
set JAVA_TYPE=JAVA_HOME
) else (
set “JAVA=D:\opensearch-2.11.1\jdk\bin\java.exe”
set “JAVA_HOME=D:\opensearch-2.11.1\jdk”
set JAVA_TYPE=bundled jdk
)
D:\opensearch-2.11.1>if not exist !JAVA! (
echo “could not find java in !JAVA_TYPE! at !JAVA!” 1>&2
exit /b 1
)
“could not find java in !JAVA_TYPE! at !JAVA!”
Relevant Logs or Screenshots:
This is a basic basic install - so I can get it up and running and figure out if I can use this for my program or not. I have been following this application for years - this has been the closest I have come to get it working in its entirety. But I am still having problems figuring some of this out - I lack the years of experience… That being said - you have to start somewhere?