Unable to deploy project using dedicated window azure caching (preview) in production environment - caching

I made a sample application using windows azure dedicated caching (preview).
The sample application runs perfectly in emulated environment but does not get properly deployed in production environment: The project and the cache instances always shows that "waiting for role to startup". I am not able to understand whether it is a configuration issue or something else.

Which deployment mode are you using? Colocated or Dedicated?
If it is colocated can you tell me what value of Cache Size (%) have you set? And which vm type are you deploying?
Also, please check whether you have provided storage account connection string in "Caching Tab" under "storage account credentials to use for maintaining the cache cluster's runtime state" section.

In the Cache Worker Role (the role where you have caching service enabled) if you go to "Caching Tab" you will see "storage account credentials to use for maintaining the cache cluster's runtime state" section.
For Emulated environment this value is "UseDevelopmentStorage=true", for deploying to cloud you need to replace this setting with a valid cloud storage account. Please follow detailed instructions for proper configuration at http://msdn.microsoft.com/en-us/library/windowsazure/jj131263.aspx
Further if you are still facing the issues, enabling remote desktop and checking "Windows->Application" and/or "Microsoft->Windows-Application Server-System Services/Admin" channel would also help.

Related

Block deployment to azure function app from visual studio

We have enabled a CI/CD pipeline using azure pipeline. Whenever someone check in to the master, the build should happen and deployment should follow. I wanted to understand how can I disallow someone to deploy to azure function web app from local visual studio
You could use RBAC Rules which may require a lot of config work.
Once you have CI/CD pipeline enabled, setting up RBAC(Role Based Access Control) helps to prevent users from getting the publishing profile, setting deployment credentials etc.,
There will definitely be some config work involved in doing this because you would have to only allow permission to one user so that user could set up the service principal connection between azure and DevOps but also prevent users from creating a deployment user.

Container Access in Windows Azure Storage Resets to Private

We are new to Windows Azure though we have learnt good amount of things and are quite fast learners.
We have used Windows Azure storage for blob objects while developing sitefinity application but this storage access resets to private automatically after certain time period (30 mins or so) and then the pages where these images are accessed are stopped displaying.
Please check the file attached to see the screenshot.
Then we have to manually login into Windows Azure storage and set this to public blob or public container and then it start displaying.
Please help me to solve this. I think I am missing some settings for this.
wad-control-container is a special container which holds Windows Azure Diagnostics configuration data. It is created and managed by diagnostics agent running in your VM and by default its ACL is Private. I believe what is happening is that diagnostics agent is periodically trying to create this container and at that time it is changing its ACL to Private. I would recommend using some other blob container for your application to store blobs.

Exception while using Windows Azure Caching : No such host is known

I am trying to get started with Azure and am trying to use the Caching feature. I created a cloud service project and added a Cache worker role and a web role. I installed "Windows Azure Caching" nuget into projects for both the roles and added the name of cache worker role as identifier in DataCacheClients element in web.config of the web role.
I added the following code into the web role:
DataCacheFactory cf = new DataCacheFactory();
DataCache c = cf.GetDefaultCache();
When I try to run this locally on the emulator, I get the following exception:
ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure.
Please retry later. (One or more specified cache servers are unavailable,
which could be caused by busy network or servers. For on-premises cache clusters,
also verify the following conditions. Ensure that security permission has been granted
for this client account, and check that the AppFabric Caching Service is allowed through
the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater
than or equal to the serialized object size sent from the client.).
Additional Information : The client was trying to communicate with the server: net.tcp://MvcWebRole1:24233.
Inner Exception : No such host is known
Can you please tell me what I am missing here?
Azure SDK used : v2.0
Timing of your question couldn't be better. We also faced exactly the same issue and were scrathing our head as to what the problem could be. We had one project where everything worked perfectly fine and in one we were getting the same error. Based on our research, we have identified the problem with the Nuget package for caching. It seems a new version (2.1.0.0) was released yesterday and we found that if we install that package, we get this error. Can you check the package version in your case? The documentation states that this new version can only be used with the latest SDK (2.1) released today.
One solution would be to uninstall version 2.1.0.0 and install version 2.0.0.0. To install version 2.0.0.0, open Package Manager Console (View --> Other Windows --> Package Manager Console) and type following command there:
Install-Package Microsoft.WindowsAzure.Caching -Version 2.0.0.0
This fixed our problem. Hopefully it should fix yours too.
Here is a link to the Windows Azure Cloud Integration Engineering blog on how to deal with this same issue. They recommend upgrading to Azure SDK v 2.1 or rolling back as the accepted answer states.
http://blogs.msdn.com/b/cie/archive/2013/08/08/windows-azure-caching-2-1-0-0-no-such-host-is-known.aspx
This exception could also occur under compute emulator if for the role in the client library configuration there is no cache configured. In my case this happened on purpose, since the cache emulator has some problems that can slow down the test and debugging on the service.
In previous version of Windows Azure Caching, in this scenario the construction of DataCacheFactory would fail with an exception (handled by my code); with Windows Azure Caching 2.1 (and Azure SDK 2.1) in this same scenario the code would consider the role name as a server address and thus on DataCache construction would try to communicate with the non existing cache -- this leads to a 3 minute wait and the exception reported in the question.
I have changed my code to detect the new situation for this scenario -- you can find more detail in this SO question.

