国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

es8.8 集群安裝筆記

這篇具有很好參考價(jià)值的文章主要介紹了es8.8 集群安裝筆記。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。


本次安裝使用centos8
3節(jié)點(diǎn)安裝:
192.168.182.142
192.168.182.143
192.168.182.144

官網(wǎng) 可以查看詳細(xì)的安裝,安裝步驟比較簡單
https://www.elastic.co/guide/en/elasticsearch/reference/8.8/rpm.html#rpm-repo

直接安裝,需要配置倉庫
 cd  /etc/yum.repos.d/
 vielasticsearch.repo

[elasticsearch]
name=Elasticsearch repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md

sudo yum install --enablerepo=elasticsearch elasticsearch  -y

開機(jī)啟動(dòng)
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
啟動(dòng)/停止
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
查看狀態(tài)
sudo systemctl status elasticsearch.service

journalctl --unit elasticsearch

修改系統(tǒng)最大文件句柄數(shù)(修改后需要重啟系統(tǒng)才能生效)
# vi /etc/security/limits.conf
*       soft    nproc   65535
*       hard    nproc   65535
*       soft    nofile  65535
*       hard    nofile  65535

reboot

修改最大虛擬內(nèi)存
 vi /etc/sysctl.conf
vm.max_map_count=655360

訪問需要用https https://127.0.0.1:9200/
默認(rèn)用戶 elastic
密碼就是安裝的時(shí)候打印到屏幕上的密碼

配置集群

8.8 使用 創(chuàng)建token 這一招,沒有奏效,于是乎在官網(wǎng)各種爬。

第一步 修改配置文件

node1

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: es
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 192.168.182.143
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["192.168.182.142", "192.168.182.143","192.168.182.144"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["node1", "node2", "node3"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 01-07-2023 14:38:29
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.autoconfiguration.enabled : true
xpack.security.enabled: true


xpack.security.enrollment.enabled: true
xpack.security.transport.ssl.verification_mode: none

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/elastic-certificates.p12
  truststore.path: certs/elastic-certificates.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
#cluster.initial_master_nodes: ["localhost.localdomain"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
transport.host: 0.0.0.0
transport.port: 9300

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
node.roles: [master,data]

主要修改點(diǎn):
····
cluster.name: es
node.name: node1
network.host: 192.168.182.143
添加如下兩個(gè)節(jié)點(diǎn)啟動(dòng)之后不會(huì)自動(dòng)創(chuàng)建集群
discovery.seed_hosts: [“192.168.182.142”, “192.168.182.143”,“192.168.182.144”]
cluster.initial_master_nodes: [“node1”, “node2”, “node3”]
transport.host: 0.0.0.0
transport.port: 9300
node.roles: [master,data]

····

配置文件修改完成之后,啟動(dòng)節(jié)點(diǎn)。報(bào)錯(cuò)如下:

[2023-07-08T00:24:27,553][WARN ][o.e.x.c.s.t.n.SecurityNetty4Transport] [node2] client did not trust this server's certificate, closing connection Netty4TcpChannel{localAddress=/192.168.182.143:9300, remoteAddress=/192.168.182.144:36500, profile=default}
[2023-07-08T00:24:28,420][WARN ][o.e.d.PeerFinder         ] [node2] address [192.168.182.142:9300], node [null], requesting [false] discovery result: [][192.168.182.142:9300] connect_exception: Failed execution: 

原因是因?yàn)闆]有配置通信證書。

找到一篇安全配置的文章
es安全配置

生成證書:
生成集群節(jié)點(diǎn)證書:

生成ca證書
./bin/elasticsearch-certutil ca
使用ca證書生成集群通信證書
./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12

把證書復(fù)制到其他節(jié)點(diǎn)/etc/elasticsearch/certs 目錄中

把證書密鑰添加至本地密鑰庫

./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password


./bin/elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password

節(jié)點(diǎn)更新完成之后重啟各個(gè)節(jié)點(diǎn),查看節(jié)點(diǎn)狀態(tài),集群創(chuàng)建成功。
es8.8 集群安裝筆記,運(yùn)維
狀態(tài)查詢
curl -XGET"http://localhost:9200/_cluster/health?pretty=true"
查詢Elasticsearch運(yùn)行狀態(tài)
curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200
查詢集群節(jié)點(diǎn)信息
curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200/_cluster/health?pretty=true

curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200/_cat/nodes

142 qvKpUo1_T1yqgkpn_KMk

生成token
/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node

