Elasticsearch 8.1.0 Cluster Issue

I trying to build an Elasticsearch cluster. But after generating the enrollment token and making some changes to the configuration file and assigning the role for different nodes it gives me the following error when I want to change the password of elastic user and try to access Elasticsearch from URL it does not accept the credentials.
here from error:

[2022-04-13T12:41:55,419][INFO ][o.e.x.s.s.SecurityIndexManager] [master-siemitry] security index does not exist, creating [.security-7] with alias [.security]
[2022-04-13T12:41:55,546][INFO ][o.e.c.m.MetadataCreateIndexService] [master-siemitry] [.security-7] creating index, cause [api], templates [], shards [1]/[0]
[2022-04-13T12:41:55,569][INFO ][o.e.c.r.a.AllocationService] [master-siemitry] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [.security-7] created])." previous.health="YELLOW" reason="index [.security-7] created"
[2022-04-13T12:42:30,532][INFO ][o.e.x.s.a.f.FileUserPasswdStore] [master-siemitry] users file [/etc/elasticsearch/users] changed. updating users...

Hi there, you need to give us a bit more information than what you have added above, otherwise it's highly improbable someone will be able to assist you. Can you explain in more details the steps you have executed so far ?

I install Elasticsearch on 3 nodes after that from one node 1 generate an enrollment token and build a cluster of Elasticsearch and also kibana on one node cluster is running normal but when I want to specify the role of nodes like 1 master and other two data it gives me an error.

[2022-04-14T12:38:22,702][INFO ][o.e.n.Node               ] [m1] node name [m1], node ID [D_BnbObUQyWIxi1YFhnhiQ], cluster name [cluster-1], roles [data_cold, data, remote_cluster_client, master, data_warm, data_content, transform, data_hot, ml, data_frozen, ingest]
[2022-04-14T12:38:33,484][ERROR][o.e.b.Bootstrap          ] [m1] Exception
java.lang.IllegalArgumentException: unknown setting [node.master] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:563) ~[elasticsearch-8.1.0.jar:8.1.0]

and this.

[2022-04-14T12:38:33,496][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [m1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [node.master] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

and these are my yml file configuration:

# ======================== Elasticsearch Configuration =
# ---------------------------------- Cluster -----------------------------------
# Use a descriptive name for your cluster:
cluster.name: cluster-1
# ------------------------------------ Node ------------------------------------
# Use a descriptive name for the node:
node.name: m1

node.master: true
node.data: false
node.ingest: false

# 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:
# 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 ["", "[::1]"]
discovery.seed_hosts: ["", "",""]
# Bootstrap the cluster using an initial set of master-eligible nodes:
cluster.initial_master_nodes: [""]
# 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 13-04-2022 08:18:19
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

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

# Enable encryption and mutual authentication between cluster nodes
  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: ["mohsin-virtual-machine"]

# Allow HTTP API connections from localhost and local networks
# Connections are encrypted and require user authentication
http.host: [_local_, _site_]

# Allow other nodes to join the cluster from localhost and local networks
# Connections are encrypted and mutually authenticated
transport.host: [_local_, _site_]

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

The error is self explanatory, you are using settings that do not exist. See Node | Elasticsearch Guide [8.1] | Elastic

I tried but still, the error is not solved.

You have to tell us what you tried and what error persisted

See Here


node.master: true
node.data: false
node.ingest: false

is incorrect syntax please look at the docs

You need to use node.roles setting

Master only looks like this per the docs
node.roles: [ master ]

yes, I sign node.roles: [master] after that it's said to me that I need to run the Elasticsearch-node repurpose command but when I run this command it affects my security indices. I enter my password for elastic it did not accept.

That's because a master has no data on it.

But going back to what you're trying to accomplish why are you trying to create one master in two data nodes that's actually less resilient than just three nodes that are both master and data roles.

If you lose the single master you lose your whole cluster.

But if have three nodes that are both data and master nodes you could lose a node and the cluster will survive.

Okay, I understand thank you for your help.

can you help me on this topic?

As answered in the thread that is not possible hot warm cold need to be on separate nodes.

You can do such things only in host terms.

So particular node will be involved in particular node.role. But please remember if You will be provisioned over docker service/yml coordinator node has an issue with definition.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.