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

版本: 8.4-8.4

简而言之,当请求中提供的Elasticsearch API密钥不正确或不属于发出请求的用户时,会出现此错误。这可能是由于密钥输入错误或用户与密钥不匹配导致的。要解决此问题,您可以验证API密钥并确保它属于正确的用户。如果密钥不正确,请生成一个新的密钥。如果用户不正确,请确保与密钥关联的用户正在发出请求。

日志上下文 #

日志"no API key owned by requesting user found for ID [" + apiKeyId + “]“的类名是 ApiKeyService.java。我们从Elasticsearch源代码中提取了以下内容,供那些需要深入了解上下文的人参考:

findVersionedApiKeyDocsForSubject(authentication; new String[] { request.getId() }; ActionListener.wrap((versionedDocs) -> {
 final var apiKeyId = request.getId();  if (versionedDocs.isEmpty()) {
 throw new ResourceNotFoundException("no API key owned by requesting user found for ID [" + apiKeyId + "]");
 }  final VersionedApiKeyDoc versionedDoc = singleDoc(apiKeyId; versionedDocs);  validateCurrentApiKeyDocForUpdate(apiKeyId; authentication; versionedDoc.doc());