Role instances Issue while running webapi locally - azure

I have a webAPI deployed on window azure, till last week I was able to run the WebAPI and debug but all of a sudden when I run the web application I get the below message.
Role instances are taking longer than expected to start. Do you want
to continue waiting?
And I tried to enable disable caching(default caching is disable) and also cleared the local storage but still the same issue persist, its happening in not only my machine but also on other dev machine as well. Could it be because of automatic software updates related to emulator or other SW or any other issue?

Happened withh me today. I ran into an issue of the Azure emulator not working. The roles were going in a continuous loop of Running, Busy and Suspended.
Initially I thought it might be due to some code I had changed . However, it turned out that a recent Windows update had caused this issue.
After spending a frustrating amount of time un-installing the recent updates one by one, I found the miscreant.
For Fix please un-install the Security Update KB3126593 (https://support.microsoft.com/en-us/kb/3126593).
While searching for the particular update, make sure you type “KB3126593” in the search bar. Typing 3126593 will not work.

Related

Azure App Services Web App not registering update

I have a Azure App Service app that I'm trying to get deployed.
Today I ran into an issue where .NET informed me (via the yellow screen of death when I browse to the URL of my app) that I had a missing DLL (for the purposes of this question I don't think it really matters).
I used FileZilla to publish my changes in an attempt to do a manual deployment first and then work my way to automate it.
After so many attempts to fix it I later realized that the error message never changed. I did something more severe and renamed my bin folder into something completely different and the exact same error message would appear.
I've stopped the service, restarted it, and as mentioned, renamed folders, etc. and still the exact same error message persisted.
I also decided to open up the Azure Portal Console for my App Service app to browse a bit and to my amazement, nothing seemed to have reflected at all. The FTP shows one thing and the Console shows another.
Would anyone have any idea as to why this is happening?
I eventually got it to work and I will share what I tried.
I deleted the web app and created it again (I found this to be important the first time around). This was quite time consuming and did help but it wasn't long before the same problem happened again.
Then I finally found a solution that seems to give me consistent results:
I kept on editing the Web.config which seems to force a recompile and clear some sort of cache. So each time the web app stopped updating, I would make a slight change in the Web.config, upload it via FTP and the app finally updates.
If anyone has any more details on this, it would be greatly appreciated.

Assembly changes detected. Restarting host

My Azure Functions were running fine and all of a sudden I am getting several "Assembly changes detected. Restarting host..." messages that is preventing my functions from completing.
I am not deploying new code so not sure what is triggering the Assembly Change event to fire. I was running on the latest version of the runtime and have since reverted to version 1.0.10947 thinking that maybe the underlying runtime was updated, but I'm still getting that line showing up in the logs.
Update
Now that #Alexey has helped me track down what is causing the Assembly changes to be detected. I would like to ask if anyone can tell me WHY an assembly change is being detected even-tough I have not changed/redeployed my application.
After looking in your logs we opened an issue https://github.com/Azure/azure-webjobs-sdk-script/issues/1533#issuecomment-303595960.
Your functions had multiple restores but now issue is gone. Restores could be initiated by changing project.json.
If you are stuck with the multiple
Assembly changes detected. Restarting host
I fixed my issue by deleted the log file in the Kudu services:
https://[FunctionAppName].scm.azurewebsites.net/
and follow on the top menu:
Debug Console >> powerShell
And the file log is :
LogFiles >> Application >> Functions >> function >> [Function name]
You can remove the log file.
my 2c.
I was struggling with this issue for ages and not sure what was causing it. I believe I may have the answer.
Our solution has been toying with consumption plans, but pulled back to full App Service Plans because the initiation times were too long for our rather unique usage patterns.
But 2 of the appsetting params were still in place: WEBSITE_CONTENTSHARE And WEBSITE_CONTENTAZUREFILECONNECTIONSTRING.
per:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#websitecontentazurefileconnectionstring
these are ONLY for consumption plans.
I removed them and... touch wood, the issue seems to be resolved.

Azure Mobile Service changes are not being committed?

Peculiar problem arised just today. My Azure Mobile Service has been working fine until now, but now that I make updates to the script, it doesn't seem to update in to the production version of the service.
I have tried pulling and pushing through git as well and I get the right scripts but the functionality when I use the service doesn't match my changes (I added some really distinctive log data to see if the changes were going through and they were not). It has been almost 2 hours now and it still doesn't work. I also tried adding tables, removing tables, and editing scripts. Nothing seems to trigger a deploy.
While this sounds like a service issue, does anyone know how I could debug this further?

Problem with local Azure deployment

I'm trying to run a WebRole on my local machine via Compute Emulator. My Compute Emulator and Storage Emulator is running fine. When I hit F5 in VS2010, I can see the action in Compute Emulator. But after a while, I get an exception in VS2010;
Microsoft.WindowsAzure.Hosts.Worker.RuntimeEnvironmentException was unhandled
Message=Unable to load the runtime environment: could not get hosting environment settings
Source=WaWorkerHost
StackTrace:
at Microsoft.WindowsAzure.Hosts.Worker.Parameters..ctor()
at Microsoft.WindowsAzure.Hosts.Worker.Loader.Main(String[] args)
InnerException:
Then Roles in Compute Emulator begins to shutdown. VS2010 launches the browser with IP and port but no luck, it's not running of course.
I don't think this is a coding error because I live the same problem even in an empty out-of-the-box Azure project and a single Web Role on it.
I've searched the net but no info about this error. Actually if you search exactly for "RuntimeEnvironmentException" Google returns zero result. Using the description words also does not make any sense.
Anyone have an idea?
Thanks,
Ali
Sorry for not responding earlier but I was still working on the issue. Then a Microsoft guy from Turkey office figured it out. There is a problem with localization on developer machines. In development environment computers, in "Region and Languages", set "Format" to "English (United States)" and "Current Location" to "United States". After setting these, Azure emulator is working flawlessly. They said this is a known issue and they're preparing a report about this. I hope this will be resolved in next releases.
Hope this helps to anyone who live same problem. And thanks everyone who tried to help...
Ali
I've had a similar issue where the compute emulator just fails to load my web role and nothing ever responds. It seems to happen to me when I hibernate my laptop a few times while the compute emulator is running. Even shutting the emulator down and restarting it doesn't seem to help.
Best solution I've found is to reboot. Definitely not elegant (and a bit of a pain in the butt), but it's worked for me every time.
Not sure if this helps or not. Good luck.

deploying to sharepoint using the object model doesn't work reliably

Deploying to sharepoint using the object model or STSADM commands sometimes results in one or more packages being in the "error" state in the web control, a redeploy instantly fixes this, usually, even stranger, if i create two apps one which adds and one which deploys then i get no problems, but putting a delay between a single program does not have a similar effect.
If i run the deploy twice for programs which did not deploy successfully it works fine, as long as I do not try to do it programatically in which case it makes no difference.
It is different files and sometimes is none.
I do use stsadm -execadmsvcjobs between add and deploy and even between two of the deploy bunches.
(i'm deploying around 10 wsp files programatically)
Does anyone have any ideas on why this happens? or how to solve it, as when i get to implementations it causes problems.
The problem lies in the fact that sharepoint will perform app pool recycles and / or full iisresets, as well restarts of the SharePoint Timer Service (altough not completely sure about that though). When you try to actually deploy the just installed package sharepoint is still busy getting up and running again, the timer job created to install / deploy is basically waiting for the central admin app pool to be fully running again.
The same thing happens (somewhat reproducably) while retracting a solution. Hit F5 a lot of times on the solution management page while the retract process is underway and if you refreshed fast enough it will hang and display "error" in red.
My solution was to create a WebRequest to at least the central admin (or just do a SPSite = new SPSite("centraladminurl")) in your deployment app or in powershell. Do this after every deploy action as well.
This SHOULD fix the timing issue (basically a kind of "race condition").

Resources