Elasticsearch 6.X 安装部署

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wangxilong1991/article/details/79299459

参考5的配置
es5.x配置及常见问题
可能遇到的新问题

[2018-02-09T14:36:08,421][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.1.3.jar:6.1.3]
    at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.1.3.jar:6.1.3]
Caused by: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]
    at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:452) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:392) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:142) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.node.Node.<init>(Node.java:302) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.node.Node.<init>(Node.java:245) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.1.3.jar:6.1.3]
    ... 6 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_152]
    at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:443) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:392) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:142) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.node.Node.<init>(Node.java:302) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.node.Node.<init>(Node.java:245) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.1.3.jar:6.1.3]
    ... 6 more
Caused by: java.lang.IllegalArgumentException: the [action.auto_create_index] setting value [.security,.monitoring*,.watches,.triggered_watches,.watcher-history*] is too restrictive. disable [action.auto_create_index] or set it to [.security,.security-6]
    at org.elasticsearch.xpack.security.Security.validateAutoCreateIndex(Security.java:832) ~[?:?]
    at org.elasticsearch.xpack.security.Security.<init>(Security.java:263) ~[?:?]
    at org.elasticsearch.xpack.XPackPlugin.<init>(XPackPlugin.java:247) ~[?:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_152]
    at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:443) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:392) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:142) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.node.Node.<init>(Node.java:302) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.node.Node.<init>(Node.java:245) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) ~[elasticsearch-6.1.3.jar:6.1.3]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.1.3.jar:6.1.3]
    ... 6 more

解决办法

在elasticsearch.yml添加

action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.security,.security-6

x-pack 6.1.3下载地址
离线安装
本地磁盘路径 file:///****x-pack.zip

elasticsearch-plugin install file:///path/to/file/x-pack-6.1.3.zip

先启动es,然后初始化x-pack密码

x-pack 需要初始化密码,操作如下
执行 setup-passwords interactive

elasticsearch/bin/x-pack/setup-passwords interactive
Initiating the setup of passwords for reserved users elastic,kibana,logstash_system.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y


Enter password for [elastic]: 
Reenter password for [elastic]: 
Enter password for [kibana]: 
Reenter password for [kibana]: 
Enter password for [logstash_system]: 
Reenter password for [logstash_system]: 
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [elastic]

验证
curl -XGET -u elastic:”http://**:9200/_license?pretty”

没有更多推荐了,返回首页