Windows Azure - Persistence of OS Settings when using WebRoles

I've been watching some videos from the build conference re: Inside Windows Azure etc.
My take away from one of them was that unless I loaded in a preconfigured VHD into a virtual machine role, I would lose any system settings that I might have made should the instance be brought down or recycled.
So for instance, I have a single account with 2 Web Roles running multiple (small) websites. To make that happen I had to adjust the settings in the Hosts file. I know my websites will be carried over in the event of failure because they are defined in the ServiceConfiguration.csfg but will my hosts file settings also carry over to a fresh instance in the event of a failure?
i.e. how deep/comprehensive is my "template" with a web role?
The hosts file will be reconstructed on any full redeployment or reimage.
In general, you should avoid relying on changes to any file that is created by the operating system. If your application is migrated to another server it will be running on a new virtual machine with its own new copy of Windows, and so the changes will suddenly appear to have vanished.
The same will happen if you perform a deployment to the Azure "staging" environment and then perform a "swap VIP": the "staging" environment will not have the changes made to the operating system file.
Microsoft intentionally don't publish inner details of what Azure images look like as they will most likely change in future, but currently
drive C: holds the boot partition, logs, temporary data and is small
drive D: holds a Windows image
drive E: or F: holds your application
On a full deployment, or a re-image, you receive a new virtual machine so all three drives are re-created. On an upgrade, the virtual machine continues to run but the load balancer migrates traffic away while the new version of the application is deployed to drive F:. Drive E: is then removed.
So, answering your question directly, the "template" is for drive E: -- anything else is subject to change without your knowledge, and can't be relied on.
Azure provides Startup Scripts so that you can make configuration changes on instance startup. Often these are used to install additional OS components or make IIS-configuration changes (like disabling idle timeouts).
See http://blogs.msdn.com/b/lucascan/archive/2011/09/30/using-a-windows-azure-startup-script-to-prevent-your-site-from-being-shutdown.aspx for an example.
The existing answers are technically correct and answer the question, but hosting multiple web sites in a single web role doesn't require editing the hosts file at all. Just define multiple web sites (with different host headers) in your ServiceDefinition.csdef. See http://msdn.microsoft.com/en-us/library/gg433110.aspx

WindowsAzure: Remote Desktop, what can I do?

I'm connected to one of my WebRole instances. But what can I do now? I startet the Server Manager and navigated to Roles -> WebServer -> RD00123..., but what I see seems not to be the active instance. When I click on "Browse WebSite" I don't see the deployed site even I can't see or edit for instance the configured rewrite rules (defined in the web.config).
It's also funny that the inetpub is on systemdrive D (d:\inetpub\wwwroot) but the deployed (editable) files are on E (e:\approot). I'm wondering how this comes togehter.
Ok the things I want to know are:
How can I launch the unique instance version of the web role (I can't find an IP or port)?
How can I assume temporary debug changes in the web.config?
How can I restore the deployed version of the instance?
1) I don't believe you can. This is managed by the Azure Fabric controller. The most you can do is force an individual instance (the one you've RDP'd into) to reboot/restart.
2) Yes. But they won't be reverted unless the VM is recycled, so be prepared to back them out yourself. This is a good use of RDP
3) Not directly. Again, this is controlled by the Azure Fabric controller. But you could put the original bits you had back into the VM manually.
I'm not sure I understand the questions regarding server manager, but I can answer the question about where things live. The "base" Windows Azure VM image is the root drive where you see INetPub at. The application is deployed to a seperate VHD (thus its presence on another drive). If you request local storage, that will come from yet another virtual drive. This is just how the Azure Fabric manages the application deployments. Properly constructed, the roles of course won't care where things live.

Resources