I have a WCF service solution which contains the WCF service and a Azure Cloud Service project.
When running the cloud service project in the Azure Compute Emulator (version 2.5 on my PC), all I see in the output for each role is
[fabric] Role state Busy
[fabric] Role state Aborted
I've tweaked the logging level in Compute Emulator to log Warning, or Error and even tried Critical, but no more detailed messages are displayed. I have been Googling to see if there are any event log entries, or log files on disk, that I can view to find out why the cloud service is not working, but to no avail.
What can I do to find out more about what is causing the Cloud Service role to abort and and retry?
Diagnostics logs are not collected in the Azure compute emulator – For projects that target the Azure SDK version 2.5, the Azure compute emulator no longer supports the collection of diagnostics logs, including performance counters, infrastructure logs, IIS logs, and event logs. In addition, logs are no longer stored in Azure storage or development storage. You can continue to view application logs in the Visual Studio Output window or the compute emulator. This only affects projects that target Azure SDK version 2.5; projects that continue to target Azure SDK 2.4 are not affected.
Source: http://msdn.microsoft.com/en-us/library/azure/dn873976.aspx
In my case, it turned out to be a startup task defined in ServiceDefinition.csdef that was the problem. After I removed the <Task> my service ran fine in Compute Emulator.
Related
I have created an azure web service app used for testing purposes and run into a .Net / http issue (500.30). Ive looked into a lot of troubleshooting but nothing has worked or pointed me in the right direction.
It seems to get more info on the issue, I can use the stdout logs in the Azure app service through Kudu. This has been configured this and the files it creates are blank? Has anyone encountered this before?
What have I did, I set it up in the web.config file setting the stdlog to true but this creates the files with no info. I then removed the inprocess=hosting section as I read this fixed it for others but no joy.
Any pointers in the right direction would be appreciated
HTTP Error 500.30, The log file is created but empty - This kind of scenario is trapped by the SDK when publishing a self-contained app.
There is a term called RID (Runtime Identifier) used to identify target platforms where a .NET Core application runs.
If the RID doesn't match the platform target then the SDK produces the above kind of errors.
For example, win10-x64 RID with <PlatformTarget>x86</PlatformTarget> in the project file.
Troubleshooting steps:
<PlatformTarget>x86</PlatformTarget> enables the IIS app pool for 32-bit apps in an x86 framework-dependent deployment and set Enable 32-bit Apps to True from the app pool's Advanced Settings of IIS Manager.
500.30 is In-Process Startup Failure as it's cause can be usually determined from entries in the Application Event Log and the ASP .NET Core Module stdout log.
The app is misconfigured due to targeting a version of the ASP .NET Core shared framework that isn't present. Check which versions of the ASP .NET Core Shared framework are installed on the target machine.
If you're using Azure Key Vault, check the policies in the targeted Key Vault to ensure that the correct permissions are granted.
Also, please visit this Thread related to logging not working fix.
And Application Insights should be enabled to get the log files in the Storage account.
You can stream the logs from the portal or using CLI:
az webapp log tail --name appname --resource-group myResourceGroup
Use this reference to get the logs using the simple queries.
You need to enable application logging first.
Click on the App Service logs menu
In Application logging, select File System
In Quota (MB), specify the disk quota for the application logs. In Retention Period (Days), set the number of days the logs should be retained.
Save
You can stream the logs from the portal or by using the CLI
az webapp log tail --name appname --resource-group myResourceGroup
I can't find what is causing CPU increase to 100% daily at some periodical time. Is there any way like if you have VM, task manager in Azure dashboard?
I have telemetries:
You can remote debug your Azure app with Visual Studio :
When you enable remote debugging on an Azure virtual machine, Azure installs the remote debugging extension on the virtual machine. Then, you can attach to processes on the virtual machine and debug as you normally would.
https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-debug-cloud-services-virtual-machines/#debugging-azure-virtual-machines
Also to try to understand what happened in the past: if you have activated Azure Diagnostics, you get the output logs in a Azure Storage that you configured for diagnostics. You can have a look at there to try to find what caused the problem.
You can integrate app logs to azure logs to get more accurate or specific info.
https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-dotnet-diagnostics/
You can also use 3rd party logs like log4net, ... (see appropriate extension or nuget packages).
I was debugging a cloud service and was using azure storage and compute emulator. Suddenly I noticed I began receiving SEHException when accessing a cloud table, and the emulator icon is not there anymore in the notification area.
I remember I checked don't show this window again sort of option, so that the annoying window of loading the emulator is not displayed.
I restarted my computer and ran VS2013 as admin with no luck.
I followed this article: http://msdn.microsoft.com/en-us/library/azure/hh403989.aspx
You just need to go to start -> search: Windows Azure Storage Emulator
This will run the storage emulator only, but you can run the compute emulator through the notification area icon which displays when you start the storage emulator.
Edit:
The above mentioned solution did not actually solve my problem, I found later that I have to set the cloud service as the startup project, not the web role.
Edit 2:
It can be also because of running a BitTorrent client. windows azure development storage blob service not starting
I have an Azure Worker Role (WR) which is supposed to pick up it's config from the .cscfg files using:
var setting = CloudConfigurationManager.GetSetting("My.Setting.Name");
Running in the emulator this is fine, I get the:
Getting "My.Setting.Name" from ServiceRuntime: PASS.
message. However, when I publish to my remote environment, I get:
Getting "My.Setting.Name" from ServiceRuntime: FAIL.
Getting "My.Setting.Name" from ConfigurationManager: FAIL.
messages. In the 'CloudServices/Configure' section of the Azure Management Portal I can see the setting listed in the configuration, and it's set correctly.
I'm using Azure SDK 2.0
Are you deploying correct Azure SDK .DLL's with your project? Did you by chance upgrade recently to a newer Azure SDK? I would check your .DLL references to make sure that they all match across the solution
I am writing our Azure app to use Azure service configuration settings so we can change it in real time. I can test it by deploying and then changing them in the Azure web portal.
How do I allow changing service configuration in real time on my local azure compute emulator?
In order to update the service configuration you need to modify the *.cscfg file and execute csrun.exe (in C:\Program Files\Microsoft SDKs\Windows Azure\Emulator):
csrun.exe /update:<deployment-id>;<service-configuration-file>
Note that this seems to work only when running the application without debugger.
I recently blogged about this here: Controlling your instances in the Windows Azure Compute Emulator (look under Handling the RoleEnvironment.Changing event in the emulator).