详细错误信息:

[2020-04-18T21:40:31,571][ERROR][o.e.b.Bootstrap          ] [node-1] node validation exception
[1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked

解决思绪:
(1)调整JVM内存为物理机内存大小的50%,官方推荐,配置文件/etc/sysconfig/elasticsearch

ES_JAVA_OPTS="-Xms4g -Xmx4g" 
MAX_LOCKED_MEMORY=unlimited

(2)修改/etc/security/limits.conf文的件内容,作废限制

elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited

(3)在/etc/systemd/system/elasticsearch.service.d目录下建立一个文件override.conf,并添加下列内容。
这个elasticsearch.service.d也需要建立一下:

[Service]
LimitMEMLOCK=infinity

最后重启机械,就好了。