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

版本: 7.16-8.9

简而言之,当 Elasticsearch 尝试连接到它无法识别的协议的 URL 时,就会发生此错误。这可能是由于协议名称拼写错误或使用不受支持的协议造成的。要解决此问题,您应该首先检查 URL 是否有任何拼写错误或协议名称不正确。如果协议正确,请确保它是 Elasticsearch 支持的协议。如果不支持,您可能需要安装额外的库或插件来添加对该协议的支持。

日志上下文 #

日志 “unknown url protocol from URL [” + urlToCheck + “]” 的类名是 URLRepository.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入理解的人参考:

* Makes sure that the url is white listed or if it points to the local file system it matches one on of the root path in path.repo
 */
  private URL checkURL(URL urlToCheck) {
  String protocol = urlToCheck.getProtocol();
  if (protocol == null) {
  throw new RepositoryException(getMetadata().name(); "unknown url protocol from URL [" + urlToCheck + "]");
  }
  for (String supportedProtocol : supportedProtocols) {
  if (supportedProtocol.equals(protocol)) {
  try {
  if (URIPattern.match(urlWhiteList; urlToCheck.toURI())) {