Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem deploying my application to Azure

Tags:

azure

I just created a Windows Azure account. When I try to deploy from VS2010 I get the following messages that just keep repeating on and on:

2:17:43 PM - Warning: All role instances have stopped

2:18:23 PM - Instance 0 of role MvcApplication1 is busy

2:18:59 PM - Instance 0 of role MvcApplication1 is stopped

2:18:59 PM - Warning: Instance 0 of role MvcApplication1 appears to be cycling and unable to start.

2:32:44 PM - Warning: All role instances have stopped

2:33:17 PM - Warning: All role instances have stopped

2:33:49 PM - Instance 0 of role MvcApplication1 is busy

Does anyone know how I can debug or find out what's wrong? I don't know what to do at this point.

like image 563
Sanga Maleno Avatar asked Feb 20 '11 06:02

Sanga Maleno


People also ask

How do I deploy my application in Azure?

To deploy to any Azure App service (Web app for Windows, Linux, container, Function app or web jobs), use the Azure App Service Deploy task. This task is automatically added to the release pipeline when you select one of the prebuilt deployment templates for Azure App Service deployment.

What are deployment errors?

Any error that occurs during deployment of an API Proxy is called a Deployment error. Deployment of API proxies might fail due to various reasons such as network connectivity issues between Edge servers, issues with the Cassandra datastore, ZooKeeper exceptions, and errors in the API proxy bundle.


2 Answers

I ran into this problem myself. Mine had to do with not having the assemblies packaged in my service when publishing. Use the following steps to resolve this:

1-Get all of the Deployable Dependencies into your project

Use the "Add Deployable Dependencies" feature from VS2010 SP1 and alluded to here in Scott Hanselman's blog post about BIN Deploying (see "Interesting Note" at the bottom of the post).

Essentially, right click on your project and you'll see it within the "Add" section. A dialog box will pop up with 3 choices (in my case 2 were accessible). After selecting them, a new folder will be added to your project called "_bin_deployableAssemblies" which will contain any assemblies your project needs to run in the cloud which the References you have are dependent upon.

If you don't have VS2010 SP1, then go ahead and follow the advice in Scott's blog post (which essentially does what the feature does, just you're doing it).

2-Check your References for Copy Local = true

Once you've done this, if you still have problems, start checking your reference assemblies for any References you have which are not expected in the cloud OS you are targeting, and make sure to set Copy Local = true.

3-Check your References for the Windows Azure assemblies

Because I created my Web Project first, I had to manually add the Windows Azure assemblies to my Web Project that was the target of the Web Role. (Microsoft.WindowsAzure.Diagnostics, Microsoft.WindowsAzure.ServiceRuntime, Microsoft.WindowsAzure.StorageClient)

4-If you're using MVC 3, use the workaround

Take David Makogon's advice and follow the steps on Steve Marx' blog post.

like image 192
eudaimos Avatar answered Oct 20 '22 21:10

eudaimos


Debugging Azure apps which get stuck in this loop is hard.

The cause is normally that your role simply won't start because of a build problem.

In this particular case, I'd guess that maybe you haven't included one or more of the MVC assemblies inside your package - check that the MVC references are marked with Copy Local - e.g. see http://msdn.microsoft.com/en-us/library/dd410407.aspx (and other links depending on which MVC release you are using!)

like image 24
Stuart Avatar answered Oct 20 '22 22:10

Stuart