I have a running Spring Boot App running in Azure. Unfortunately there is something wrong with one of my API calls, returning me a 500 error. See below :
In the past I can usually diagnose this within 30 seconds. I usually have a link to a log file on the server, and I can find any exception that is thrown. Things were easy in the old days :)
However in the Azure world things seem infinitely more confusing.
According to documentation I go to "Console" and select "App instance" where my running instance appears in a drop down box.
I connect with a shell. I expect to see all my logs from my spring app but I just get a blank screen.
On further digging, I realise that i have to execute a command to get to my logs. There is an "az" command I am supposed to use
az spring app logs --resource-group <Resource_group_name> --service <Service_instance_name> --name <App_name> --follow
In my situation I need to run :
az spring app logs --resource-group shapeShopResourceGroup --service shapeshop2 --name shape-shop-app --follow
However here is the problem. The "az console" will not allow me to use more than 50 characters.
Also if I just run
az spring app logs
it says that the "command is not found".
On top of all that, the az console seems to not paste text in correctly. Funny characters like "\E[200~ " appear.
I desperately need to find out what is causing my 500 error in my application. Any help appreciated. Also I am using the "consumption plan" for react apps, which only fires up an instance when the app is actively being used.
UPDATE: I have also tried running the log command in the cloud shell but I get a "no instances found for deployment" error.