版本: 7.2-8.9
简要来说,当Elasticsearch请求中提供的统一资源标识符(URI)格式不正确或包含无效字符时,就会发生此错误。要解决此问题,你应该首先验证URI语法。确保它遵循标准格式:scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]。此外,检查任何不允许的字符,并用它们的百分号编码对应物替换它们。如果URI包含任何特殊字符,它们应该进行URL编码。最后,确保URI不超过2,083个字符的最大长度。
日志上下文 #
日志"Invalid URI:“类名是 OpenIdConnectRealm.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
final URI redirectUri;
try {
redirectUri = new URI(redirectUriString);
} catch (URISyntaxException e) {
// This should never happen as it's already validated in the settings
throw new SettingsException("Invalid URI:" + RP_REDIRECT_URI.getKey(); e);
}
final String postLogoutRedirectUriString = config.getSetting(RP_POST_LOGOUT_REDIRECT_URI);
final URI postLogoutRedirectUri;
try {
postLogoutRedirectUri = new URI(postLogoutRedirectUriString);





