elasticsearch安装及启动异常解决

本文涉及的产品
Elasticsearch Serverless通用抵扣包,测试体验金 200元
简介: elasticsearch安装及启动异常解决

虚拟机使用net连接模式

1

Download and unzip the latest Elasticsearch distribution

2

Run bin/elasticsearch on Unix or bin\elasticsearch.bat on Windows

3

Run curl -X GET http://localhost:9200/

官网 :www.elastic.co

包含 安装介质 和 权威指南

1下载

elasticsearch 下载地址: https://www.elastic.co/cn/downloads/elasticsearch

linux  对应版本 elasticsearch-7.0.0-rc2-linux-x86_64.tar.gz 大小330 MB

2建用户

useradd  es

passwd es

123456

es/123456

3上传到虚拟机

put elasticsearch-7.0.0-rc2-linux-x86_64.tar.gz

4解压

tar  -zxvf elasticsearch-7.0.0-rc2-linux-x86_64.tar.gz

启动

cd elasticsearch-7.0.0-rc2/bin

./elasticsearch

5警告跳过

unable to install syscall filter:

java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in

6检验

http://localhost:9200/

{

 "name" : "localhost.localdomain",

 "cluster_name" : "elasticsearch",

 "cluster_uuid" : "WuVD9aKLTYyt_XbWbxZxAg",

 "version" : {

   "number" : "7.0.0-rc2",

   "build_flavor" : "default",

   "build_type" : "tar",

   "build_hash" : "f076a79",

   "build_date" : "2019-04-02T17:20:40.380908Z",

   "build_snapshot" : false,

   "lucene_version" : "8.0.0",

  "minimum_wire_compatibility_version" : "6.7.0",

  "minimum_index_compatibility_version" : "6.0.0-beta1"

 },

 "tagline" : "You Know, for Search"

}

遇到得问题

7 http://ip:9200/  无法访问

vim config/elasticsearch.yml

# 增加

network.host: 0.0.0.0

8重启 es 异常

ERROR: [5] bootstrap checks failed

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

[2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]

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

[4]:  failed to install; check the logs and fix your configuration or disable system call filters at your own risk

[5]: 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

[2019-04-09T09:51:29,228][INFO ][o.e.n.Node            ] [localhost.localdomain] stopping ...

[2019-04-09T09:51:29,264][INFO ][o.e.n.Node            ] [localhost.localdomain] stopped

[2019-04-09T09:51:29,265][INFO ][o.e.n.Node            ] [localhost.localdomain] closing ...

[2019-04-09T09:51:29,320][INFO ][o.e.n.Node            ] [localhost.localdomain] closed

[2019-04-09T09:51:29,323][INFO ][o.e.x.m.p.NativeController] [localhost.localdomain] Native controller process has stopped - no new native processes can be started

切换root用户

vi /etc/security/limits.conf

在倒数第二行

* soft nofile 65536

* hard nofile 65536

# End of file

vi /etc/sysctl.conf

添加

vm.max_map_count=655360

保存后执行

sysctl -p

重启es 异常

ERROR: [3] bootstrap checks failed

[1]: max number of threads [1024] for user [es] is too low, increase to at least [4096]

