除了localhost之外,ElasticSearch不会将network.host作为任何内容启动

时间:2017-08-31 19:18:24

标签: elasticsearch

当我使用默认的configuraiton(localhost)启动elasticsearch时,它启动并运行正常。当我用network.host启动它作为我的以太网接口的ip时,它没有。

我得到了

[2017-08-31 19:22:32,866][INFO ][node                     ] [WtEWVc2] starting ...
[2017-08-31 19:22:33,015][INFO ][transport                ] [WtEWVc2] publish_address {192.168.4.10:9300}, bound_addresses {192.168.4.10:9300}
[2017-08-31 19:22:33,021][INFO ][bootstrap                ] [WtEWVc2] bound or publishing to a non-loopback or non-link-local address, enforcin
g bootstrap checks
[2017-08-31 19:22:33,023][ERROR][bootstrap                ] [WtEWVc2] Exception
java.lang.RuntimeException: bootstrap checks failed
max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:132)
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:85)
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:65)
        at org.elasticsearch.bootstrap.Bootstrap$5.validateNodeBeforeAcceptingRequests(Bootstrap.java:178)
        at org.elasticsearch.node.Node.start(Node.java:471)
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:193)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:257)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:101)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:96)
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:88)
        at org.elasticsearch.cli.Command.main(Command.java:54)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:68)
        Suppressed: java.lang.IllegalStateException: max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
                at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
                at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
                at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
                at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
                at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
                at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
                at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:133)
                ... 13 more
[2017-08-31 19:22:33,024][WARN ][bootstrap                ] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupError: java.lang.RuntimeException: bootstrap checks failed
max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:105)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:96)
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:88)
        at org.elasticsearch.cli.Command.main(Command.java:54)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:68)
Caused by: java.lang.RuntimeException: bootstrap checks failed
max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:132)
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:85)
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:65)
        at org.elasticsearch.bootstrap.Bootstrap$5.validateNodeBeforeAcceptingRequests(Bootstrap.java:178)
        at org.elasticsearch.node.Node.start(Node.java:471)
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:193)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:257)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:101)
        ... 6 more
        Suppressed: java.lang.IllegalStateException: max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
                at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
                at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
                at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
                at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
                at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
                at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
                at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:133)
                ... 13 more
[2017-08-31 19:22:33,068][INFO ][node                     ] [WtEWVc2] stopping ...

似乎线程的数量很小(虽然它与我使用localhost运行时没有什么不同。我设置'ulimit -u 4096'没有任何变化。

使用localhost运行时,日志看起来像

    2017-08-31 19:27:29,660][INFO ][plugins                  ] [WtEWVc2] loaded module [lang-painless]
[2017-08-31 19:27:29,660][INFO ][plugins                  ] [WtEWVc2] loaded module [percolator]
[2017-08-31 19:27:29,660][INFO ][plugins                  ] [WtEWVc2] loaded module [reindex]
[2017-08-31 19:27:29,660][INFO ][plugins                  ] [WtEWVc2] loaded module [transport-netty3]
[2017-08-31 19:27:29,660][INFO ][plugins                  ] [WtEWVc2] loaded module [transport-netty4]
[2017-08-31 19:27:29,660][INFO ][plugins                  ] [WtEWVc2] no plugins loaded
[2017-08-31 19:27:31,645][INFO ][node                     ] [WtEWVc2] initialized
[2017-08-31 19:27:31,645][INFO ][node                     ] [WtEWVc2] starting ...
[2017-08-31 19:27:31,767][INFO ][transport                ] [WtEWVc2] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.
1:9300}
[2017-08-31 19:27:31,773][WARN ][bootstrap                ] [WtEWVc2] max number of threads [1024] for user [elasticsearch] likely too low, inc
rease to at least [2048]
[2017-08-31 19:27:34,875][INFO ][cluster.service          ] [WtEWVc2] new_master {WtEWVc2}{WtEWVc2NT9K5oIt9gsL45Q}{9unLXLdnSnG95TvWju3qwQ}{127.
0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-08-31 19:27:34,897][INFO ][http                     ] [WtEWVc2] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.
1:9200}
[2017-08-31 19:27:34,901][INFO ][node                     ] [WtEWVc2] started

[2017-08-31 19:27:34,903][INFO ][gateway                  ] [WtEWVc2] recovered [0] indices into cluster_state

当http绑定发生时,某些事情正在爆发。

有什么想法吗?

0 个答案:

没有答案