Briefly, this error occurs when there’s an issue with the encryption keys used for secure communication between Elasticsearch nodes. The master node is responsible for rotating these keys. If there’s a problem with this process, this error is thrown. To resolve this, you can manually rotate the keys, ensure that the master node has the necessary permissions, or check for network connectivity issues between the nodes. Also, ensure that your Elasticsearch version supports key rotation. If the issue persists, consider seeking help from Elasticsearch support or community forums.
This guide will help you check for common problems that cause the log ” rotate keys on master ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, master.
Log Context
Log “rotate keys on master” classname is TokenService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
private void submitUnbatchedTask(@SuppressWarnings("SameParameterValue") String source; ClusterStateUpdateTask task) { clusterService.submitUnbatchedStateUpdateTask(source; task); } void rotateKeysOnMaster(ActionListenerlistener) { logger.info("rotate keys on master"); TokenMetadata tokenMetadata = generateSpareKey(); submitUnbatchedTask( "publish next key to prepare key rotation"; new TokenMetadataPublishAction(tokenMetadata; ActionListener.wrap((res) -> { if (res.isAcknowledged()) {