elasticsearch7.0 stand-alone structures encountered a problem learning

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_29556507/article/details/89598288

My environment is ubuntu16.04 memory 2g

Download the official website

https://www.elastic.co/cn/downloads/

修改elasticsearch.yml配置文件,允许外网访问。

vim config/elasticsearch.yml
# 增加

network.host: 0.0.0.0
http.port: 9200

 

 

Encountered an error 1 can not run elasticsearch as root

 

Solution in your installation directory to give users a elasticsearch not the root of

groupadd elsearch

useradd elsearch -g elsearch -p elasticsearch

Your user folder and change elasticsearch internal documents and group elsearch: elsearch

chown -R elsearch:elsearch  elasticsearch
  •  

elasticsearchThe name of the directory you elasticsearch

 

2 max virtual memory error continues to encounter areas vm.max_map_count [65530] is too low, increase to at least [262144]

 

Solution

sudo  /etc/sysctl.conf 

vm.max_map_count=262144

sudo sysctl -p

 

Problems encountered 3 bootstrap checks failed
 

Solution

sudo vim /etc/security/limits.conf

增加以下内容

* soft nofile 65536
* hard nofile 65536

Users then log on again, you can use the

 

Continue to experience problems 4

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

 

这时候继续编辑elasticsearch.yml文件,
将 #cluster.initial_master_nodes: ["node-1", "node-2"] 
修改为 cluster.initial_master_nodes: ["node-1"],记得保存。

 

遇到问题五  java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed

网上资料是这样说的
 seccomp是linux kernel从2.6.23版本开始所支持的一种安全机制,seccomp(安全计算模式的简称)是Linux内核中的计算机安全设施。 它被合并到2005年3月8日发布的内核版本2.6.12中的Linux内核主线上。[1] seccomp允许进程单向转换为“安全”状态,除了exit(),sigreturn(),read()和write()之外,它不能对已经打开的文件描述符进行任何系统调用。 如果它尝试任何其他系统调用,内核将使用SIGKILL或SIGSYS [2] [3]终止进程。 从这个意义上说,它不会虚拟化系统的资源,而是将过程与它们完全隔离开来。
环境的内核是
Linux node 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
处理过程,在elasticsearch.yml 文件末尾加上bootstrap.system_call_filter: false

Successful start

 

 

Guess you like

Origin blog.csdn.net/qq_29556507/article/details/89598288