Container App not starting without logs

Daniel Muresu 0 Reputation points
2023-02-26T21:56:50.4+00:00

Hi!

I am a bit new to the cloud and have gotten totally stuck here. I have a java spring app that I want to run in a container app. It has been working until I added managed Identity so that I could access a key vault.

I created a system assigned identity and I create the instance in the java code like this:

@Component
public class IdentityClient {    
    ManagedIdentityCredential managedIdentityCredential;    
    SecretClient client;    
    public IdentityClient() {        
        managedIdentityCredential = new ManagedIdentityCredentialBuilder()
           .build();        
        client = new SecretClientBuilder()
            .vaultUrl("https://myvault.vault.azure.net")
            .credential(managedIdentityCredential)                
            .buildClient();    
}}

When I try to deploy it there are only logs (using Log Streams) like:

`{"TimeStamp":"2023-02-26 21:37:43 \u002B0000 UTC","Type":"Warning","ContainerAppName":"myapp","RevisionName":"revision","ReplicaName":"replicaname","Msg":"Startup probe failed: dial tcp 10.250.0.125:8080: connect: connection refused","Reason":"PodUnhealthy","EventSource":"ContainerAppController","Count":15}`

If I run az containerapp logs show`there are no logs.

I have added permission to the key vault to the container app.
I cannot ping the container and in the portal it says Ready 0/1.

For the dependencies I am using azure-identity, spring-cloud-azure-starter-keyvault using

<artifactId>spring-cloud-azure-dependencies</artifactId>
<version>4.6.0</version>

Any help or tips where I could investigate further is appreciated, feeling more and more hopeless over here.

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
325 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Muresu 0 Reputation points
    2023-03-16T03:50:51.6666667+00:00

    Hello @Mike Urnun thankyou for replying, I am not blocked anymore but I did not solve the issue. I changed to use the container app secrets and then referencing it in a environment variable instead.

    0 comments No comments