You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
I'm using Azure Function with Python and managed-identity, but noticed that a MSI: Failed to retrieve a token exception appears many times. Is there any workaround or new build could fix this problem?
Package version:
msrestazure==0.6.1
Trace back:
Exception while executing function: Functions.AzureTimerTrigger Result: Failure
Exception: RuntimeError: MSI: Failed to retrieve a token from 'http://localhost:8081/msi/token/?resource=https://management.core.windows.net/&api-version=2017-09-01' with an error of 'HTTPConnectionPool(host='localhost', port=8081): Max retries exceeded with url: /msi/token/?resource=https://management.core.windows.net/&api-version=2017-09-01 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7feee2e160f0>: Failed to establish a new connection: [Errno 111] Connection refused',))'.
Stack: File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/dispatcher.py", line 315, in _handle__invocation_request
self.__run_sync_func, invocation_id, fi.func, args)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/dispatcher.py", line 434, in __run_sync_func
return func(**params)
File "/home/site/wwwroot/AzureTimerTrigger/main.py", line 84, in main
compute_client = create_azure_client(ComputeManagementClient, virtual_appliance_subscription)
File "/home/site/wwwroot/AzureTimerTrigger/main.py", line 306, in create_azure_client
credentials = MSIAuthentication()
File "/home/site/wwwroot/.python_packages/lib/python3.6/site-packages/msrestazure/azure_active_directory.py", line 592, in __init__
self.set_token()
File "/home/site/wwwroot/.python_packages/lib/python3.6/site-packages/msrestazure/azure_active_directory.py", line 596, in set_token
self.scheme, _, self.token = get_msi_token_webapp(self.resource, self.msi_conf)
File "/home/site/wwwroot/.python_packages/lib/python3.6/site-packages/msrestazure/azure_active_directory.py", line 546, in get_msi_token_webapp
raise RuntimeError(err_msg)
The text was updated successfully, but these errors were encountered:
Hi,
I'm using Azure Function with Python and managed-identity, but noticed that a MSI: Failed to retrieve a token exception appears many times. Is there any workaround or new build could fix this problem?
Package version:
Trace back:
The text was updated successfully, but these errors were encountered: