ElasicSearch(2) Linux运行

1.org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root

不能用root身份登录

解决办法

groupadd student
useradd mm -g student -p 123

chown -R pp:student elasticsearch-7.0.0

切换至pp用户登录运行,成功

----------------------------------------------------------------------------------------------------------------------------------

2.Cannot allocate memory'

无法分配内存

----------------------------------------------------------------------------------------------------------------------------------

3. max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

对于elasticsearch进程,max文件描述符[4096]过低,至少增加到[65535]

vi /etc/security/limits.conf

添加如下内容:

* soft nofile 65536

* hard nofile 65536

----------------------------------------------------------------------------------------------------------------------------------

4.max number of threads [3758] for user [pp] is too low, increase to at least [4096]

用户最多线程数[3758][pp]太低,至少增加到[4096]

* soft nproc 4096

* hard nproc 4096

-----------------------------------------------------------------------------------------------------------------------------------

5.max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

最大虚拟内存区域vm。max_map_count[65530]太低,至少增加到[262144]

解决:切换到root用户修改配置sysctl.conf

vi /etc/sysctl.conf 

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

-----------------------------------------------------------------------------------------------------------------------------------

6.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

默认的发现设置不适合生产使用;至少有一个[发现]。seed_hosts,发现。seed_providers,集群。必须配置initial_master_nodes]

猜你喜欢

转载自www.cnblogs.com/mm163/p/10720759.html