Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Cloud Deploy Keeps Recycling

I get the following error:

Recycling (Waiting for role to start... Sites are being deployed. [2012-12-17T05:30:10Z])

Running One or more role instance is unhealthy. 1 Instance: 1 Unhealthy

i was actually trying to convert my web application to a cloud applicaton.

here is what i did:

i added a cloud project to my solutions, i added a webrole which linked to my web app i created an sql azure database and copied my whole structure and also the data to the db i inserted the connection string in my webconfig and tried to run it on emulation, this worked fine then tried to deploy it by creating a cloud service, running the builder to create the packages and uploading the packages in "staging" mode. this is where i got the errors.

i tried to create an empty cloud app and add a default webrole and load this to the cloud, this worked fine. so i figured, maybe i have something wrong in my settings of my webrole. I checked the difference between both and i noticed that in both solutions diagnostics was enabled but the storage account was empty in my own solution, so i inserted "UseDevelopmentStorage=true" here. this didn't change anything tho. I also saw a difference in the "packages.config"

default role had:

<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.7.0.0" targetFramework="net40" />
  <package id="System.Web.Providers" version="1.1" targetFramework="net40" />
  <package id="System.Web.Providers.Core" version="1.0" targetFramework="net40" />
  <package id="WindowsAzure.Storage" version="1.7.0.0" targetFramework="net40" />

mine had:

    <package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.7.0.0" targetFramework="net35" />
  <package id="WindowsAzure.Storage" version="1.7.0.0" targetFramework="net35" />

i tried changing in this and uploading, didn't do anything

I am not using a worker role, i have only 1 running instance (same as default)

my application uses some authentication in global.asax where it tries to read from User.Identity.Name and compare with a user in the database (this user is inserted in the sql azure db). At first I thought this would maybe be the cause of the problem, but even if i comment out this code the application will not run on the cloud.

VM size is small, trust level = Full trust

I also saw some differences in the settings where i had remote access parameters. I tried removing all these just to exclude issues

i read something about settings references to "copy local is true", but im not sure if this will do any difference.

Any ideas because I don't really know what to do anymore

EDIT:

I modified all the references to "copy local is true" and i disabled to diagnostics just to be sure there's nothing wrong with it.

but now i get the error:

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Funny thing is, in my webconfig this is already set... And I can only find 1 webconfig. I'm not quite sure what I'm doing wrong

like image 372
WtFudgE Avatar asked Jan 15 '23 18:01

WtFudgE


1 Answers

"Keep recycling" almost always means that there are some exception occurred when your application was started. You might not be able to see any errors or exceptions in through the Diagnostics Montor since your exception might be occurred before you configured and started the diagnostics.

I recommend you enable the IntelliTrace option when deployment. It's very easy to do if you are using Visual Studio. Then you can retrieve the IntelliTrace result through Visual Studio and figure out what exception occurred. I strongly considered there are some references missed on azure that you need to set Copy Local = true. But you need IntelliTrace to find them.

like image 156
Shaun Xu Avatar answered Jan 22 '23 18:01

Shaun Xu