ElasticSearch 安装启动的问题
Linux操作系统下安装的一些问题
Linux 版本:
Linux VM_0_75_centos 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
ES 版本: elasticsearch-5.4.3
Linux用户 : 在新创建的ES用户下安装,不在root用户下面安装。
下载、解压、完成后
修改配置文件如下,核心部分
cluster.name: CollectorDBCluster
node.name: node-1
thread_pool.bulk.queue_size: 1000
http.cors.enabled: true
http.cors.allow-origin: "*"
启动的日志文件如下:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
at org.elasticsearch.bootstrap.SystemCallFilter.linuxImpl(SystemCallFilter.java:350) ~[elasticsearch-5.4.3.jar:5.4.3]
at org.elasticsearch.bootstrap.SystemCallFilter.init(SystemCallFilter.java:638) ~[elasticsearch-5.4.3.jar:5.4.3]
at org.elasticsearch.bootstrap.JNANatives.tryInstallSystemCallFilter(JNANatives.java:215) [elasticsearch-5.4.3.jar:5.4.3]
... 中间其他日志信息
[2017-07-11T11:51:26,761][INFO ][o.e.g.GatewayService ] [node-1] recovered [8] indices into cluster_state
[2017-07-11T11:51:27,317][INFO ][o.e.c.r.a.AllocationService] [node-1] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[segment_idx][1], [segment_idx][0]] ...]).
结果
虽然有这个错误,但是系统正常启动,网上说这个错误可以忽略,是因为操作系统版本不是最新版的缘故,但是不影响使用。
通过 curl http://127.0.0.1:9200/ 可以查看到结果
但是如果我修改配置文件,添加 network.host
cluster.name: CollectorDBCluster
node.name: node-1
thread_pool.bulk.queue_size: 1000
## 10.0.0.75 是我服务器的IP地址
network.host: 10.0.0.75
http.cors.enabled: true
http.cors.allow-origin: "*"
此时再启动服务,日志信息如下
[2017-07-11T13:56:18,989][WARN ][o.e.b.JNANatives ] unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
at org.elasticsearch.bootstrap.SystemCallFilter.linuxImpl(SystemCallFilter.java:350) ~[elasticsearch-5.4.3.jar:5.4.3]
at org.elasticsearch.bootstrap.SystemCallFilter.init(SystemCallFilter.java:638) ~[elasticsearch-5.4.3.jar:5.4.3]
at org.elasticsearch.bootstrap.JNANatives.tryInstallSystemCallFilter(JNANatives.java:215) [elasticsearch-5.4.3.jar:5.4.3]
at org.elasticsearch.bootstrap.Natives.tryInstallSystemCallFilter(Natives.java:99) [elasticsearch-5.4.3.jar:5.4.3]
.... 中间一些启动消息
[2017-07-11T13:56:21,537][INFO ][o.e.b.BootstrapChecks ] [node-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-07-11T13:56:21,539][ERROR][o.e.b.Bootstrap ] [node-1] node validation exception
[2] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[2017-07-11T13:56:21,545][INFO ][o.e.n.Node ] [node-1] stopping ...
[2017-07-11T13:56:21,565][INFO ][o.e.n.Node ] [node-1] stopped
[2017-07-11T13:56:21,566][INFO ][o.e.n.Node ] [node-1] closing ...
[2017-07-11T13:56:21,574][INFO ][o.e.n.Node ] [node-1] closed
这里的第一部分的错误消息,跟之前的一样,但是
[2] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
这一部分消息却是之前没有的正是这一部分导致ES没有启动起来,导致了最后一行信息的
... closed
解决方法:
造成这个错误的原因是:最大虚拟内存太小
切换到root用户下,修改配置文件sysctl.conf 可以解决这个问题。
我的疑问
但是我想问的是:为什么修改 network.host 成服务器的真实的IP地址的时候, 这个错误才能显现出来;而使用默认的 127.0.0.1 就可以启动,不会有这个错误。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论