I have deployed a spring app called shape-shop-app :
It says the application failed to start and I should check the logs.
This is what it looks like in Azure :
This is where I am confused.
Where are the logs?
If I go to the console for shape-shop-app then it is empty.
If I go to the "Azure Spring Apps" Logs tab then I am bombarded with thousands of queries I can choose from. I really just want to find out what error caused my spring app to go down but I am lost among all these specific log queries. The most generic queries yield no results.
How can I diagnose why my spring app failed to start in azure?
Application failed to start.
Generally, this error occurs when the application is not deployed properly (or) If any file/configuration is missing. Re-deploy your application to fix the issue.
If I go to the console for shape-shop-app then it is empty.
Select your App instance from the drop down in the Console and click on Connect.
To check the logs use the query:
az spring app logs --resource-group <Resource_group_name> --service <Service_instance_name> --name <App_name> --follow
Refer MSDOC for Monitoring Azure Spring Apps with logs, metrics, and tracing.
Try to deploy your application as shown below:
Go to the root folder of your spring-boot application and run the below commands:
mvn com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:config
mvn clean install
Deploy:
mvn azure-spring-apps:deploy
Portal:
Assign Endpoint:
It generates the URL as shown below:
Response: