Azure Cloud Service CPU max after upgrade from SDK 2.8 to 2.9 - azure

Just recently converted our 2.8 Azure Project to 2.9 and suddenly this started happening.
We're using a classic cloud service to host a web application. Don't understand why it suddenly starts to go bananas on the CPU load.
The process that seem to be using the CPU is called CollectGuestLogs.exe. Can I disable it somehow?

We did open a ticket and found a solution to this issue:
"Actually the CollectGuestlogs.exe is used by azure to generate the diagnostic log file and to zipped it.
This file exists in your PaaS VM instance in the below path
D:\Packages\GuestAgent
First we have provided the temporary fix to confirm the issue like renaming the CollectGuestlogs.exe and check whether the process is running after restart the VM instance once.
As you confirmed that our temporary work around was successfully resolved your issue. We found that this issue is related to a known issue with the Azure SDK 2.9 that it is going to fixed in the hotfix release of Azure SDK version 2.9.5.1." -Microsoft support

Related

Asp.Net Core 2.0 on Azure results in a 502.5

I have a small web app developed with Asp.Net Core 1.1 deployed on Azure and it works well. I just migrated the project to use Asp.Net Core 2.0 and tried to deploy it on Azure. The deployment went fine but when I open the site, I get a 502.5 error. When I check my Azure log stream, I get the following error:
This error occurs when a CGI application does not return a valid set
of HTTP headers, or when a proxy or gateway was unable to send the
request to a parent gateway. You may need to get a network trace or
contact the proxy server administrator, if it is not a CGI problem.
Useless to say that it works well on my development machine with the same code. Note that I'm also using Entity Framework Core 2.0 although I deactivated the database creation on Azure (to check if it was not the cause).
For information, the way I migrated from 1.1 to 2.0 is by changing the target framework settings to "netcoreapp2.0" and by using the NuGet package "Microsoft.AspNetCore.All". Just to be sure, I also deleted my publish profile and recreate one.
Is it possible that Asp.Net Core 2.0 is not yet available on Azure ? I'm fairly new to Asp.Net Core, so I don't know when new releases are made available on Azure.
EDIT
When I try to run my app with dot net CLI via the debug console as proposed by natemcmaster, I got the following issue:
Unhandled Exception: System.IO.FileLoadException: Could not load file
or assembly 'Microsoft.AspNetCore.Hosting.Abstractions,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I downloaded the DLL on my desktop and check the version with Dot Net Peak and indeed, the DLL is 1.1.2, although I created the project with Visual Studio and directly publish it, so is it an issue with Visual Studio ? Or Nuget ?
the issue was actually coming from the fact that, at first, my web app was using .net core 1.1, which deploys all the DLL in the "wwwroot" folder of the web application. However, with asp.net core 2.0, it does not do that anymore as the DLL are picked up from a global store. However, as Visual Studio does not clean the destination folder before a publish, I ended up with a situation where the 1.1 DLL were in my wwwroot, so the web site was picking up these ones instead of the 2.0 ones in the store folder.
This is explained in more details here: https://github.com/Azure/app-service-announcements-discussions/issues/2#issuecomment-313816550
Others have explained the reason why this is happening. I'd like to provide another – arguably easier – solution to the problem.
Just change the settings so that you remove files that are already on Azure – see below:
Check for log files either in the portal or by remotely accessing D:\home\LogFiles.
Sometimes, the logs won't indicate what is going wrong. Another good way to investigate further is to try launching your ASP.NET Core app from the Debug Console. If you are missing a shared framework version or there is another startup error, this will be more visible from the Debug Console.
Go to
https://(your web site name here).scm.azurewebsites.net/DebugConsole/
Your site will be in D:\home\site\wwwroot. You can launch it by executing:
cd D:\home\site\wwwroot
dotnet MyWebApp.dll
If you app still fails to launch, make sure that D:\home\site\wwwroot\web.config is available and configured to use ASP.NET Core Module. https://learn.microsoft.com/en-us/aspnet/core/hosting/aspnet-core-module
In my case, It was caused by having a space in the Project Name.
I can readily add a space, publish => 502.5.
Remove space, publish => good to go.
Hard to believe but I am duplicating it readily with above.
Also using "Remove Additional Files at Destination" per #Sam's Answer
See https://github.com/Azure/app-service-announcements/issues/14
"The rollout is expected to complete by Friday June 30th."
In my case the issue occurred because AppService at that time supported 2.0.0-preview2-006497 but I had 2.0.0-preview3-006890 installed which was used on build.
So I added global.json to use preview 2 SDK and it worked then
I don't know if this could help someone one day but in my case, I was using :
-Microsoft.AspNetCore.All 2.0.5
Downdrage to Microsoft.AspNetCore.All 2.0.3 resolve my problem
This happens when your version of ASP.NET Core cannot be matched on the server.
The simplest solution is to change your settings to deploy the app as self-contained, so it doesn't matter if Azure can match the framework version. Also, delete the files already on Azure, so you don't have issues when upgrading, as explained by #Sam.

cloud project iis express 8 Static compression is being disabled

Here's my setup:
An MVC web project that is hosted in azure
VS2012 and VS2013
Windows Azure SDK 2.2
IIS Express 8 - 8.0.1557
The MVC project is using castle windsor, and there are performance counters being created during application start up.
When I run the project locally (via emulator) I am find that during the performance counters creation an exception is being thrown however the performance counters are created and copied across to azure table storage.
Exception:
The directory specified for caching compressed content C:\Users\danielc\AppData\Local\dftmp\Resources\c2fd1c9b-d6c5-49af-942d-715c8f1ccc1c\temp\temp\RoleTemp\iisexpress\IIS Temporary Compressed Files\767ba5ae-0038-4c32-a70c-3d2f671e37ed is invalid. Static compression is being disabled.
When I try and find this location, it does not exist, which implies to be that it maybe a permission issue, but I dont know how to change the permissions for the emulator.
To add to my headache, I am in a team of 6, all of which are not experiencing this issue. Furthermore when it is deployed to azure it works fine as well.
My question therefore is, has anyone experienced this issue before and know a solution?
Steps taken so far:
Uninstall and install azure sdk 2.2
Install azure sdk 2.3
Install azure sdk 2.4
Uninstall and install IIS Express 8
Uninstall IIS Express 8 and install IIS Express 7.5 (which turned out did work as not supported but just clutching at straws really)
Thanks
So I believe I have got to the bottom of it. It would appear the instance count in the ServiceConfiguration.cscfg is 4, but when set to 1 it runs fine.
It is very odd that my colleagues who work with this other configuration are not experiencing the issue.

The Windows Azure SDK for .NET must be installed

I'm trying to publish my app to Azure which I have done several times before. For some reason I'm now getting the following error:
The Windows Azure SDK for .Net must be installed to enable publishing
to Windows Azure. LightSwitch will load a web page to begin
installation.
It loads a web page, downloads V11AzurePack_1_8_1.exe which in turn runs the Web Platform Installer 4.6 which in turn installs Windows Azure SDK Tools 1.8.1 for Visual Studio 2012. All of this succeeds. But going back and attempting to Publish results in the same error.
I noticed that there is a Windows Azure SDK for .Net (VS 2012) - 2.2 in the WPI. So I installed that manually, tried to publish, same result.
The SDK is clearly installed:
So why can't I publish to Azure? The only thing that looks like it might be a problem is that I have LightSwtich Azure Publishing 1.1 add-on for Visual Studio 2012 installed and I know there is a newer version of that available. But I can't find a direct download nor can I find a way to uninstall that package or force WPI to suggest an update.
Uninstalling everything Azure related (except the LightSwitch add-on as that seems to be unremovable and un-upgradeable), rebooting, and installing only the latest SDK produces the same problem.
After following a moderator's advice to repair Visual Studio on the forum, I was no longer able to open my project at all. I waited for a response but got none. So I decided to reinstall Visual Studio all together.
I followed this and this in order to remove as much of Visual Studio as possible and then reinstalled. I then installed Update 4 and was again able to open my project.
However, upon trying to publish, the same error was encountered.
I decided to upgrade my project to VS2013. That all seemed to go well. Wnet o Publish to Azure and it claimed that it succeeded. However going to Azure and launching the app's site brought up the previous version.
I deleted my Azure cloud service and started a new project in VS2013. I copied over one of my screens to have something to run. I then tried to publish to Azure. It again told me it succeeded but the site did not exist in the Azure Management portal. However, it did realize that I had created a new self-signed certificate so there was some type of communication there. Just not an actual Publish.
Then I did something really stupid. I uninstalled the Azure SDK and tried to reinstall it thinking that was the problem. Now I'm back to where I was before. An endless loop asking me to install the Azure SDK.
I wiped out all of my Azure services. Did a system restore to a month ago. Reinstalled the Azure SDK. This then allowed me to "Publish".
Not really.
Visual Studio claimed that the Publish Succeeded. The services were created and the certificate uploaded but nothing was deployed. I then did a manual deploy and the Production instance began to be deployed.
Everything seems to be running but I cannot access my app's site. I receive a 403 Forbidden error message. With or without HTTPS required. But this seems to be a different issue so I'm going to open another question on it.
Why these extreme measures were required is beyond me. This continual breaking of LightSwitch to Azure publishing is getting to be absurd though.

There was an error attaching the debugger to the IIS worker process

I am new to Azure. I am trying to start my application in VS2012 (debugging). I am getting the error below:
There was an error attaching the debugger to the IIS worker process for URL 'http://learning.cloudapp.net:82' for role instance 'deployment18(13)......'. Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a receive.
My application is working fine when I hosted it in IIS. It worked fine when I set the website project as the start up project. But when I set the azure project as start up project and start debugging I am getting the error. I have tried almost everything I could find on the internet. Can anyone please help?
Thanks,
Mahesh
One time I got this by loading an older Azure solution on a newer machine, another time after I upgraded to Azure SDK 2.0.
I was using IIS Express instead of regular IIS.
Each time the only thing that fixed was:
Install Azure SDK 2 via Web Platform Installer
Install Azure Powershell tools via Web Platform Installer
Create a new Azure Project -- do not use your old azure cloud project. Do not try to get it to work-- start fresh.
Foreach web/worker role that you use to have in your previous azure projects, create new web/worker roles for those as well. Do not try to get the old ones to work-- start fresh. Copy the content/files from your old ones into the new projects.
So basically, install the latest tools and then create new assemblies/packages/projects to replace the old ones.

Error occurred While publishing application to Azure

I just started playing around with Azure platform. I tried to upload a simple application to Azure cloud to see how it works. For that I m using Eclipse Indigo and the eclipse plug-in for Azure.
However I get the following error while publishing to the cloud:
" Filed uploading deployment package (.cspkg)"
I searched aroudn and I see that other people have the same problem.
The size of the application is 382MB !!!!! I guess that s why I Get this error.
However why is the size that large?I only have a hello world app with one .jsp file.
When running to the emulator I point to the server installation that I want to use. Is afterwards the whole installation being uploaded to the cloud while publishing? Even in this case , I use Tomcat which is about 50 MB? Where are the rest 230Mb coming from ?
How can i reduce the size of my app?
I d also like to know whether the Eclipse plug-in for Azure is supported by Eclipse Indigo. I read on the Azure site that Eclipse Helios is required.

Resources