/usr/share/elasticsearch/bin/elasticsearch-certutil cert

/usr/share/elasticsearch/bin/elasticsearch --enrollment-token eyJ2ZXIiOiI4LjguMiIsImFkciI6WyIxOTIuMTY4LjE4Mi4xNDI6OTIwMCJdLCJmZ3IiOiIxNDdjOWE5NGMwZDUwNTk2NWMwYWE0MmEyNDg3YzVkMjUyMWYzNjc5Y2QxZmMxOTBmYTg5ZDUxOTJlOTM1NjE4Iiwia2V5IjoibTkzMUZJa0JtRy1SVjJfNjZfYzk6M0hZN0Mxam5Uak9LWEVJQTJpN3BjUSJ9

常見問題匯總:

1.ERROR: Skipping security auto configuration because it appears that the node is not starting up for the first time. The node might already be part of a cluster and this auto setup utility is designed to configure Security for new clusters only

這個(gè)是因?yàn)榘惭b好之后啟動(dòng)過一次,之后注冊(cè)節(jié)點(diǎn)沒成功。

2.Skipping security auto configuration because this node is configured to bootstrap or to join a multi-node cluster, which is not supported

不能刪除安全項(xiàng)配置,

xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
  1. ERROR: Skipping security auto configuration because it appears that security is already configured

    安裝好之后配置了集群但是注冊(cè)失敗,具體原因還得繼續(xù)排除

  2. java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

    這種問題是開啟了安全模式,各個(gè)節(jié)點(diǎn)沒有配置證書的原因?qū)е?span toymoban-style="hidden">文章來源地址http://www.zghlxwxcb.cn/news/detail-542816.html

