Secure settings cannot be updated cluster wide when TLS for the transport layer – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.7-7.15

Briefly, this error occurs when you try to update secure settings across the cluster while Transport Layer Security (TLS) for the transport layer is not enabled. Elasticsearch requires TLS for secure communication. To resolve this, you can enable TLS for the transport layer in the Elasticsearch configuration file (elasticsearch.yml) by setting ‘xpack.security.transport.ssl.enabled’ to ‘true’. Alternatively, you can update the secure settings on each node individually, but this is less efficient and more prone to errors.

This guide will help you check for common problems that cause the log ” Secure settings cannot be updated cluster wide when TLS for the transport layer ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: admin, cluster, node, settings.

Log Context

Log “Secure settings cannot be updated cluster wide when TLS for the transport layer” class name is TransportNodesReloadSecureSettingsAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 protected void doExecute(Task task; NodesReloadSecureSettingsRequest request;
 ActionListener listener) {
 if (request.hasPassword() && isNodeLocal(request) == false && isNodeTransportTLSEnabled() == false) {
 request.closePassword();
 listener.onFailure(
 new ElasticsearchException("Secure settings cannot be updated cluster wide when TLS for the transport layer" +
 " is not enabled. Enable TLS or use the API with a `_local` filter on each node."));
 } else {
 super.doExecute(task; request; ActionListener.wrap(response -> {
 request.closePassword();
 listener.onResponse(response);

 

 [ratemypost]