Opensearch is running w/o <many> problems, but opensearch-cli is having problems

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.


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>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”
) else if not “” == “” (
set “JAVA=\bin\java.exe”
) 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?


Hi @Kdpx2,

It does not look like Windows 11 is supported please see here: Installing OpenSearch - OpenSearch documentation .


mj, Thanks for letting me know.

  1. While not an expectation, is there a flow chart, possibly for coding or troubleshooting, of how opensearch works?

  2. Is there a way to obtain the OpenSearch documentation in PDF?

I have been trying to learn this package / application for several years. I am trying to learn this in an environment which has limited Internet …

Once again, thank you for responding.

You are welcome @Kdpx2,

I am not aware of PDFs, however, all the up-to-date docs are available here: Home - OpenSearch Documentation including (this will stay continuously updated with ever evolving nature of applications):

For more in-depth topics you can check Blog · OpenSearch

Enjoy your research,