Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify initial_master_nodes must match node.name #41137

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/reference/modules/discovery/bootstrapping.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,35 @@ cluster.initial_master_nodes:
- master-node-hostname
--------------------------------------------------

[NOTE]
==================================================

The node names used in this list must exactly match the `node.name` properties
of the nodes. By default the node name is set to the machine's hostname which
may or may not be fully-qualified depending on your system configuration. If
each node name is a fully-qualified domain name such as `master-a.example.com`
then you must use fully-qualified domain names in the
`cluster.initial_master_nodes` list too; conversely if your node names are bare
hostnames (without the `.example.com` suffix) then you must use bare hostnames
in the `cluster.initial_master_nodes` list. If you use a mix of fully-qualifed
and bare hostnames, or there is some other mismatch between `node.name` and
`cluster.initial_master_nodes`, then the cluster will not form successfully and
you will see log messages like the following.

[source,text]
--------------------------------------------------
[master-a.example.com] master not discovered yet, this node has
not previously joined a bootstrapped (v7+) cluster, and this
node must discover master-eligible nodes [master-a, master-b] to
bootstrap a cluster: have discovered [{master-b.example.com}{...
--------------------------------------------------

This message shows the node names `master-a.example.com` and
`master-b.example.com` as well as the `cluster.initial_master_nodes` entries
`master-a` and `master-b`, and it is apparent that they do not match exactly.

==================================================

Like all node settings, it is also possible to specify the initial set of master
nodes on the command-line that is used to start Elasticsearch:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ cluster.initial_master_nodes:
`transport.port` if not specified.
<2> If a hostname resolves to multiple IP addresses then the node will attempt to
discover other nodes at all resolved addresses.
<3> Initial master nodes can be identified by their <<node.name,node name>>.
<3> Initial master nodes can be identified by their <<node.name,`node.name`>>.
Make sure that the value here matches the `node.name` exactly. If you use a
fully-qualified domain name such as `master-node-a.example.com` for your
node names then you must use the fully-qualified name in this list;
conversely if `node.name` is a bare hostname without any trailing
qualifiers then you must also omit the trailing qualifiers in
`cluster.initial_master_nodes`.
<4> Initial master nodes can also be identified by their IP address.
<5> If multiple master nodes share an IP address then the port must be used to
disambiguate them.
Expand Down