discovery-issues.asciidoc 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [[discovery-troubleshooting]]
  2. == Troubleshooting discovery
  3. In most cases, the discovery and election process completes quickly, and the
  4. master node remains elected for a long period of time.
  5. If your cluster doesn't have a stable master, many of its features won't work
  6. correctly and {es} will report errors to clients and in its logs. You must fix
  7. the master node's instability before addressing these other issues. It will not
  8. be possible to solve any other issues while there is no elected master node or
  9. the elected master node is unstable.
  10. If your cluster has a stable master but some nodes can't discover or join it,
  11. these nodes will report errors to clients and in their logs. You must address
  12. the obstacles preventing these nodes from joining the cluster before addressing
  13. other issues. It will not be possible to solve any other issues reported by
  14. these nodes while they are unable to join the cluster.
  15. If the cluster has no elected master node for more than a few seconds, the
  16. master is unstable, or some nodes are unable to discover or join a stable
  17. master, then {es} will record information in its logs explaining why. If the
  18. problems persist for more than a few minutes, {es} will record additional
  19. information in its logs. To properly troubleshoot discovery and election
  20. problems, collect and analyse logs covering at least five minutes from all
  21. nodes.
  22. The following sections describe some common discovery and election problems.
  23. [discrete]
  24. [[discovery-no-master]]
  25. === No master is elected
  26. When a node wins the master election, it logs a message containing
  27. `elected-as-master` and all nodes log a message containing
  28. `master node changed` identifying the new elected master node.
  29. If there is no elected master node and no node can win an election, all
  30. nodes will repeatedly log messages about the problem using a logger called
  31. `org.elasticsearch.cluster.coordination.ClusterFormationFailureHelper`. By
  32. default, this happens every 10 seconds.
  33. Master elections only involve master-eligible nodes, so focus on the logs from
  34. master-eligible nodes in this situation. These nodes' logs will indicate the
  35. requirements for a master election, such as the discovery of a certain set of
  36. nodes.
  37. If the logs indicate that {es} can't discover enough nodes to form a quorum,
  38. you must address the reasons preventing {es} from discovering the missing
  39. nodes. The missing nodes are needed to reconstruct the cluster metadata.
  40. Without the cluster metadata, the data in your cluster is meaningless. The
  41. cluster metadata is stored on a subset of the master-eligible nodes in the
  42. cluster. If a quorum can't be discovered, the missing nodes were the ones
  43. holding the cluster metadata.
  44. Ensure there are enough nodes running to form a quorum and that every node can
  45. communicate with every other node over the network. {es} will report additional
  46. details about network connectivity if the election problems persist for more
  47. than a few minutes. If you can't start enough nodes to form a quorum, start a
  48. new cluster and restore data from a recent snapshot. Refer to
  49. <<modules-discovery-quorums>> for more information.
  50. If the logs indicate that {es} _has_ discovered a possible quorum of nodes, the
  51. typical reason that the cluster can't elect a master is that one of the other
  52. nodes can't discover a quorum. Inspect the logs on the other master-eligible
  53. nodes and ensure that they have all discovered enough nodes to form a quorum.
  54. [discrete]
  55. [[discovery-master-unstable]]
  56. === Master is elected but unstable
  57. When a node wins the master election, it logs a message containing
  58. `elected-as-master`. If this happens repeatedly, the elected master node is
  59. unstable. In this situation, focus on the logs from the master-eligible nodes
  60. to understand why the election winner stops being the master and triggers
  61. another election.
  62. [discrete]
  63. [[discovery-cannot-join-master]]
  64. === Node cannot discover or join stable master
  65. If there is a stable elected master but a node can't discover or join its
  66. cluster, it will repeatedly log messages about the problem using the
  67. `ClusterFormationFailureHelper` logger. Other log messages on the affected node
  68. and the elected master may provide additional information about the problem.
  69. [discrete]
  70. [[discovery-node-leaves]]
  71. === Node joins cluster and leaves again
  72. If a node joins the cluster but {es} determines it to be faulty then it will be
  73. removed from the cluster again. See <<cluster-fault-detection-troubleshooting>>
  74. for more information.