"No endpoint listening" when starting an Azure web role under Compute Emulator - windows

I have two cloud solutions (.ccproj files). Each has a single distinct web role. One project runs under Compute Emulator without any problems but when I try to run another one (the first one not running) Visual Studio will package it and then display
Windows Azure Tools: There was no endpoint listening at net.pipe://localhost/dfagent/2/host that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Windows Azure Tools: The Windows Azure compute emulator is not running or responding. Stopping the debugging session.
I'm using SDK version 1.4
I Googled for a while but couldn't find anything that could help me. Force starting the Compute Emulator (csrun /devfabric:start) doesn't seem to help.
How do I resolve this problem?

Although an old question, I got this issue recently and the reason for it was that - while the service or website in azure would have been removed or stopped and you try to publish to it. If this happens, check the publish profile to see that you are pointing to the correct service/site including the storage acc etc and correct them. Hope it helps someone.

Related

Azure toolkit for windows phone publish issue

I um using Windows Azure toolkit for Windows Phone from codeplex. After creating a Windows Phone Cloud Application from a template, I started it on localhost and it run succesfully. Then i followed instructions on Codeplex on how to deploy on Azure, and published it also succesfully - I got an url to the website, but after typing the url in browser the website didn't load, and after a while there was a timeout. I tried both production and staging deployment. Can't resolve why this happens - did anyone faced familiar problem?
The publish completed successfully however this application is not running properly on Windows Azure.
As you are using Web Role type WP7 Phone application look for all the steps suggested in the link below:
Webrole is not starting and always busy
Also if you still could not find the root cause open a Windows Azure support ticket and you will get some help to find the root cause.
You may want to look at:
http://msdn.microsoft.com/en-us/library/windowsazure/hh134844.aspx
Remoting into the VM is a great way to see what is going on. Does it come up if you want for a while (maybe 30 minutes)?

ASP.NET MVC Web Application with SQL Azure (To Do List Tutorial) -- error when deploying to production

I'm working on the following tutorial in the Windows Azure website:
https://www.windowsazure.com/en-us/develop/net/tutorials/web-app-with-sql-azure/
(also: go to windowsazure.com, click on the "Develop" heading, click on ".Net" under languages, under "Create Your First Application" -- click on ASP.NET MVC Web Application with SQL Azure)
I can run the application in the Windows Azure emulation environment on my development machine. If I change the connection strings to the production database, the app works in the local development environment.
However, when I deploy the application to Azure, I get an error message: "Sorry, an error occurred while processing your request." This appears within a rendered page, so I think the request is getting to ASP.NET.
I believe the problem I'm having is with allowing the production app on Azure to connect to the SQL Azure database.
I believe it is a firewall issue, but haven't been able to determine what the IP range needs to be. (I previously thought the problem would be with me running VS 2010 in a 32 bit environment, with Windows Azure as a 64 bit environment, but we deployed the sample app from a 64 bit environment and had the same issue). For additional details, here's my previous posting on MSDN to a previous inquiry on the same issue: http://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/23afb5e3-e2ee-4444-aabb-7001ae6c6e6a/#af5284c0-ef4b-4193-b912-d4b7adfb5d21
Thanks for any assistance you can provide. I really want this sample app to work!
Update: Got the tutorial to work on a different computer and fresh 64 bit configuration, pointing to a different data center.
I got my hands on a new laptop with 64bit Windows 7 Home Premium , and installed Visual Web Developer 2010 Express, all of the most recent Azure and MVC SDKs. Seems like what I thought was a firewall issue, could have possibly been issues with database connectivity at the North Central data center. (I'm speculating, and will still need to test my original configuration against the South Central data center to see if this is actually the case. But, the North Central data center was not an available choice for hosting a SQL Azure database (3 month subscription), and here's a link to a discussion of this on another thread:
http://social.msdn.microsoft.com/Forums/da-DK/ssdsgetstarted/thread/7b181eef-ccd1-4090-80d1-0853059d166f
As mentioned above, the checkbox "Allow other Windows Azure services to access this server" needs to be checked, and both the service and the database need to be located in the same Windows Azure data center.
As #veblock suggest, you may try switching off the custom errors to see the actual error.
Meanwhile, the "IP range" that you seek for enabling firewall rule for your role is just a checkbox away:
You just need to check that "Allow other Windows Azure services to access this server" checkbox. The entry "Microsoft Services" with IP range of "0.0.0.0 - 0.0.0.0" will be automatically added. This is an internal entry and Microsoft keeps track of their own IP ranges, so that any Windows Azure data center will be able to access this SQL Azure Server.
But, yes, you can also check the real error message, by either Remote Desktopping to the instance, or by disabling the custom errors. There is a small chance that the ASP.NET MVC is also not fully installed in the Azure Instance. The easiest way to eliminate this problem would be by right clicking on the web application project and select "Add deployable dependencies", then chose ASP.NET MVC.
Thank you for your help. I have also hit this issues and spent several hours to debug what was going on since everything worked as expected in the Emulator, but won't work in production. After I have moved my hosted service and the database server to be in the same region, the problem went away.
In the original sample, it was also noted that it was important to ensure both are in the same region, but it mentioned due to performance reasons only, but for me it won't work at all.
"
IMPORTANT: Pick the same region that you choose earlier when deploying your application. This will give you the best performance.
"

How do I know why my Azure instance doesn't start?

I deployed my service package into Windows Azure. Management Portal has been showing "waiting for the role instance to start" for 30 minutes already so I assume something is wrong.
I know that there's Azure Diagnostics, but is there some easier way to find what's going on in my instance - like some console displaying some detailed output or something?
In these cases, it is probably the most expedient to simply RDP into the box and see what is going on. Event logs, hitting the site, etc., from inside the machine usually gives you a pretty good idea. If you have Intellitrace (Visual Studio Ultimate), you can also enable that and suck down the logs to see what is happening. That works very well also.
#dunnry The problem is that you can't open a RDP session to the server if your Azure Role is not running, so you don't know anything what is going on.
Most of the times there is something wrong in your Azure Configuration files. Try removing parts and redeploy afterwards. Pay triple attention to your ConnectionStrings. Make sure that the ServiceDefinition ConfigurationSettings are all defined in the ServiceConfiguration ConfigurationSettings File.
What we basically do is to deploy on a nightly build basis. We can check our ChangeSets of the day before after an instance is not reaching the running state.
If the Azure Diagnostics doesn't tell you anything then I don't think so - no. Somewhat annoyingly, one thing that frequently causes problems is Azure Diagnostics initialization - e.g. if the diagnostics connection string is wrong.
If the role instances start but the app has problems then the remote desktop might help.
If all else fails, try Azure support - it's still free right now.

Getting Feedback on Windows Azure Web Role that fails to deploy?

I am trying to start up a web role on Windows Azure, but it initializes, goes to busy/stop and continues the endless loop of busy then stop. I have followed the recommendations of this question : Windows Azure Deployment but still no joy. Of course the application runs nicely in the development fabric when I debug
I have done these things so far:
Turned off the diagnostics to ensure azure storage is not used
Made sure that copylocal=true is set for each no microsoft assembly.
Added the Microsoft.WindowsAzure.* references that the sample web role adds
Did a test run of the basic MVC role and that works.
Did a dependency analysis to make sure I am explicity referencing all assemblies using this tool Dependency Visualizer and that they are in the package for deployment. no joy.
Is there a startup log that azure keeps that I can access or similar facility so that I can learn what is failing?
Do you have access to Intellitrace? If you turn that on (VS Ultimate SKU), you can easily download the logs and see why the role is failing to start. Windows Azure Diagnostics is almost certainly not the issue anymore. Back before SDK 1.3, it used to run in the same process as your RoleEntryPoint, which meant you a.) could crash your role if it crashed and b.) if your role crashed, it killed the monitor which made it useless for collecting information. However, the Diagnostics Monitor is now deployed as background task that runs outside of your RoleEntryPoint and it can no longer crash your role. If you turn on Crash Dump collections and Tracing and you should be able to pick those up. In theory your Crash Dump should have the stack trace.

