最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Azure: Cannot deploy Logs Analytics - Stack Overflow

matteradmin6PV0评论

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)"
}
Post a comment

comment list (0)

  1. No comments so far