默认情况下,Elastic 只允许本机访问,如果需要远程访问,可以修改 Elastic 安装目录的config/elasticsearch.yml文件,去掉network.host的注释,将它的值改成0.0.0.0,然后重新启动 Elastic。

network.host: 0.0.0.0

上面代码中,设成0.0.0.0让任何人都可以访问。线上服务不要这样设置,要设成具体的 IP。

启动失败,检查没有通过,报错

[--18T17::,][INFO ][o.e.b.BootstrapChecks    ] [gFOuNlS] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [] bootstrap checks failed
[]: max file descriptors [] for elasticsearch process is too low, increase to at least [] []: max virtual memory areas vm.max_map_count [] is too low, increase to at least [] []: max file descriptors [] for elasticsearch process is too low, increase to at least []

编辑 /etc/security/limits.conf,追加以下内容;
* soft nofile 65536
* hard nofile 65536
此文件修改后需要重新登录用户,才会生效

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

编辑 /etc/sysctl.conf,追加以下内容:
vm.max_map_count=655360
保存后,执行:

sysctl -p

重新启动,成功。

bin/elasticsearch &

参考文档:http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html

原文地址:https://blog.csdn.net/feng12345zi/article/details/80367907

elasticsearch开启外网访问的更多相关文章

  1. elasticsearch,kibana 坑之 开启外网访问

    安装elasticsearch,kibana,开启外网访问,总是失败,坑啊. 经过两天断断续续的艰苦奋战,终于搞定了,记录如下: kibana开启外网访问 1)  修改server.host 为本机i ...

  2. elasticsearch7.6 安装 并且开启外网访问,真的好累。

    下载 下载页面 https://www.elastic.co/cn/downloads/elasticsearch wget https://artifacts.elastic.co/download ...

  3. elasticsearch 通过外网访问

    elasticsearch 只能通过本地访问 需要修改  network.host: 0.0.0.0. 重新开启:提示错误: ERROR: [2] bootstrap checks failed[1] ...

  4. Elasticsearch(一)开启外网访问

    1. 设置Elasticsearch对外访问的Host 修改Elasticsearch配置文件 elasticsearch.yml : network.host: 128.24.108.84  //在 ...

  5. elasticsearch 配置外网访问

    进入  config/ elasticsearch.ym 修改:network.host: 127.0.0.1 或者内网Ip 添加:http.host: 0.0.0.0

  6. redis开启外网访问

    redis默认只允许本地访问,要使redis可以远程访问可以修改redis.conf   打开redis.conf文件在NETWORK部分有说明   ######################### ...

  7. mac系统上mysql开启外网访问

    1.首先本地连到数据库在"mysql"库下把user表里User=root的那一行,把Hosts从"locahost"改成"%" 2.然后在 ...

  8. Linux CentOS7 开启80,443端口外网访问权限

    一.查看系统防火墙状态(如果返回 running 代表防火墙启动正常) firewall-cmd --state 二.开启端口外网访问 1.添加端口 返回 success 代表成功(--permane ...

  9. elasticsearch外网访问设置

    默认情况下安装elasticsearch之后是无法进行外网访问的,可以通过设置来完成这一目的 1.更改配置文件 [***@elk01 ~]$ vim elk/config/elasticsearch. ...

随机推荐

  1. Linux日志出现大量"kernel: NET: Registered protocol family 36"

    一台Linux服务器的系统错误日志出现大量的" kernel: NET: Registered protocol family 36"错误信息,如下所示: Jul  2 05:27 ...

  2. mssql sqlserver 关键字 GROUPING用法简介及说明

    转自: http://www.maomao365.com/?p=6208  摘要: GROUPING 用于区分列是否由 ROLLUP.CUBE 或 GROUPING SETS 聚合而产生的行 如果是原 ...

  3. mssql sqlserver 获取指定日期为本月第几个工作日

    转自:http://www.maomao365.com/?p=6771 摘要: 下文讲述工作中,需要获取指定日期在当月的工作日 下文讲述常规的指定工作日所在月的天数分析,实现思路:1 生成一个国家法定 ...

  4. Mysql的NULL和Empty String

    本文基于Mysql5.7版本的参考资料: https://dev.mysql.com/doc/refman/5.7/en/working-with-null.html https://dev.mysq ...

  5. C#编辑EXE使用的appSettings节点的Config文件

    /// <summary> /// 保存配置文件的设定 /// </summary> /// <param name="Key"></pa ...

  6. Python3 Selenium多窗口切换

    Python3 Selenium多窗口切换 以腾讯网(http://www.qq.com/)为例,打开腾讯网,点击新闻,打开腾讯新闻,点击新闻中第一个新闻链接. 在WebDriver中封装了获取当前窗 ...

  7. window.location.href刷新页面

    刷新当前页 window.location.href=window.location.href; 或者 window.location.href="当前URL",例如 window ...

  8. ASP.NET -- 一般处理程序ashx

    ASP.NET  --   一般处理程序ashx 如果在一个html页面向服务器端请求数据,可用ashx作为后台页面处理数据.ashx适合用作数据后台处理,相当于WebForm中的aspx.cs文件或 ...

  9. 【算法】LeetCode算法题-Maximum Subarray

    这是悦乐书的第154次更新,第156篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第13题(顺位题号是53).给定一个整数数组nums,找出一个最大和,此和是由数组中索引 ...

  10. Golang 并发简介

    并发概要 随着多核CPU的普及, 为了更快的处理任务, 出现了各种并发编程的模型, 主要有以下几种: 模型名称 优点 缺点 多进程 简单, 隔离性好, 进程间几乎无影响 开销最大 多线程 目前使用最多 ...