到了這里,關(guān)于es8.8 集群安裝筆記的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 最新安裝es8.12.2、es-ik分詞器、kibana-8.12.2

    最新安裝es8.12.2、es-ik分詞器、kibana-8.12.2

    目錄 下載官網(wǎng)安裝包 百度網(wǎng)盤 提取碼:koko Elasticsearch官網(wǎng) es-ik分詞器下載地址 kibana下載地址 es安裝部署 上傳安裝包 解壓 添加用戶組添加用戶 更改目錄 Owner 更換es用戶 修改 config 包下配置文件 elasticsearch.yml 如下: 修改啟動(dòng)內(nèi)存大小 啟動(dòng)es 測(cè)試驗(yàn)證 本地訪問不了原因: 1、

    2024年03月18日
    瀏覽(41)
  • docker安裝es8.x及elasticSearch8部分api使用

    docker中安裝es8 1、es8的tar下載地址: tar包下載地址) 2、docker load -i es-name 3、docker run -d --name elasticsearch-8.6.2 -e ES_JAVA_OPTS=“-Xms256m -Xmx256m” -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” elasticsearch:8.6.2 4、8開始以后不支持直接使用http方式訪問es: 4.1、cd /usr/share/elasticsearch/config 4

    2024年02月12日
    瀏覽(17)
  • 【運(yùn)維知識(shí)大神篇】超詳細(xì)的ELFK日志分析教程4(ES讀寫文檔原理+集群角色+master節(jié)點(diǎn)與數(shù)據(jù)節(jié)點(diǎn)分離+Logstash安裝部署+Logstash采集本地文件+采集Nginx日志)

    【運(yùn)維知識(shí)大神篇】超詳細(xì)的ELFK日志分析教程4(ES讀寫文檔原理+集群角色+master節(jié)點(diǎn)與數(shù)據(jù)節(jié)點(diǎn)分離+Logstash安裝部署+Logstash采集本地文件+采集Nginx日志)

    本篇文章繼續(xù)給大家介紹ELFK日志分析的有關(guān)內(nèi)容,我們的ES和Kibana都介紹的差不多了,所以本篇文章重點(diǎn)介紹Logstash的有關(guān)內(nèi)容,介紹完畢后,我們的ELFK架構(gòu)將初步形成,此外還有ES讀寫文檔的原理,了解原理,更深層次的理解,使用ES,集群角色和master節(jié)點(diǎn)與數(shù)據(jù)節(jié)點(diǎn)分離,

    2024年02月02日
    瀏覽(29)
  • Java與es8實(shí)戰(zhàn)之二:Springboot集成es8的Java Client

    配置springboot的application.yml 配置es的自簽證書 執(zhí)行如下命令將es容器中的crt文件復(fù)制到本地 docker cp 容器名稱:/usr/share/elasticsearch/config/certs/http_ca.crt . 將crt文件放至springboot項(xiàng)目的resource路徑下

    2024年02月12日
    瀏覽(21)
  • java與es8實(shí)戰(zhàn)之四:SpringBoot應(yīng)用中操作es8(無安全檢查)

    java與es8實(shí)戰(zhàn)之四:SpringBoot應(yīng)用中操作es8(無安全檢查)

    這里分類和匯總了欣宸的全部原創(chuàng)(含配套源碼):https://github.com/zq2599/blog_demos 本篇是《java與es8實(shí)戰(zhàn)》系列的第四篇,系列文章寫到現(xiàn)在,連個(gè)HelloWorld都沒運(yùn)行起來,實(shí)在說不過去了... 因此,本篇總體目標(biāo)明確:實(shí)戰(zhàn)在SpringBoot應(yīng)用中操作elasticsearch8 為了降低難度,本篇部署的

    2024年02月11日
    瀏覽(47)
  • ES8生產(chǎn)實(shí)踐——pod日志采集(Fluentd方案)

    ES8生產(chǎn)實(shí)踐——pod日志采集(Fluentd方案)

    Fluentd是一個(gè)是一個(gè)開源的日志收集和傳輸工具,旨在解決日志數(shù)據(jù)的收集、傳輸和處理問題,它可以收集來自于各種系統(tǒng)或應(yīng)用的日志,轉(zhuǎn)化為用戶指定的格式后,轉(zhuǎn)發(fā)到用戶所指定的日志存儲(chǔ)系統(tǒng)之中。 用圖來說明問題的話,在沒有使用之前Fluentd,日志采集過濾存儲(chǔ)流程

    2024年02月09日
    瀏覽(19)
  • es8 text類型使用term精確查詢失效

    es8 text類型使用term精確查詢失效

    問題: 在使用term精確查詢text 類型時(shí),比如phone 手機(jī)號(hào)數(shù)值時(shí)可以查詢到,使用nickname 這種text 查詢不到。 我的mapping 是這樣的 ? ? 解決: 1. 通過es提供的測(cè)試分詞的接口,我們可以測(cè)試各字段的分詞情況 分別分詞為’北‘,京,大,學(xué),并沒有我想要的整體的一塊的分詞

    2023年04月11日
    瀏覽(32)
  • ElasticSearch第二章(ES8.X的使用)

    ElasticSearch第二章(ES8.X的使用)

    目錄 1:ES的使用(DSL創(chuàng)建索引庫-相當(dāng)于表) 1.1:什么是索引庫 1.2:索引庫的增刪改查使用 2:ES的使用(DSL操作文檔-相當(dāng)于數(shù)據(jù)) 2.1:什么是文檔 2.2:文檔的增刪改查 3:java代碼開發(fā) 3.1:準(zhǔn)備工作 3.2:代碼操作索引(也就是表的增刪改查) 3.3:代碼操作文檔(也就是數(shù)

    2024年03月23日
    瀏覽(23)
  • 【好書推薦】JavaScript Es8 函數(shù)式編程實(shí)踐入門

    【好書推薦】JavaScript Es8 函數(shù)式編程實(shí)踐入門

    Anto Aravinth從事軟件行業(yè)已經(jīng)6年多了。他開發(fā)了許多用新技術(shù)編寫的系統(tǒng)。Anto了解JavaScript的基礎(chǔ)知識(shí)及其工作方式,并培訓(xùn)了許多人。Anto在業(yè)余時(shí)間也做OSS,他喜歡打乒乓球。 Srikanth Machiraju作為開發(fā)人員、架構(gòu)師、技術(shù)培訓(xùn)師和社區(qū)發(fā)言人,擁有超過10年的工作經(jīng)驗(yàn)。他目

    2024年02月08日
    瀏覽(27)
  • java與es8實(shí)戰(zhàn)之一:以builder pattern開篇

    java與es8實(shí)戰(zhàn)之一:以builder pattern開篇

    這里分類和匯總了欣宸的全部原創(chuàng)(含配套源碼):https://github.com/zq2599/blog_demos 《java與es8實(shí)戰(zhàn)》系列是欣宸與2022年夏季推出的原創(chuàng)系列,如標(biāo)題所述,該系列從一個(gè)java程序員視角去學(xué)習(xí)和實(shí)踐elasticsearch的8.2版本,目標(biāo)是與大家一起掌握與elasticsearch開發(fā)相關(guān)的技能,以應(yīng)對(duì)實(shí)

    2024年02月11日
    瀏覽(18)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包