I got the error "Error: Could not find or load main class Xms4g -Xmx4g" when trying to install X-Pack with the command "bin\elasticsearch-plugin install C:\Users\xzhang\Downloads\x-pack-5.2.2.zip" under %ES_HOME% on a Windows Server 2013 R2 Standard machine.
What could be the reason and how to fix the issue?
It looks like the Elasticsearch script is picking up broken JVM arguments from somewhere.
Xms4g -Xmx4g should be -Xms4g -Xmx4g
Have you recently edited your jvm.options file, or changed the ES_JAVA_OPTS environment variable?
One of those two configuration options probably has the wrong value.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.