Azure: just HOW do I debug this?

I'm really loosing it here. Not being able to attach a debugger to a process is kind of a big deal for me. As such, I'm having a very hard time doing something to pinpoint the source of problems with an Azure-hosted application.
What's worse is that the app works fine in the Development Fabric, even when using online Storage Tables, but can go quite haywire when uploaded and running online.
I know IntelliTrace is one way to do it, but unfortunately, I've got a x86 machine, and the application uses RIA Services. As such, publishing it from my machine results in an error caused by RIA services. I can't build the application by specifying x64 the very same bug strikes again. (So far the only way that I know of to deploy a RIA Services Azure application is to set it to Any CPU and build / publish it from an x64 machine).
So IntelliTrace is not available. Online Azure doesn't have something to resemble the nice console log window of the Development Fabric, and as such, I'm at a loss. Thus far I've been just trying to get things to work and not crash by commenting out sections of code, but given the time it takes to upload and start an instance, this is hardly optimal.
Any suggestions would be appreciated at this point.
The Azure SDK has a logging / diagnostics mechanism built in:
http://msdn.microsoft.com/en-us/library/gg433120.aspx.
One route would be to deploy a version with some Azure specific instrumentation built in.
You could try to RDP into an instance of the role and see if there's anything in any of the logs (event or files) that helps you identify where the failure is.
Baring that, I think Amasuriel has it right in that you REALLY need to architect instrumentation into your solutions. Its something that's on my "must" list when building a Windows Azure application.
If you have access to another workstation with an x64 version of Visual Studio, you can configure Azure diagnostics to collect and copy the crash dumps to Blob Storage:
// Must be called after diagnostic monitor starts.
CrashDumps.EnableCollection(false);
You can then download them (using a tool like Azure Storage Explorer) and debug them locally.
If you absolutely need to see what's going on on the console Rob Blackwell has embedded a neat little trick in his Azure Run Me solution.
It pushes the console output of azure instance(s) out over the service bus. You can therefore consume that data locally and in effect monitor the console of the instances running on Azure right on your desktop.
AzureRunMe is available here and it's open source so you can take a look at how they've fed the console output to the SB.
https://github.com/RobBlackwell/AzureRunMe

Resources