我正在尝试使用Flink 5.x Elasticsearch接收器连接器将数据插入托管在小型VM上的ES 5.2.1实例.
由于这是一个处于开发模式的小型虚拟机,我无法启动它以接受9300上的TransportClient远程客户端连接而不会使引导程序检查失败.
[2017-02-17T09:02:48,581][INFO ][o.e.n.Node ] [Z_fiBnl] starting ...
[2017-02-17T09:02:48,866][INFO ][o.e.t.TransportService ] [Z_fiBnl] publish_address {xxxxxx:9300}, bound_addresses {127.0.0.1:9300}
[2017-02-17T09:02:48,878][INFO ][o.e.b.BootstrapChecks ] [Z_fiBnl] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [xxx] is too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
Run Code Online (Sandbox Code Playgroud)
我已经玩过以下设置,但只是不能让它启动(http客户端9200工作正常)
transport.publish_host: 0.0.0.0
transport.bind_host: 0.0.0.0
http.host: "xxx"
http.host: 169.117.72.167
network.host: 0.0.0.0
network.publish_host: 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
请注意,ES仅在用于开发目的的情况下在小型VM上运行,并且我无权访问ex.此框中的文件描述符限制.
Far*_*ahi 24
弹性搜索过程的最大文件描述符[4096]太低,增加到至少[65536]
ulimit -n 65536
Run Code Online (Sandbox Code Playgroud)
或者设置nofile到65536在/etc/security/limits.conf
用户[xxx]的最大线程数[1024]太低,至少增加[2048]
ulimit -u 2048
Run Code Online (Sandbox Code Playgroud)
或者在启动elasticsearch之前将nproc值设置为2048或大于/etc/security/limits.conf.
最大虚拟内存区域vm.max_map_count [65530]太低,增加到至少[262144]
设置vm.max_map_count=262144在/etc/sysctl.conf
那么做sysctl -p
如果您想在开发环境中运行elasticsearch,尽管失败的引导程序检查:
在您的中设置以下内容 elasticsearch.yml
transport.host: 127.0.0.1
http.host: 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
请注意,您无法在开发模式下形成群集.不要使用在生产中失败的bootstrap检查的elasticsearch !!
vm.max_map_count非常低,增加其数量将解决此问题
检查/etc/sysctl.conf中的vm.max_map_count设置:
grep vm.max_map_count /etc/sysctl.conf
Run Code Online (Sandbox Code Playgroud)
输出:vm.max_map_count = 262144
如果输出少于262144,则按Elasticsearch的预期应用新计数,我们有两个选项可以永久添加或临时添加。
将变量添加到/etc/sysctl.conf
vm.max_map_count=262144
Run Code Online (Sandbox Code Playgroud)
要么
sysctl -w vm.max_map_count=262144
Run Code Online (Sandbox Code Playgroud)
必须在xhyve虚拟机中设置vm.max_map_count设置:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
Run Code Online (Sandbox Code Playgroud)
使用root用户登录,无需密码。然后像在Linux上一样配置sysctl设置:
sysctl -w vm.max_map_count=262144
Run Code Online (Sandbox Code Playgroud)
vm.max_map_count设置必须通过docker-machine设置:
docker-machine ssh
sudo sysctl -w vm.max_map_count=262144
Run Code Online (Sandbox Code Playgroud)
尝试以这种方式配置elasticsearch.yml文件:
network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
transport.tcp.port: 9300
小智 5
对于弹性搜索过程的最大文件描述符[4096]太低,增加到至少[65536]
ulimit -n,这将是4096.编辑/etc/security/limits.conf并添加以下行:
* soft nofile 65536
* hard nofile 65536
root soft nofile 65536
root hard nofile 65536
/etc/pam.d/common-session并添加此行session required pam_limits.so/etc/pam.d/common-session-noninteractive并添加此行session required pam_limits.soulimit -n,它将是65536.对于最大虚拟内存区域vm.max_map_count [65530]太低,增加到至少[262144]
sudo sh -c "echo 'vm.max_map_count=262144' >> /etc/sysctl.conf"参考文献:
我能够通过使用自 ES 5.2 discovery.type 以来可用的以下设置来做到这一点:单节点(https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html)
一旦我使用该设置启动 ES 节点,我就能够使用传输客户端从非本地主机客户端进行连接,这在之前是一个问题。
| 归档时间: |
|
| 查看次数: |
31542 次 |
| 最近记录: |