Skip to content

ClientAuthenticationError while creating blob data source connector  #250

Open
@bnodir

Description

@bnodir

demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb
Create a blob data source connector on Azure AI Search

DefaultAzureCredential failed to retrieve a token from the included credentials.
Attempted credentials:
	EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue.
	ManagedIdentityCredential: Unexpected response "{'error': 'service_unavailable', 'error_description': 'Service not available, possibly because the machine is not connected to Azure or the config file is missing. Error: missing required agent config properties. Current agent config: {Subscriptionid: Resourcegroup: Resourcename: Tenantid: Location: VMID: VMUUID: CertificateThumbprint: Clientid: Cloud: PrivateLinkScope: Namespace: CorrelationID: ArmEndpoint: AtsResourceId:} (config file location: [C:\\ProgramData\\AzureConnectedMachineAgent\\Config\\agentconfig.json](file:///C://ProgramData//AzureConnectedMachineAgent//Config//agentconfig.json)). Connection status: Disconnected. Check Agent log for more details.', 'error_codes': [503], 'timestamp': '2024-06-30 11:17:16.2342401 +0900 JST m=+1511.508532901', 'trace_id': '', 'correlation_id': '02124ad4-1f99-4c6e-b364-48fd7f3456f2'}"
Content: {"error":"service_unavailable","error_description":"Service not available, possibly because the machine is not connected to Azure or the config file is missing. Error: missing required agent config properties. Current agent config: {Subscriptionid: Resourcegroup: Resourcename: Tenantid: Location: VMID: VMUUID: CertificateThumbprint: Clientid: Cloud: PrivateLinkScope: Namespace: CorrelationID: ArmEndpoint: AtsResourceId:} (config file location: [C:\\ProgramData\\AzureConnectedMachineAgent\\Config\\agentconfig.json](file:///C://ProgramData//AzureConnectedMachineAgent//Config//agentconfig.json)). Connection status: Disconnected. Check Agent log for more details.","error_codes":[503],"timestamp":"2024-06-30 11:17:16.2342401 +0900 JST m=+1511.508532901","trace_id":"","correlation_id":"02124ad4-1f99-4c6e-b364-48fd7f3456f2"}

To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.
---------------------------------------------------------------------------
ClientAuthenticationError                 Traceback (most recent call last)
[d:\Code\azure-search-vector-samples\demo-python\code\integrated-vectorization\azure-search-integrated-vectorization-sample.ipynb](file:///D:/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb) Cell 10 line 1
     [10](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=9) container = SearchIndexerDataContainer(name=blob_container_name)
     [11](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=10) data_source_connection = SearchIndexerDataSourceConnection(
     [12](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=11)     name=f"{index_name}-blob",
     [13](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=12)     type="azureblob",
   (...)
     [16](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=15)     data_deletion_detection_policy=NativeBlobSoftDeleteDeletionDetectionPolicy()
     [17](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=16) )
---> [18](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=17) data_source = indexer_client.create_or_update_data_source_connection(data_source_connection)
     [20](vscode-notebook-cell:/d%3A/Code/azure-search-vector-samples/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb#X12sZmlsZQ%3D%3D?line=19) print(f"Data source '{data_source.name}' created or updated")

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\azure\core\tracing\decorator.py:78, in distributed_trace.<locals>.decorator.<locals>.wrapper_use_tracer(*args, **kwargs)
     [76](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/core/tracing/decorator.py:76) span_impl_type = settings.tracing_implementation()
     [77](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/core/tracing/decorator.py:77) if span_impl_type is None:
---> [78](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/core/tracing/decorator.py:78)     return func(*args, **kwargs)
     [80](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/core/tracing/decorator.py:80) # Merge span is parameter is set, but only if no explicit parent are passed
     [81](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/core/tracing/decorator.py:81) if merge_span and not passed_in_parent:

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\azure\search\documents\indexes\_search_indexer_client.py:393, in SearchIndexerClient.create_or_update_data_source_connection(self, data_source_connection, match_condition, skip_indexer_reset_requirement_for_cache, **kwargs)
    [391](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/search/documents/indexes/_search_indexer_client.py:391) name = data_source_connection.name
    [392](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/search/documents/indexes/_search_indexer_client.py:392) packed_data_source = data_source_connection._to_generated()  # pylint:disable=protected-access
--> [393](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/search/documents/indexes/_search_indexer_client.py:393) result = self._client.data_sources.create_or_update(
    [394](file:///C:/Program%20Files/Python311/Lib/site-packages/azure/search/documents/indexes/_search_indexer_client.py:394)     data_source_name=name,
...
Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue.
	ManagedIdentityCredential: Unexpected response "{'error': 'service_unavailable', 'error_description': 'Service not available, possibly because the machine is not connected to Azure or the config file is missing. Error: missing required agent config properties. Current agent config: {Subscriptionid: Resourcegroup: Resourcename: Tenantid: Location: VMID: VMUUID: CertificateThumbprint: Clientid: Cloud: PrivateLinkScope: Namespace: CorrelationID: ArmEndpoint: AtsResourceId:} (config file location: [C:\\ProgramData\\AzureConnectedMachineAgent\\Config\\agentconfig.json](file:///C://ProgramData//AzureConnectedMachineAgent//Config//agentconfig.json)). Connection status: Disconnected. Check Agent log for more details.', 'error_codes': [503], 'timestamp': '2024-06-30 11:17:16.2342401 +0900 JST m=+1511.508532901', 'trace_id': '', 'correlation_id': '02124ad4-1f99-4c6e-b364-48fd7f3456f2'}"
Content: {"error":"service_unavailable","error_description":"Service not available, possibly because the machine is not connected to Azure or the config file is missing. Error: missing required agent config properties. Current agent config: {Subscriptionid: Resourcegroup: Resourcename: Tenantid: Location: VMID: VMUUID: CertificateThumbprint: Clientid: Cloud: PrivateLinkScope: Namespace: CorrelationID: ArmEndpoint: AtsResourceId:} (config file location: [C:\\ProgramData\\AzureConnectedMachineAgent\\Config\\agentconfig.json](file:///C://ProgramData//AzureConnectedMachineAgent//Config//agentconfig.json)). Connection status: Disconnected. Check Agent log for more details.","error_codes":[503],"timestamp":"2024-06-30 11:17:16.2342401 +0900 JST m=+1511.508532901","trace_id":"","correlation_id":"02124ad4-1f99-4c6e-b364-48fd7f3456f2"}

To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?5136fb9e-2922-43c3-8721-ee1ba99a3086) or open in a [text editor](command:workbench.action.openLargeOutput?5136fb9e-2922-43c3-8721-ee1ba99a3086). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions