I was able to install x-pack inside Kibana just fine. But for ElasticSearch, I first got this error:
ubuntu@server:/usr/share/elasticsearch$ sudo bin/plugin install x-pack
Exception in thread "main" org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve config path ["/usr/share/elasticsearch/config/elasticsearch.yml"], tried file path ["/usr/share/elasticsearch/config/elasticsearch.yml"], path file ["/usr/share/elasticsearch/config"/"/usr/share/elasticsearch/config/elasticsearch.yml"], and classpath
at org.elasticsearch.env.Environment.resolveConfig(Environment.java:291)
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
at org.elasticsearch.plugins.PluginManager.main(PluginManager.java:396)
and used this workaround to print the command to the console and run it manually.
Then I tried to run the command output from "sudo bin/plugin install file:///home/ubuntu/x-pack-5.4.1.zip":
/usr/share/elasticsearch$ sudo /usr/lib/jvm/java-8-oracle/jre/bin/java -Xmx64m -Xms16m -Delasticsearch -Des.path.home="/usr/share/elasticsearch" -Des.default.path.conf="/usr/share/elasticsearch/config" -Des.default.config="/usr/share/elasticsearch/config/elasticsearch.yml" -cp ":/usr/share/java/lucene-facet-4.10.4.jar:/usr/share/java/lucene-memory-4.10.4.jar:/usr/share/java/lucene-queries-4.10.4.jar:/usr/share/java/jts.jar:/usr/share/java/lucene-core-4.10.4.jar:/usr/share/java/lucene-sandbox-4.10.4.jar:/usr/share/java/lucene-analyzers-smartcn-4.10.4.jar:/usr/share/java/lucene-analyzers-morfologik-4.10.4.jar:/usr/share/java/lucene-highlighter-4.10.4.jar:/usr/share/java/lucene-codecs-4.10.4.jar:/usr/share/java/elasticsearch-1.7.3.jar:/usr/share/java/lucene-benchmark-4.10.4.jar:/usr/share/java/lucene-misc-4.10.4.jar:/usr/share/java/lucene-grouping-4.10.4.jar:/usr/share/java/lucene-demo-4.10.4.jar:/usr/share/java/lucene-analyzers-phonetic-4.10.4.jar:/usr/share/java/lucene-analyzers-stempel-4.10.4.jar:/usr/share/java/lucene-analyzers-common-4.10.4.jar:/usr/share/java/groovy-all-2.x.jar:/usr/share/java/spatial4j-0.4.1.jar:/usr/share/java/lucene-expressions-4.10.4.jar:/usr/share/java/lucene-queryparser-4.10.4.jar:/usr/share/java/lucene-classification-4.10.4.jar:/usr/share/java/lucene-analyzers-kuromoji-4.10.4.jar:/usr/share/java/lucene-analyzers-uima-4.10.4.jar:/usr/share/java/sigar.jar:/usr/share/java/log4j-1.2-1.2.17.jar:/usr/share/java/apache-log4j-extras-1.2.17.jar:/usr/share/java/lucene-join-4.10.4.jar:/usr/share/java/lucene-test-framework-4.10.4.jar:/usr/share/java/lucene-suggest-4.10.4.jar:/usr/share/java/lucene-analyzers-icu-4.10.4.jar:/usr/share/java/lucene-replicator-4.10.4.jar:/usr/share/java/lucene-spatial-4.10.4.jar:/usr/share/java/jna.jar:" org.elasticsearch.plugins.PluginManager "install" "file:///home/ubuntu/x-pack-5.4.1.zip"
-> Installing file:///home/ubuntu/x-pack-5.4.1.zip...
Usage:
-u, --url [plugin location] : Set exact URL to download the plugin from
-i, --install [plugin name] : Downloads and installs listed plugins [*]
-t, --timeout [duration] : Timeout setting: 30s, 1m, 1h... (infinite by default)
-r, --remove [plugin name] : Removes listed plugins
-l, --list : List installed plugins
-v, --verbose : Prints verbose messages
-s, --silent : Run in silent mode
-h, --help : Prints this help message
[*] Plugin name could be:
elasticsearch/plugin/version for official elasticsearch plugins (download from download.elasticsearch.org)
groupId/artifactId/version for community plugins (download from maven central or oss sonatype)
username/repository for site plugins (download from github master)
Message:
Error while installing plugin, reason: ElasticsearchIllegalArgumentException: Illegal plugin name:
I get this error if I try the output of "sudo bin/plugin install x-pack":
-> Installing x-pack...
Trying https://github.com/null/x-pack/archive/master.zip...
Failed to install x-pack, reason: failed to download out of all
possible locations..., use --verbose to get detailed information