Error while installing X-pack on windows

I have elastic 5.5.0, downloaded in zip format, on Windows. I'm trying to install X-pack 5.5.3. As per Elastic support matrix it is compatible but getting an error will installing it. Here is the error log

C:\elasticsearch-5.5.0\bin>elasticsearch-plugin install file:///C:/temp/x-pack-5.5.3.zip
-> Downloading file:///C:/temp/x-pack-5.5.3.zip
[=================================================] 100%
Exception in thread "main" java.lang.IllegalArgumentException: plugin [x-pack] is incompatible with version [5.5.0]; was designed for version [5.5.3]
at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:146)
at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:474)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:543)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:217)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:201)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
at org.elasticsearch.cli.Command.main(Command.java:88)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)

Does anyone else has/had the same issue?
Thanks

You must install the exact same version.
5.5.0 vs 5.5.3.

Could not find x-pack 5.5.0 setup but on website they say x-pack 5.5.0 for Elastic search 5.5.3. Any solution recommended? I can't change the Elastic version as I have to stick with what is already on the servers.

Run:

elasticsearch-plugin install x-pack

Hi, thank you for your reply. If I try to run this command elasticsearch-plugin install x-pack on gitbash it throws me this error
Error: Could not find or load main class org.elasticsearch.plugins.PluginCli

And on CMD it throws

Exception in thread "main" java.net.UnknownHostException: artifacts.elastic.co
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
at org.elasticsearch.plugins.InstallPluginCommand.urlExists(InstallPluginCommand.java:300)
at org.elasticsearch.plugins.InstallPluginCommand.getElasticUrl(InstallPluginCommand.java:267)
at org.elasticsearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:223)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:215)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:201)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
at org.elasticsearch.cli.Command.main(Command.java:88)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)

which apparently looks to me proxy issue. I tried to use this command

set ES_JAVA_OPTS="-Dhttp.proxyHost=host_name -Dhttp.proxyPort=port_number -Dhttps.proxyHost=host_name -Dhttps.proxyPort=https_port_number"
but it does not seem to work.

And if I run elastic search through CMD using this 'elasticsearch' it runs but on gitbash it says
Error: Could not find or load main class org.elasticsearch.tools.JavaVersionChecker
Elasticsearch requires at least Java 8 but your Java version from C:\Program Files\Java\jdk1.8.0_192/bin/java does not meet this requirement.

I checked the java version using 'java -version' that's what I get
java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)

Any guess what could be the possible issue? Thanks.

I think you should better use a more recent version of elasticsearch.
IIRC there was issues with java version detection in the past on Windows.

You should consider (my order of preference):

  • 7.3.2
  • 6.8.3
  • 5.6.16 (if you really can't use 7.x or 6.x)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.