Can't access logs stream of an container from Azure Container Apps

595 Views Asked by At

I'am deploying an application to Azure Spring Apps via Azure CLI from a docker image which is present in the Azure Container Registry:

az spring app deploy 
-n <application-name> 
-s <service-name> 
-g <resource-group-name> 
--container-image processorregistry.azurecr.io/test-app:myapp-2 
--container-registry processorregistry.azurecr.io 
--registry-username <registry-username> 
--registry-password <registry-password>

As i understand Azure Spring Apps is build on top of the Kubernetes, so this service creates and manage by itself all the containers.

Now the problem is, while running this command in terminal, it fails with a message of InternalServerError. When i'am trying to access the container logs i get Unauthorized. If i try to modify something in container configuration this is what i got:

however, the access is denied because of the deny assignment with name '86a4e140-7a5c-4130-9b7a-b79af99c6413' and Id '86a4e1407a5c41309b7ab79af99c6413' at scope '/subscriptions/9c270d7c-042e-48e9-b1ee-61eea44726f7/resourceGroups/demo-app-environment_SpringApps_0dedeb44-a86f-4530-b61f-03765a500d8f'.

I checked the deny assignments of the subscription - is empty.

1

There are 1 best solutions below

0
On BEST ANSWER

Azure Spring Apps Standard consumption and dedicated plan are built on Azure Container Apps. But it is not designed to allow customers directly access the Azure Container Apps log. We can use the following Azure CLI command to check the application log.

az spring app logs --name
               --resource-group
               --service
               [--deployment]
               [--follow]
               [--format-json]
               [--instance]
               [--limit]
               [--lines]
               [--since]

Reference docs:

https://learn.microsoft.com/en-us/cli/azure/spring/app?view=azure-cli-latest#az-spring-app-logs

https://learn.microsoft.com/en-us/azure/spring-apps/quickstart-analyze-logs-and-metrics-standard-consumption