I want to run a console application and see the output. It's a continuous one; I don't understand the other one.
I've got VisualStudio to deploy a console app to a WebJob, but I absolutely cannot get any output from it.
EDIT: why does the app service get a URL to 'browse' it? It's not a website.
EDIT: under HostingPlan->AppService->Diagnostic settings if I try to create a new diagnostic settings then there is a checkbox called AppServiceConsoleLogs which sounds promising, but it seems to require an Archive to storage account and none is listed even though I've set on up.
If you really published this as a "WebJob," then go to the "WebJobs" section of your AppService -- it's in the Settings section -- and it should display your WebJob in the list. Then right-click on your job and select "Logs." This will open the logs for your job. Click on the "Toggle Output" button and this should show you anything your app wrote to the console.
Edit:
Here is the WebJobs section of an App Service on the Azure Portal. If you Right-click on a specific job, it will show a (non-browser) context menu that gives you access to Logs.
If you have a subscription to Azure DevOps, you will be able to run your console app. Upload your console app and create a pipeline to run a script. Add the command and necessary arguments if any and run the pipeline.
The process may take around 10~15 minutes if you do not have an account with azure DevOps, and less if you have it already. Please follow the steps mentioned in the blog I wrote here and you should be able to run your console app without trouble.
How to run Console Applications on Azure Pipelines
PS: This may not be the best solution but as of now it offers free run of console apps on Azure Pipelines. Hope this helps!
why does the app service get a URL to 'browse' it?
Suppose it's your azure web url cause webjob is host in a web, if not please provide more information.
it seems to require an Archive to storage account and none is listed
even though I've set on up.
Mostly it's because your storage account region is different from your web region, so create a new account with the same region then it will show in the list.
And suppose you want to check the webjob output, the simplest way is the Bryan Lewis way, just check the Logs in the kudu page. Else if you want to save it to storage and view it, go to App Service logs under your web Monitoring, set the Application Logging (Blob) and set the storage account(remember the region should be same or create a new one). Then you will be able to view the log csv file like below.
Related
i try my first steps with Azure. I have upload a WebApp (Blazor WASM Serverhosted) on a Linux System. Now i want to see the logs. My application brokes on Azure on startup. Everything I have tried has not worked.
The logstream shows nothing.
The Monitoring/logs are disabled
I activate in Monitoring/App Service Logs the File System and go to FTP Folder and i don't find a log-folder or something like this
I hope for help to fix my App or Configuration on Azure
Still the issue can be available in github . You can achieve this by using below steps.
Steps provided here. And I am deployed in Linux app service
Now you can be able to view the logs in application insights
You can add/modify the custom logs as well by using the custom telemetry client.
Refer here for detailed information
I'm trying to find a way to get dotnet-counters output from Azure App Services to either the Azure Portal (good enough for some trouble shooting) or some other console tool.
Does anyone know of a way to get the data, even when the app service is running across multiple app service plans? I was picturing maybe there is an app service extension (but no luck so far).
Eventually I'll want to automate this so I can get the data onto our monitoring system, but first baby steps.... just need something I can manually eyeball to help debug issues.
Anyone have any thoughts on how to do this?
Thanks
Ken
From offical doc, we can install dotnet-counters by cli command and download .exe directly.
As azure web app running in sandbox environment, so we can't add dotnet-counters to env, which means we can install it, but we can't use it.
So my solution is,
we can download .exe file directly.
After downloading finished, we can copy and paste it to wwwroot.
Then we can use it on scm site and azure portal.
On kudu site.
On azure portal.
I have created an Azure WebSite in Visual Studio. I then added a Azure WebJobs project through Visual Studio. I then provided the connection string to my storage account to both the app.config file of my WebJob project and the web.config file of my WebSite project.
I still cannot get the job to complete successfully. It keeps failing, as I can see that on the Dashboard. When I go to the Dashboard, not only do I see the job failing every time I run it, I also get a red notification that my connection string is incorrect for the AzureWebJobsDashboard. I've provided this connection string in both projects, and I've copied from the Azure Portal, so there is no way I'm getting the connection string wrong.
How can I fix this? I'd like to start creating real WebJobs, but I can't even get the example one to work (the one given to you as a ManualTrigger when you add a WebJob project in Visual Studio).
update
I had forgot to mention that this connection string is also in my application settings in the azure portal already and I still see failures.
Try adding the connection strings on the Application Settings page of your WebApp in azure.
UPDATE
Use a General-purpose storage account to get rid of
System.InvalidOperationException exception.
I have setup Sitecore 8.2 Update 3 as Azure App Service using Marketplace.
The setup completed and i got urls for cm and cd like
xxxxxx-cd.azurewebsites.net and
xxxxxx-cm.azurewebsites.net
But when I access these URLs I get this screen.
Also xxxxxx-cm.azurewebsites.net/sitecore gives page not found.
Am I missing anything?
According to your screen, the Azure App Service has been created, but there is nothing inside it. Seem like something went wrong and deployment script didn't deploy Sitecore's file to App Service. You can verify it using App Service Editor tool.
The reason why deployment went wrong could be this known issue: https://kb.sitecore.net/articles/755670.
We have a website running as a web-app service on Azure. Our CM environment stalls and needs restarted periodically.
While we investigate the cause of this, I'd like to set the application pool to refresh overnight. I can't find anything in the portal to indicate how or where this is done. Can anyone help?
The Kudu service allows you to setup auto healing based on rules for memory, requests, or status code. To get to the dashboard navigate to https://[Your Azure App Name].scm.azurewebsites.net and then click on Tools -> Support and then turn on Autoheal, click Update and then optionally add any rules that make sense.
For more details, check out the blog post Auto Heal your Azure Web App.
You can assign a webjob to your service where you can upload a zipped .bat file and schedule it to run using a cron job
I THINK something like this should do it
azure webapp restart --resource-group xxx --name xxx
But, don't really want to mess about too much with our live environment.
The Kudu solution looks like the one we are going to go with. But, not until we take a good look at the perfomance/analytics. We definitely have a memory leak on the go somewhere