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

版本: 8.2-8.9

简而言之,当 Elasticsearch 由于语法或格式不正确而无法解析提供的 HTTPS URI 时,就会发生此错误。这可能是由于缺少 ‘https://'、端口号不正确或包含无效字符造成的。要解决此问题,请确保 URI 格式正确,包含所有必需的组件,并且没有无效字符。如果 URI 包含端口号,请验证其是否正确。此外,还要检查 URI 中的任何特殊字符是否已正确编码。

日志上下文 #

日志 “Failed to parse HTTPS URI [” + uriString + “].” 的类名是 JwtUtil.java. 我们从 Elasticsearch 源代码中提取了以下内容,以便为寻求深入上下文的人提供参考:

if (uriString.startsWith("https")) {
 final URI uri;
 try {
 uri = new URI(uriString);
 } catch (Exception e) {
 throw new SettingsException("Failed to parse HTTPS URI [" + uriString + "]."; e);
 }
 if (Strings.hasText(uri.getHost()) == false) {
 // Example URIs w/o host: "https:/"; "https://"; "https://:443"
 throw new SettingsException("Host is missing in HTTPS URI [" + uriString + "].");
 }