1、配置服务 ip 和 端口

进入 elasticsearch 安装目录,打开 config/elasticsearch.yml 配置 net.host 和 http.port

net.host: 0.0.0.0

http.port: 

kibana 外网访问设置:

# vi kibana-7.3.0-linux-x86_64/config/kibana.yml

server.host: "0.0.0.0"

2、坑

(1)用户
Linux 下不要使用 root 用户运行 Elasticsearch, 否则会报异常 can not run elasticsearch as root

(2)引导检查

如果你是使用 .zip 或 .tar.gz 安装包,有些配置需要手工配置,否则将导致启动失败,如:

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 []
[]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

在 Elasticsearch 以前的版本中,其中的一些配置错误被记录为警告信息。可以理解的是,用户有时会忽略这些日志消息。为了确保这些设置受到应有的重视,Elasticsearch在启动之前会做一些检查 Bootstrap Checks | Elasticsearch Reference [7.0] | Elastic。这些 启动检查 Important Elasticsearch configuration | Elasticsearch Reference [7.0] | Elastic 会检测 Elasticsearch 和系统的各种设置,并比较与那些为值是否是 Elasticsearch 的操作安全值。如果 Elasticsearch 处于开发模式,任何启动检失败被记录为 Elasticsearch 警告日志。如果 Elasticsearch 是在生产模式下,任何启动检查失败会导致 Elasticsearch 拒绝启动。

要解决以上问题,需进行如下配置:

  • 文件描述符配置

    • 临时生效

      • 使用 root 用户
      • 运行 ulimit -n 65536
    • 永久生效
      • 使用 root 用户
      • 进入 /etc/security/limits.conf
      • 添加一行 user - nofile 65536
  • 虚拟内存配置
    • 临时生效

      • 使用 root 用户
      • 运行 sysctl -w vm.max_map_count=262144
    • 永久生效
      • 使用 root 用户
      • 进入 /etc/sysctl.conf
      • 添加或更新一行 vm.max_map_count=262144
  • 自动发现配置
    • 单节点
    • 进入 elasticsearch 安装目录,打开 config/elasticsearch.yml
    • 添加或更新一行 discovery.type: single-node

 3、JVM内存大小指定太大,但本机内存不够用(主要还是没钱):

[root@file elasticsearch-7.1.]# ./bin/elasticsearch
Java HotSpot(TM) -Bit Server VM warning: INFO: os::commit_memory(0x00000000c5330000, , ) failed; error='Cannot allocate memory' (errno
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map bytes for committing reserved memory.
# An error report file with more information is saved as:
# logs/hs_err_pid27766.log

解决:

# 修改jvm.options文件配置即可,从1g改成了100m

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space -Xms100m
-Xmx100m

Elasticsearch安装配置问题的更多相关文章

  1. ElasticSearch安装及部署

    安装及部署 一.环境配置 操作系统:Cent OS 7ElasticSearch版本:1.3.2JDK版本:1.7.0_51SSH Secure Shell版本:XShell 5elasticsear ...

  2. Elasticsearch安装和使用

    Elasticsearch安装和使用 Elasticsearch 是开源搜索平台的新成员,实时数据分析的神器,发展迅猛,基于 Lucene.RESTful.分布式.面向云计算设计.实时搜索.全文搜索. ...

  3. Elasticsearch安装详解

    本文只介绍在windows上的安装和配置,其他安装和配置请参见官方文档 ES在windows上安装需下载zip安装包,解压后bin目录下有个 elasticsearch-service.bat 文件. ...

  4. Elasticsearch.安装插件(head)

    Elasticsearch.安装插件(head) 环境: Linux 7.x jdk1.8 目录结构(跟目录多了两个文件) /resources   ### 存放软件源 /u01/          ...

  5. Elasticsearch.安装(单节点)

    Elasticsearch.安装(单节点) 环境Linux 7.x jdk 1.8 elasticsearch 5.x 环境目录结构(根目录多了两个文件夹): /resources    /** 存放 ...

  6. ELK日志监控平台安装部署简介--Elasticsearch安装部署

    最近由于工作需要,需要搭建一个ELK日志监控平台,本次采用Filebeat(采集数据)+Elasticsearch(建立索引)+Kibana(展示)架构,实现日志搜索展示功能. 一.安装环境描述: 1 ...

  7. elasticsearch 安装,以及遇到的问题总结

    系统.软件环境: Centos 6.5 elasticsearch 6.1.1 elasticsearch 安装的话是很简单的,但是安装完成启动的时候报错,下面我就一一的来描述错误,并提供相应的解决方 ...

  8. elasticsearch 安装、配置

    elasticsearch:基于java开发,基于RESTful web 接口,提供分布式多用户能力的全文搜索引擎. elasticsearch 安装: 1. java SE Development ...

  9. 如何给Elasticsearch安装中文分词器IK

    安装Elasticsearch安装中文分词器IK的步骤: 1. 停止elasticsearch 2.2的服务 2. 在以下地址下载对应的elasticsearch-analysis-ik插件安装包(版 ...

随机推荐

  1. 《黑白团团队》第九次团队作业:Beta冲刺第一天

    项目 内容 作业课程地址 任课教师首页链接 作业要求 团队项目 填写团队名称 黑白团团队 填写具体目标 认真负责,完成项目 团队项目Github仓库地址链接. 第一天 日期:2019/6/24 1.1 ...

  2. solrcloud2

    分片的原因 由于底层Lucene的限制,每个solr索引中包含的文档数不能超过231个,大约是21亿个.但是solr分片一般不是基于这个的原因,因为一般没有到这个峰值的之后,solr的各中性能问题就暴 ...

  3. django session 加密cookie型

    a. 配置 settings.py           SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'   # 引 ...

  4. [转]Normal Map中的值, Tangent Space, 求算 Tangent 与 Binormal 与 TBN Matrix

    原文出处 https://www.cnblogs.com/lookof/p/3509970.html - Normal Map中的值 -   有没有想过,Normal Map(法线贴图)为什么看上去都 ...

  5. DataGrip 配置连接mysql8.0的注意事项

    在mysql8.0版本之后,依赖驱动文件不同,使用之前的连接配置,会无法正常的连接数据库. 已连接本地Mysql数据库为例,需在 URL配置项 jdbc:mysql://localhost:3306? ...

  6. [Cypress] Use the Most Robust Selector for Cypress Tests

    Which selectors your choose for your tests matter, a lot. In this lesson, we'll see the recommended ...

  7. 脚本实现PXE装机

    #!/bin/bash read -p "请输入您的装机服务器:" ip read -p "请输入您想要的ip最小值(1-255):" min read -p ...

  8. hover([over,]out)

    hover([over,]out) 概述 一个模仿悬停事件(鼠标移动到一个对象上面及移出这个对象)的方法.这是一个自定义的方法,它为频繁使用的任务提供了一种“保持在其中”的状态. 当鼠标移动到一个匹配 ...

  9. react-native-page-scrollview 的使用方法(实现酷炫的分页轮播效果,还支持自定义View)

    react-native-page-scrollview 对ScrollView的封装,可以很方便的实现水平,垂直分页轮播效果.而且可以自定义分页宽高,和侧边View的旋转,透明度,大小等. 对于原生 ...

  10. Win7 : 'java' is not recognized as internal or external command,

    Java application is not working in Win 7 64-bit http://answers.microsoft.com/en-us/windows/forum/win ...