elasticsearch bootstrap.memory_lock

检查bootstrap.memory_lock设置是否生效

get http://10.127.0.1:9200/_nodes?filter_path=**.mlockall
响应:
{
    "nodes": {
        "9giihmDNRdS136KT52Gl5g": {
            "process": {
                "mlockall": true
            }
        },
        "X0zQESeeT8uJ9kVXvHpl-w": {
            "process": {
                "mlockall": true
            }
        },
        "w4hYw86rQhqL1ayGyUK1Kw": {
            "process": {
                "mlockall": true
            }
        }
    }
}

如果您看到mlockall为false,则表示mlockall请求失败。您还将在日志中看到一行"Unable to lock JVM Memory"。
在Linux / Unix系统上最可能的原因是运行Elasticsearch的用户没有锁定内存的权限。解决方法如下:
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall

posted @ 2019-07-17 11:39  努力挣扎的小兵  阅读(2174)  评论(0编辑  收藏  举报