步骤
1:soft,hard设为同一值
操作:vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096
2:修改/etc/pam.d/login文件
echo “session required /lib64/security/pam_limits.so” >>/etc/pam.d/login
echo “session required pam_limits.so” >>/etc/pam.d/login
3:重启即可
切换到 estest用户: su estest
再切换回root 用户: su root
使用 ulimit -Hn 和 ulimit -Sn 查询
[root@localhost ~]# ulimit -Hn
65536
[root@localhost ~]# ulimit -Sn
65536
已经修改
4:启动ES,成功
und_addresses {192.168.8.199:9200}
[2021-08-03T18:47:40,941][INFO ][o.e.n.Node ] [node-1] started
[2021-08-03T18:47:41,080][INFO ][o.e.g.GatewayService ] [node-1] recovered [0] indices into cluster_state
[2021-08-03T18:47:41,604][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.watch-history-10] for index patterns [.watcher-history-10*]
[2021-08-03T18:47:41,652][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.triggered_watches] for index patterns [.triggered_watches*]
[2021-08-03T18:47:41,739][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.watches] for index patterns [.watches*]
[2021-08-03T18:47:41,821][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-logstash] for index patterns [.monitoring-logstash-7-*]
[2021-08-03T18:47:41,946][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-es] for index patterns [.monitoring-es-7-*]
[2021-08-03T18:47:42,059][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-beats] for index patterns [.monitoring-beats-7-*]
[2021-08-03T18:47:42,154][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-alerts-7] for index patterns [.monitoring-alerts-7]
[2021-08-03T18:47:42,244][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-7-*]
[2021-08-03T18:47:42,323][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [node-1] adding index lifecycle policy [watch-history-ilm-policy]
[2021-08-03T18:47:42,718][INFO ][o.e.l.LicenseService ] [node-1] license [e6188e32-cfc4-46d8-99b8-712519c77c3f] mode [basic] - valid
[2021-08-03T18:47:42,744][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [node-1] Active license is now [BASIC]; Security is disabled