Ubuntu elastic安装启动

2022/7/21 5:23:39

本文主要是介绍Ubuntu elastic安装启动,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1. 下载了安装包elasticsearch-8.3.2-linux-x86_64.tar

 tar -xf后启动报warning : ignoring JAVA_HOME=/usr/lib/jdk8/jdk1.8.0_251; using bundled JDK

原因大概是e8不支持java8

2. 重新下载安装包elasticsearch-7.17.2-linux-x86_64.tar,解压后运行./bin/elasticsearch报错

[2022-07-20T11:05:03,954][ERROR][o.e.i.g.GeoIpDownloader  ] [vm-10-15-7-72] exception during geoip databases update
java.net.SocketTimeoutException: connect timed out

解决:

config/elasticsearch.yml
ingest.geoip.downloader.enabled: false(注意false前必须有空格)

3.  再运行./bin/elasticsearch报错

ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap check failure [1] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
bootstrap check failure [2] of [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
[2022-07-20T11:16:48,526][INFO ][o.e.x.m.p.NativeController] [elastic-node-1] Native controller process has stopped - no new native processes can be started

解决:

解决[1] of [2]
sudo vim /etc/sysctl.conf
vm.max_map_count=655360
sudo sysctl -p

解决[2] of [2]
config/elasticsearch.yml
#cluster.name: my-application
#node.name: node-1
#cluster.initial_master_nodes: ["node-1", "node-2"]
--->
cluster.name: elastic-my-application
node.name: elastic-node-1
cluster.initial_master_nodes: ["elastic-node-1"]

4. 其他配置

config/elasticsearch.yml

#network.host: 192.168.0.1
#http.port: 9200
--->
network.host: 0.0.0.0 //跨域访问
http.port: 9200

  node.master: true      #该节点是否是master,true表示是的,false表示否,默认是true
  node.data: true        #该节点是否存储数据,默认true表示是的
  transport.tcp.port: 9300 #节点之间通信的端口,默认为9300
  xpack.security.enabled: false

 

 



这篇关于Ubuntu elastic安装启动的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程