通过 ai.azure.com 的网络界面,我创建了所有必要的服务,如带有项目的 Azure AI Studio、存储账户、Open AI、AI 搜索等,并将所有服务连接到私有端点。
问题仅在索引 AI 搜索中的文件时出现,如果它连接到私有端点,我会收到错误。如果是公共的,那么一切正常工作。
有没有人遇到过这个问题?
[enter image description here](https://i.sstatic.net/ieQvTJj8.png) [enter image description here]
机器学习管道步骤 – 创建 Azure AI 搜索索引 – 数据摄取失败
File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azureml/rag/tasks/update_acs.py", line 131, in create_search_index_sdk if acs_config["index_name"] not in index_client.list_index_names(): File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azure/core/paging.py", line 123, in __next__ return next(self._page_iterator) File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azure/core/paging.py", line 75, in __next__ self._response = self._get_next(self.continuation_token) File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azure/search/documents/indexes/_generated/operations/_indexes_operations.py", line 502, in get_next raise HttpResponseError(response=response, model=error)azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden' (update_acs.py:467)[2024-10-09 16:24:22] ERROR azureml.rag.update_acs.update_acs - ActivityCompleted: Activity=update_acs, HowEnded=Failure, Duration=14317.24 [ms], Exception=HttpResponseError (activity.py:127)Traceback (most recent call last): File "/azureml-envs/rag-embeddings/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/azureml-envs/rag-embeddings/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals)
[2024-10-09 16:24:10] INFO azureml.rag.connections - Using User Identity for authentication. (connections.py:265)[2024-10-09 16:24:10] INFO azureml.rag.update_acs - Using Index fields: { "content": "content", "url": "url", "filename": "filepath", "title": "title", "metadata": "meta_json_string"} (update_acs.py:309)[2024-10-09 16:24:10] INFO azureml.rag.update_acs - Ensuring search index shy-needle-jv648s7dcq99 exists (update_acs.py:127)_AzureMLOnBehalfOfCredential.get_token succeeded[2024-10-09 16:24:15] ERROR azureml.rag.update_acs.update_acs - ActivityCompleted: Activity=update_acs, HowEnded=Failure, Duration=5516.44 [ms], Exception=HttpResponseError (activity.py:127)[2024-10-09 16:24:16] ERROR azureml.rag.update_acs - Failed to update ACS index (update_acs.py:429)[2024-10-09 16:24:17] ERROR azureml.rag.update_acs.update_acs - ServiceError: intepreted error = Rag system error, original error = Operation returned an invalid status 'Forbidden' (exceptions.py:124)[2024-10-09 16:24:22] ERROR azureml.rag.update_acs.update_acs - update_acs failed with exception: Traceback (most recent call last): File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azureml/rag/tasks/update_acs.py", line 465, in main_wrapper map_exceptions(main, activity_logger, args, logger, activity_logger) File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azureml/rag/utils/exceptions.py", line 126, in map_exceptions raise e File "/azureml-envs/rag-embeddings/lib/python3.9/site-packages/azureml/rag/utils/exceptions.py", line 118, in map_exceptions return func(*func_args, **kwargs)
我尝试添加不同的访问权限(角色),但没有帮助
回答:
我遇到了同样的问题,并且刚刚解决了它。
解决方法如下:
-
在 Azure 门户中为搜索服务设置基于 API 密钥的访问控制
-
在 Azure AI Studio 的项目设置中为同一资源设置管理员密钥 > 连接资源 > 选择 Azure AI 搜索(认知搜索)类型资源,然后编辑。还要检查目标是否设置正确!