📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.7-7.15

简而言之,当您尝试在集群范围内更新安全设置,但传输层的传输层安全(TLS)未启用时,会出现此错误。Elasticsearch 需要 TLS 来实现安全通信。要解决此问题,您可以在 Elasticsearch 配置文件(elasticsearch.yml)中通过将 xpack.security.transport.ssl.enabled 设置为 true 来启用传输层的 TLS。或者,您也可以在每个节点上单独更新安全设置,但这效率较低且更容易出错。

日志上下文 #

日志 “Secure settings cannot be updated cluster wide when TLS for the transport layer” 的类名是 TransportNodesReloadSecureSettingsAction.java。 我们从 Elasticsearch 源代码中提取了以下内容,为那些寻求深入上下文的人提供参考:

protected void doExecute(Task task; NodesReloadSecureSettingsRequest request;
 ActionListenerlistener) {
 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);