最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Azure: Cannot deploy Logs Analytics - Stack Overflow

programmeradmin9浏览0评论

I deploy Container Instances to Azure and I want to troubleshoot why they die on me. I navigate to the logs and I get an error when I try to set up container instance logs:

The password in the 'imageRegistryCredentials' of container group 'flaskhelloconfigurecontainer' cannot be empty.
 (Code: InvalidImageRegistryPassword)

loganalycs is a "Log Analytics workspace" resource. I deploy as:

az login
az  acr login --name slack # "slack" is my Resource group
docker build -t slack.azurecr.io/flaskhelloconfigure:v1 .
docker push slack.azurecr.io/flaskhelloconfigure:v1

Then I either deploy manually (I select a DNS) or do

az container create --resource-group slack --name flaskhelloconfigure --image slack.azurecr.io/flaskhelloconfigure  --ports 80 --dns-name-label "dnsflaskhelloconfigure" --registry-username=slack --registry-password="some/password/a"

where --registry-username and --registry-password are taken from these commands (source: ChatGPT when trying to solve the error above)

az acr update -n slack --admin-enabled true
az acr credential show --name slack

I deploy Container Instances to Azure and I want to troubleshoot why they die on me. I navigate to the logs and I get an error when I try to set up container instance logs:

The password in the 'imageRegistryCredentials' of container group 'flaskhelloconfigurecontainer' cannot be empty.
 (Code: InvalidImageRegistryPassword)

loganalycs is a "Log Analytics workspace" resource. I deploy as:

az login
az  acr login --name slack # "slack" is my Resource group
docker build -t slack.azurecr.io/flaskhelloconfigure:v1 .
docker push slack.azurecr.io/flaskhelloconfigure:v1

Then I either deploy manually (I select a DNS) or do

az container create --resource-group slack --name flaskhelloconfigure --image slack.azurecr.io/flaskhelloconfigure  --ports 80 --dns-name-label "dnsflaskhelloconfigure" --registry-username=slack --registry-password="some/password/a"

where --registry-username and --registry-password are taken from these commands (source: ChatGPT when trying to solve the error above)

az acr update -n slack --admin-enabled true
az acr credential show --name slack
Share Improve this question asked Nov 16, 2024 at 16:27 aless80aless80 3,3625 gold badges37 silver badges55 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

This looks as though the frontend is generating a deployment request with incorrect or missing properties, where the faulty piece of configuration is actually nothing to do with setting a log analytics export. The error message would imply that the registry credentials are incorrect in the deployment, so unfortunately (re)setting them with the command line won't help you.

If you view the details of the failed deployment (the containerGroups resource in your screenshot), does this give you any indication of why it thinks the registry credentials are incorrect?

This looks like a portal UI bug, but you might be able to work around this using the CLI to set the container group setting independently of the Azure Portal, something like:

az resource update --ids $id --set [email protected] where $id is the resource id of the container group, and @analyticsConfig.json is a JSON document you create containing the required properties for the diagnostics section:

{
   "logType": "ContainerInstanceLogs",
   "workspaceId": "(your workspace id)",
   "workspaceKey": "(your workspace key)"
}
发布评论

评论列表(0)

  1. 暂无评论