elasticsearch 在MAC El Capitan上安装Elasticsearch 7.3失败。由于启用引导内存锁定时出现问题,导致重复安装失败
各位晚上好, 我一直在尝试在我的MacBookPro El Capitan(10.11.6,4GB内存)上安装Elasticsearch 7.3的一个独立实例(本地)。我真的认为这将是相当直截了当的,但遗憾的是,ES在安装到我的mac上时出现了内存锁定问题 详情:elasticsearch 在MAC El Capitan上安装Elasticsearch 7.3失败。由于启用引导内存锁定时出现问题,导致重复安装失败,elasticsearch,installation,elasticsearch,Installation,各位晚上好, 我一直在尝试在我的MacBookPro El Capitan(10.11.6,4GB内存)上安装Elasticsearch 7.3的一个独立实例(本地)。我真的认为这将是相当直截了当的,但遗憾的是,ES在安装到我的mac上时出现了内存锁定问题 详情: 我下载并一直在尝试安装Elasticsearch 7.3。它是从这里下载的: 提取归档文件后,我继续按照安装说明进行操作,首先运行二进制可执行文件-“/elasticsearch”-通过运行此命令--> cd elasticsearc
cd elasticsearch-7.3.0/bin ./elasticsearch
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited
* - memlock unlimited
* - nofile 100000
* - nproc 32768
* - as unlimited
B) 我向jvm.options文件添加了以下行:
-Xms2g (initial size of total heap space, set to half of RAM)
-Xmx2g (maximum size of heap space, set to half of RAM)
-Des.enforce.bootstrap.checks=true (enforcing memory locking checks)
-Djna.tmpdir=chosenpath/elasticsearch-7.3.0/tmp (this seemed important)
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
C) 我在elasticsearch.yml文件中编辑了以下几行:
-Xms2g (initial size of total heap space, set to half of RAM)
-Xmx2g (maximum size of heap space, set to half of RAM)
-Des.enforce.bootstrap.checks=true (enforcing memory locking checks)
-Djna.tmpdir=chosenpath/elasticsearch-7.3.0/tmp (this seemed important)
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
D) 我添加了'/etc/launchd.conf'文件(试图增加我的max进程和max可用文件),并添加了以下行:
limit maxproc 2048 2048
limit maxfiles 1024 unlimited
E) 我添加了'/etc/sysctl.conf'文件(试图增加我的最大进程数,以及每个用户可用的最大进程数),并添加了以下行:
# Turn up maxproc
kern.maxproc=2048
# Turn up the maxproc per user
kern.maxprocperuid=1024
# Remove core files
kern.coredump=0
F) 无论我做什么,我的ulimit-as输出都保持不变,仍然提供以下输出:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 709
virtual memory (kbytes, -v) unlimited
我很想得到你们的帮助。提前感谢。所以-我终于在我的MAC(El Capitan)上安装了ES 7.3 我从jvm.options文件中删除了此项:
-Des.enforce.bootstrap.checks=true
不知何故,这并没有导致ES在验证内存锁定时出错。删除此参数将禁用ES强制执行引导检查的能力,即使elasticsearch.yml配置文件中的“bootstrap.memory\u lock:true”。现在,我需要弄清楚的是,如何向同一个ES实例添加两个额外的节点,而不会出现以下错误:
uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to
[9300]]; nested: BindException[Address already in use]
似乎我需要对elasticsearch.yml文件进行一些调整。此处的当前相关设置:
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
#transport.tcp.port: 9300-9400 (commented out for now)
#node.master: true (commented out for now)
#node.data: true (commented out for now)
#discovery.type: single-node
cluster.initial_master_nodes: ["node-1", "node-2"]
有人有什么想法吗?所以,我终于在我的MAC(El Capitan)上安装了ES 7.3 我从jvm.options文件中删除了此项:
-Des.enforce.bootstrap.checks=true
不知何故,这并没有导致ES在验证内存锁定时出错。删除此参数将禁用ES强制执行引导检查的能力,即使elasticsearch.yml配置文件中的“bootstrap.memory\u lock:true”。现在,我需要弄清楚的是,如何向同一个ES实例添加两个额外的节点,而不会出现以下错误:
uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to
[9300]]; nested: BindException[Address already in use]
似乎我需要对elasticsearch.yml文件进行一些调整。此处的当前相关设置:
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
#transport.tcp.port: 9300-9400 (commented out for now)
#node.master: true (commented out for now)
#node.data: true (commented out for now)
#discovery.type: single-node
cluster.initial_master_nodes: ["node-1", "node-2"]
有人有什么想法吗?这些是我的“limits.conf”的当前内容文件:elasticsearch soft memlock unlimited elasticsearch hard memlock unlimited*-memlock unlimited*-nofile 100000*-nproc 32768*-as unlimited。当我重新启动时,“打开的文件”和“最大用户进程”参数仍然保持不变。这些是“limits.conf”的当前内容文件:elasticsearch soft memlock unlimited elasticsearch hard memlock unlimited*-memlock unlimited*-nofile 100000*-nproc 32768*-as unlimited。当我重新启动时,“打开的文件”和“最大用户进程”参数仍然保持不变。