Asib27's picture
try 1
065fee7 verified
|
raw
history blame
4.28 kB

Troubleshoot Azure Container Registry client library issues

This troubleshooting guide contains instructions to diagnose frequently encountered issues while using the Azure Container Registry client library for Python.

General Troubleshooting

ACR client library will raise exceptions defined in Azure Core.

Enable client logging

This library uses the standard logging library for logging.

Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO level.

Detailed DEBUG level logging, including request/response bodies and unredacted headers, can be enabled on the client or per-operation with the logging_enable keyword argument.

See full Python SDK logging documentation with examples here.

Optional Configuration

Optional keyword arguments can be passed in at the client and per-operation level. The azure-core reference documentation describes available configurations for retries, logging, transport protocols, and more.

Troubleshooting authentication errors

HTTP 401 Errors

HTTP 401 errors indicate problems authenticating. Check the exception message or logs for more information.

Anonymous access issues

You may see error similar to the one below, it indicates an attempt to perform operation that requires authentication without credentials.

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, visit https://aka.ms/acr/authorization for
more information."}]}

Unauthorized access can only be enabled for read (pull) operations such as listing repositories, getting properties or tags. Refer to Anonymous pull access to learn about anonymous access limitation.

HTTP 403 Errors

HTTP 403 errors indicate that user is not authorized to perform a specific operation in Azure Container Registry.

Insufficient permissions

If you see an error similar to the one below, it means that the provided credentials do not have permission to access the registry.

{"errors":[{"code":"DENIED","message":"retrieving permissions failed"}]}

To resolve:

  1. Check that the application or user that is making the request has sufficient permissions. Check Troubleshoot registry login for possible solutions.
  2. If the user or application is granted sufficient privileges to query the workspace, make sure you are authenticating as that user/application. If you are authenticating using DefaultAzureCredential, check the logs to verify that the credential used is the one you expected. To enable logging, see the Enable client logging section above.

For more help on troubleshooting authentication errors, please see the Azure Identity client library troubleshooting guide.

Network access issues

The below error indicates that public access to the Azure Container Registry is disabled or restricted. Refer to Troubleshoot network issues with registry for more information.

{"errors":[{"code":"DENIED","message":"client with IP '<your IP address>' is not allowed access. Refer https://aka.m
s/acr/firewall to grant access."}]}