Deployment to Azure compute emulator fails silently. What could have happened? - azure

I'm trying run my first Azure web role. Storage Emulator starts, Compute Emulator starts, but the deployment takes a lot of time. VS asks if I want to continue try to deploy. In the Compute Emulator UI states "Role State Unknown". No further information.
What could cause the deployment to the emulator to hang and where can I find more information on what happened?

Related

How do i/is it possible to run my Azure VM without running the RDP manually aka somewhere in the cloud?

Rougly what im trying to do is:
Start VM automaticly(already doing this with Azure Automation)
Have the VM run an application(it already auto runs on startup) This is where the problem is, since the app runs fine when the VM is started manually with RDP, but is not run when the VM is started automaticly with Azure automation.
Stop VM (already doing this with Azure Automation)
All this must happend automaticly in the cloud so i dont have to do it manually trough the RDP sever application
i have an Azure VM that auto runs a console application on startup, this app do some work and then upload some files to my Azure storage. This console application needs to be run once a day, so im thinking that ill use the Azure Automation Account to auto start/stop it once every day, which i did and its working fine, atleast i can see the VM change status on the Azure portal at the specified times, however the files are not being pushed from my console application to my Azure storage when.
First question question is, do the Automation Account auto start of VM just make the VM avalible for use, and doesnt infact turn the OS on?
This would explain why the console application which should run auto on startup arent being run and therefor not pushing files.
Second question. If this is the case, how do i run my Azure VM without running the RDP manually aka somewhere in the cloud?
Normally it wouldnt be that big an issue for me to run the RDP myself once a day, but if i could automate it that would be ideal. Also when im traveling its not allways possible for me to get good enough internet access, and the VMs console application file pushing is vital for a website and a Xamarin Android app im managing, so its not something i can allow to "skip" sometimes whenever inconvenient.
There is so much wrong in this question that I don't even know where to start.
First of all, if you need to run something once a day, why not use Azure Automation, Azure Functions, etc?
Second, you cannot turn on VM but not turn on OS. how do you even suppose this might happen.
My thoughts - you configured your app to run on user login, not on startup, or the scheduled task doesn't run when the user is not logged in.

Octopus deployed continuous WebJob not running simultaneously in two locations

I have a continuous webjob that needs to run two webapps in two locations on a TimerTrigger. When I deploy the webjob from Visual Studio to both locations everything works well and both webjobs run at the same time.
Now I'm ready to start deploying this with Octopus-Deploy. I have successfully created a plan with two steps that does that and puts the assemblies in the correct location under the web apps (app_data\jobs\continuous\{jobname}) in Azure. The problem is that only one webjob executes its job at a time even though both webjobs have a status of Running. If I stop and start the one that's executing, the other webjob starts executing its job while the one I turned off/on has a status of running, but doesn't ever execute its job. Also, if I redeploy just one of them from visual studio, they both execute their jobs at both locations again.
I'm not doing anything with Singletons and have actually tried turning it off by using a 'settings.job' file with {is_singleton: false}. Is there something Octopus is doing with the package that makes Azure think the webjob is a singleton?
My guess is that the issue is caused by using the same storage account and host id for both of the apps that you deployed. When you do that, the WebJobs SDK views it as a single Web App that has been scaled out to two instances, and makes sure the timer is only run on one of them.
The simplest solution is to use a different storage account for each app.

Azure WebJob running old code

We have a bug in our WebJob running in our live environment, I have identified the bug and fixed it, this I can verify in our Dev-environment. I published my WebJob as a "Azure WebJob" to our live environment but the bug i still present. To add to the confusion the bug now just occurs sometimes. So for some reason the old code is running somewhere sometimes.
Can someone please help me understand this?
I had a similar problem. We deploy using a stage environment in Azure and it turned out that the "old" WebJobs (running code with an old version of the entity framework model) where still running on the queue. These jobs where then fetching messages and consuming them. To add to the problem the exception was consumed in a try catch and the status of the WebJob was success.
Check if you have a stage environment (add -stage to the Webapp name) and if so go in to the Azure management portal and stop them.
Note, it is not enough to stop the Webapp, you must stop the WebJobs directly. This is done (in the new portal) under Settings->WebJobs and then right-clicking on the webjobs name selecting stop.
I spent ages looking into this problem. Turns out I had the web job project running in a console on my PC at work! No matter what I did on Azure the presence of this exe running and using the same storage for the web jobs meant that the old code running on my work PC picked up the jobs before Azure did. Easy fix: just make sure no exes are running outside of Azure!
In our case the web app was published to physical path /site/www instead of the default /site/wwwroot, because of this the Azure web portal interface adds the WebJobs to folder /site/jobs, but the webdeploy via VS or Azure are still trying to publish the webjobs inside the /site/www.
More details at Publishing WebJobs with Azure Pipelines

How to view errors being generated by Azure Compute Emulator

I have a WCF service solution which contains the WCF service and a Azure Cloud Service project.
When running the cloud service project in the Azure Compute Emulator (version 2.5 on my PC), all I see in the output for each role is
[fabric] Role state Busy
[fabric] Role state Aborted
I've tweaked the logging level in Compute Emulator to log Warning, or Error and even tried Critical, but no more detailed messages are displayed. I have been Googling to see if there are any event log entries, or log files on disk, that I can view to find out why the cloud service is not working, but to no avail.
What can I do to find out more about what is causing the Cloud Service role to abort and and retry?
Diagnostics logs are not collected in the Azure compute emulator – For projects that target the Azure SDK version 2.5, the Azure compute emulator no longer supports the collection of diagnostics logs, including performance counters, infrastructure logs, IIS logs, and event logs. In addition, logs are no longer stored in Azure storage or development storage. You can continue to view application logs in the Visual Studio Output window or the compute emulator. This only affects projects that target Azure SDK version 2.5; projects that continue to target Azure SDK 2.4 are not affected.
Source: http://msdn.microsoft.com/en-us/library/azure/dn873976.aspx
In my case, it turned out to be a startup task defined in ServiceDefinition.csdef that was the problem. After I removed the <Task> my service ran fine in Compute Emulator.

Azure Emulator not running

I was debugging a cloud service and was using azure storage and compute emulator. Suddenly I noticed I began receiving SEHException when accessing a cloud table, and the emulator icon is not there anymore in the notification area.
I remember I checked don't show this window again sort of option, so that the annoying window of loading the emulator is not displayed.
I restarted my computer and ran VS2013 as admin with no luck.
I followed this article: http://msdn.microsoft.com/en-us/library/azure/hh403989.aspx
You just need to go to start -> search: Windows Azure Storage Emulator
This will run the storage emulator only, but you can run the compute emulator through the notification area icon which displays when you start the storage emulator.
Edit:
The above mentioned solution did not actually solve my problem, I found later that I have to set the cloud service as the startup project, not the web role.
Edit 2:
It can be also because of running a BitTorrent client. windows azure development storage blob service not starting

Resources