Настройка кластера elasticsearch8 с помощью токенаLinux

Ответить
Anonymous
 Настройка кластера elasticsearch8 с помощью токена

Сообщение Anonymous »

Пожалуйста, я хотел бы установить кластер elasticsearch 8 на 3 серверах под управлением Ubuntu 20.04.
Я начал с установки elasticserach8 на первый сервер:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list
sudo apt update
sudo apt install elasticsearch=8.17.0

Я изменил файл /etc/elasticsearch/elasticsearch.yml
cluster.name: my-application

node.name: node-1

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

network.host: 45.62.186.106

http.port: 9200

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
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
#cluster.initial_master_nodes: ["vultr"]

# 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

И я запустил первый узел, после запуска я использовал команду для генерации токена
systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node

на втором сервере я только что установил elasticsearch, ничего не изменяя в файле elasticsearch.yml
когда я хотел добавить узел сервера 2 в кластер с помощью команды
sudo /usr/share/elasticsearch/bin/elasticsearch --enrollment-token

но я получаю эту ошибку
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., with exit code 80


это странно, установка только что была завершена и никогда не была частью кластера.
Затем я удалил elasticsearch и очистил все,
чтобы переустановить elasticsearech, потому что на этот раз я изменил файл конфигурации elasticserch
и перезапустил узел, пытаясь добавить его с помощью токена.
У меня была та же ошибка

# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-2
#
# 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
#


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., with exit code 80


У вас есть идея?
С уважением.
настройте кластер elasticsearch8 с помощью токена
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., with exit code 80


Подробнее здесь: https://stackoverflow.com/questions/793 ... th-a-token
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Linux»