[2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

[3]: 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

vi /etc/security/limits.d/90-nproc.conf

修改

*         soft   nproc    1024

*         soft   nproc    4096

重启es 异常

ERROR: [2] bootstrap checks failed

[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

[2]: 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.yml中添加配置项:bootstrap.system_call_filter为false:

bootstrap.memory_lock: false

bootstrap.system_call_filter: false

重启es 异常

ERROR: [1] bootstrap checks failed

[1]: 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.yml

取消注释保留一个节点

cluster.initial_master_nodes: ["node-1"]

这个的话,这里的node-1是上面一个默认的记得打开就可以了

重启 正常

相关实践学习
以电商场景为例搭建AI语义搜索应用
本实验旨在通过阿里云Elasticsearch结合阿里云搜索开发工作台AI模型服务,构建一个高效、精准的语义搜索系统,模拟电商场景,深入理解AI搜索技术原理并掌握其实现过程。
ElasticSearch 最新快速入门教程
本课程由千锋教育提供。全文搜索的需求非常大。而开源的解决办法Elasricsearch(Elastic)就是一个非常好的工具。目前是全文搜索引擎的首选。本系列教程由浅入深讲解了在CentOS7系统下如何搭建ElasticSearch,如何使用Kibana实现各种方式的搜索并详细分析了搜索的原理,最后讲解了在Java应用中如何集成ElasticSearch并实现搜索。  
相关文章
|
6月前
|
JSON 安全 数据可视化
Elasticsearch(es)在Windows系统上的安装与部署(含Kibana)
Kibana 是 Elastic Stack(原 ELK Stack)中的核心数据可视化工具,主要与 Elasticsearch 配合使用,提供强大的数据探索、分析和展示功能。elasticsearch安装在windows上一般是zip文件,解压到对应目录。文件,elasticsearch8.x以上版本是自动开启安全认证的。kibana安装在windows上一般是zip文件,解压到对应目录。elasticsearch的默认端口是9200,访问。默认用户是elastic,密码需要重置。
3210 0
|
7月前
|
安全 Java Linux
Linux安装Elasticsearch详细教程
Linux安装Elasticsearch详细教程
1229 1
|
存储 安全 数据管理
如何在 Rocky Linux 8 上安装和配置 Elasticsearch
本文详细介绍了在 Rocky Linux 8 上安装和配置 Elasticsearch 的步骤,包括添加仓库、安装 Elasticsearch、配置文件修改、设置内存和文件描述符、启动和验证 Elasticsearch,以及常见问题的解决方法。通过这些步骤,你可以快速搭建起这个强大的分布式搜索和分析引擎。
455 5
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
存储 JSON Java
elasticsearch学习一:了解 ES,版本之间的对应。安装elasticsearch,kibana,head插件、elasticsearch-ik分词器。
这篇文章是关于Elasticsearch的学习指南,包括了解Elasticsearch、版本对应、安装运行Elasticsearch和Kibana、安装head插件和elasticsearch-ik分词器的步骤。
1207 0
elasticsearch学习一:了解 ES,版本之间的对应。安装elasticsearch,kibana,head插件、elasticsearch-ik分词器。
|
数据可视化 Docker 容器
一文教会你如何通过Docker安装elasticsearch和kibana 【详细过程+图解】
这篇文章提供了通过Docker安装Elasticsearch和Kibana的详细过程和图解,包括下载镜像、创建和启动容器、处理可能遇到的启动失败情况(如权限不足和配置文件错误)、测试Elasticsearch和Kibana的连接,以及解决空间不足的问题。文章还特别指出了配置文件中空格的重要性以及环境变量中字母大小写的问题。
一文教会你如何通过Docker安装elasticsearch和kibana 【详细过程+图解】
|
Docker 容器
docker desktop安装es并连接elasticsearch-head:5
以上就是在Docker Desktop上安装Elasticsearch并连接Elasticsearch-head:5的步骤。
633 2
|
Linux Python
【Elasticsearch】linux使用supervisor常驻Elasticsearch,centos6.10安装 supervisor
【Elasticsearch】linux使用supervisor常驻Elasticsearch,centos6.10安装 supervisor
159 3
|
自然语言处理 搜索推荐
在Elasticsearch 7.9.2中安装IK分词器并进行自定义词典配置
在Elasticsearch 7.9.2中安装IK分词器并进行自定义词典配置
1507 1
|
JSON 自然语言处理 数据库
Elasticsearch从入门到项目部署 安装 分词器 索引库操作
这篇文章详细介绍了Elasticsearch的基本概念、倒排索引原理、安装部署、IK分词器的使用,以及如何在Elasticsearch中进行索引库的CRUD操作,旨在帮助读者从入门到项目部署全面掌握Elasticsearch的使用。

热门文章

最新文章

下一篇
oss云网关配置