Elasticsearch安装配置问题
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安装配置问题的更多相关文章
- ElasticSearch安装及部署
安装及部署 一.环境配置 操作系统:Cent OS 7ElasticSearch版本:1.3.2JDK版本:1.7.0_51SSH Secure Shell版本:XShell 5elasticsear ...
- Elasticsearch安装和使用
Elasticsearch安装和使用 Elasticsearch 是开源搜索平台的新成员,实时数据分析的神器,发展迅猛,基于 Lucene.RESTful.分布式.面向云计算设计.实时搜索.全文搜索. ...
- Elasticsearch安装详解
本文只介绍在windows上的安装和配置,其他安装和配置请参见官方文档 ES在windows上安装需下载zip安装包,解压后bin目录下有个 elasticsearch-service.bat 文件. ...
- Elasticsearch.安装插件(head)
Elasticsearch.安装插件(head) 环境: Linux 7.x jdk1.8 目录结构(跟目录多了两个文件) /resources ### 存放软件源 /u01/ ...
- Elasticsearch.安装(单节点)
Elasticsearch.安装(单节点) 环境Linux 7.x jdk 1.8 elasticsearch 5.x 环境目录结构(根目录多了两个文件夹): /resources /** 存放 ...
- ELK日志监控平台安装部署简介--Elasticsearch安装部署
最近由于工作需要,需要搭建一个ELK日志监控平台,本次采用Filebeat(采集数据)+Elasticsearch(建立索引)+Kibana(展示)架构,实现日志搜索展示功能. 一.安装环境描述: 1 ...
- elasticsearch 安装,以及遇到的问题总结
系统.软件环境: Centos 6.5 elasticsearch 6.1.1 elasticsearch 安装的话是很简单的,但是安装完成启动的时候报错,下面我就一一的来描述错误,并提供相应的解决方 ...
- elasticsearch 安装、配置
elasticsearch:基于java开发,基于RESTful web 接口,提供分布式多用户能力的全文搜索引擎. elasticsearch 安装: 1. java SE Development ...
- 如何给Elasticsearch安装中文分词器IK
安装Elasticsearch安装中文分词器IK的步骤: 1. 停止elasticsearch 2.2的服务 2. 在以下地址下载对应的elasticsearch-analysis-ik插件安装包(版 ...
随机推荐
- 注意条件表达式规范[JLS 15.25]
/** * 猜猜输出结果是什么 */ public class appalet { public static void main(String[] args) { char x = 'x'; int ...
- FFmpeg常用命令学习笔记(四)处理原始数据命令
处理原始数据命令 通过音视频设备采集的.没有经过任何加工的数据叫原始数据,而像我们平时播放的比如mp4文件是压缩后的数据.视频原始数据是YUV格式,音频原始数据是PCM格式.FFmpeg可以从封装格 ...
- IO流大文件拷贝
String resourcesPath="f:/a.grd"; String targetPath=" ...
- C++自定义方法类、调用
如求矩形.圆的面积的方法,可以写成一个area类 area.h中只声明,不实现: #ifndef AREA_H //防止重复引用 #define AREA_H class area{//自定义类 pu ...
- Python序列构成的数组
1.内置序列类型 容器序列:list,tuple,collections.deque (能存放不同类型) 扁平序列:str,bytes,bytearray,memoryview,array.array ...
- @Test 测试
package com.自定义.mall.admin.system; import java.util.List; import java.util.Map; import javax.annotat ...
- 第四届西安邮电大学acm-icpc校赛 热狗树
题目描述 “我是番茄酱!”“我是黄芥末酱!”“合在一起就是——美式热狗上加的,那个!“热狗树上的每个节点都涂有番茄酱或者黄芥末酱中的一种,这样热狗树就变得美味了~LiMn2O4构造了一颗热狗树,他想 ...
- lua.c:82:10: fatal error: readline/readline.h: No such file or directory #include <readline/readline.h>
make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...
- 第三方库requests详解
Requests 是用Python语言编写,基于 urllib,采用 Apache2 Licensed 开源协议的 HTTP 库.它比 urllib 更加方便,可以节约我们大量的工作,完全满足 HTT ...
- 点击事件解绑unbind
$(".choose").unbind("click").click(function(){} 这个类先解绑了点击事件再添加个点击事件有事如果不这样你点击第二次 ...