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

版本: 6.8-8.9

简而言之,当Elasticsearch配置使用Azure作为快照仓库时,即使设置了代理主机或端口,但未定义Azure连接的代理类型,就会出现此错误。要解决此问题,您需要在Elasticsearch配置中指定代理类型。代理类型可以是"http"或"https"。如果您不使用代理,请确保配置中未设置代理主机和端口。

日志上下文 #


日志 “Azure Proxy port or host have been set but proxy type is not defined.” 的类名是 AzureStorageSettings.java. 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

this.timeout = timeout;
 this.maxRetries = maxRetries;
 // Register the proxy if we have any
 // Validate proxy settings
 if (proxyType.equals(Proxy.Type.DIRECT) && ((proxyPort != 0) || Strings.hasText(proxyHost))) {
 throw new SettingsException("Azure Proxy port or host have been set but proxy type is not defined.");
 }
 if ((proxyType.equals(Proxy.Type.DIRECT) == false) && ((proxyPort == 0) || Strings.isEmpty(proxyHost))) {
 throw new SettingsException("Azure Proxy type has been set but proxy host or port is not defined.");
 }