Where are the error logs stored for the Windows Azure storage emulator? - azure

I am trying to start the Azure storage emulator, to no avail.
Init runs fine, but start does not, and I want to have a look at the logs to find out why.
Where are these log files stored?
Thanks

The Azure storage emulator log is stored in C:\Users\xxx\AppData\Local\Microsoft\CLR_v4.0\UsageLogs\WAStorageEmulator.exe.log

In my case, I have "some" logs here: C:\Users\<YOUR_WINDOWS_USER_NAME>\AppData\Local\Microsoft\CLR_v4.0\UsageLogs\AzureStorageEmulator.exe.log
You might as well look at this document here
. It shows how to enable the logs. Basically it says:
Head to the Storage Emulator data directory, which is located at
%LOCALAPPDATA%\DevelopmentStorage.
(Actually in my case it is in %LOCALAPPDATA%\AzureStorageEmulator)
Edit the the developmentstorage configuration file located in the directory and change the LoggingEnabled to true
Restart Storage Emulator
The logs will appear in the logs directory.

This turned out to be a result of running a bittorrent client before I tried to start the emulator.
Turn the bittorrent client off, turn the emulator on, and then then turn the bittorent client back on, solves the problem.

Related

Azure storage emulator unable to initialize

I've upgraded Azure Storage Emulator from 2.3 to 2.4. WAStorageEmulator.exe has been renamed to AzureStorageEmulator.exe but that's not the issue.
When I run
AzureStorageEmulator init -forcecreate
I simply get an error that Google returns with zero results:
Error: User-specified instance not found. Please correct this and re-run initial
ization.
Edit
I had to do a start and stop and then I was able to init. Because I had previous version of emulator installed I already have WAStorageEmulatorDb34 on my local SQL server instance. After I run init command I can see that no new database is being created (like WAStorageEmulatorDb42).
So I thought that the newest version may be using older DB. I then ran a query in MSSMS to check for existing blob containers and I can still see both containers I created on the older emulator containing blobs I added.
When I then accessed Development Azure Storage in Visual Studio it showed no containers whatsoever. So the new version apparently doesn't use old DB. But which one? And where is it?
Ok so I thought I'd run init one more time but with additional parameters to put DB on my SQL server instance:
AzureStorageEmulator init -server localhost -sqlinstance MSSQLSERVER -forcecreate
And then I get the aforementioned error. Again...
I'm running CMD as admin with elevated permissions.
Solution that eventually worked
Additional info
Azure Storage Emulator normally creates tables in the LocalDB storage. Depending on the emulator version these may be in various DB instances. You can check each storage emulator version's configuration in
%USERPROFILE%\AppData\Local\[AzureStorageEmulatorFolder]\*.config
Different versions have different folder names from DevelopmentStorage, WAStorageEmulator to latest (4.2) AzureStorageEmulator.
In this subfolder you'll find at least one config file that will correspond to your installed Azure storage emulator's version. If you open it, you'll see how it's configured and where it saved its tables. This is also true if you create initialization on any existing full SQL server instance.
The problem when I was trying to initialize my Azure Storage Emulator (ASE) is that I was also providing SQL server's instance which is the default one (MSSQLSERVER). I shouldn't be providing this information in the first place but only provide information about server
So the correct command line call is
AzureStorageEmulator init -server localhost -forcecreate
This created my database on my local SQL server. From here on, it's up to you how you'll migrate from an existing ASE database (if you already had one before) to the new one.
The issue I ran into is more or less an user error.
Azure Storage Emulator 4.6
Error : User-specified instance not found. Please correct this and
re-run initialization.
and
Resolution : I didn't have a windows authenticated login to my local
sql instance.

How to solve DSInit not found error in Microsoft Azure?

i've read some articles "http://www.c-sharpcorner.com/UploadFile/40e97e/windows-azu-creating-and-deploying-worker-role/"
if i try to run my code' error occurs:
ERROR: Windows Azure Tools: Failed to initialize the Development Storage service. Unable to start Development Storage
i made some investigation to solve this boring problem:
http://www.nimbo.com/blog/error-failed-to-initialize-windows-azure-storage-emulator/
http://kristofmattei.be/2010/01/28/windows-azure-sdk-connecting-to-non-sqlexpress-instance/
if i run "dsinit /sqlinstance:." if i use :"WAStorageEmulator init –forcecreate" result 's below:
Error: "DsInit can not found"
If you're using Azure SDK 2.3, please note that DSInit.exe has been removed from the SDK. It has been replaced with WAStorageEmulator.exe which can be found in C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator folder.
To initialize storage emulator, the command you will use is:
WAStorageEmulator init -forcecreate
This is similar to DSInit /forceCreate.
There are some other options available as well:
WAStorageEmulator clear table
Removes just the tables from storage emulator.
WAStorageEmulator clear blob
Removes just the blob containers from storage emulator
WAStorageEmulator clear queue
Removes just the queues from storage emulator.
WAStorageEmulator clear all
Removes all tables, queues and blob containers without deleting the database.
I wrote a blog post about it as well where I talked in somewhat more details about this. You can read the blog post here: http://gauravmantri.com/2014/04/04/managing-storage-emulator-in-azure-sdk-version-2-3
I came across this issue when the emulator wouldn't initialise with SQL SERVER installed (it looks for SQLEXPRESS by default). For Microsoft Azure Storage Emulator v5.8 the accepted answer no longer works. I found the solution on the Microsoft site. In summary:
From the console window that opens on starting the emulator you can use the following commands:
If you want to initialise a specific SQL Server Instance
AzureStorageEmulator.exe init /server <SQLServerInstance>
You can also use the following command, which directs the emulator to use the default SQL Server instance
AzureStorageEmulator.exe init /server .
Or, you can use the following command, which reinitializes the database to the default LocalDB instance
AzureStorageEmulator.exe init /forceCreate

Node.js console.log doesn't work using August 2012 Azure SDK

I am following the tutorials on the Windows Azure Node.js site:
http://www.windowsazure.com/en-us/develop/nodejs/tutorials/
however my server.js.logs file isn't being created?
In my server.js file I am issuing console.log statements but none are written to the log file. Why is that? Whats changed in the August SDK to prevent my logs from being written?
Or what do i need to enable in order for console.log statements to be written ?
Thanks
See https://github.com/tjanczuk/iisnode/issues/168, linked to from https://github.com/tjanczuk/iisnode/wiki/iisnode-releases (the v0.1.20 notes).
The latest Windows Azure Node.js SDK must have picked up a newer version of iisnode, and iisnode changed where it puts the log files.
Yes, iisnode now puts log files in the ~/iisnode directory, and writes an index to the log files you can browse. It also contains a new node.js script, interceptor.js which allows you to write log files to any location
You must understand that console.log in node.js is used mainly for client side logging. I just tested that when you are using console.log in node.js application running on Windows Azure stdout log file could not be created so you will not get any log.
If you want to add logging to your code which is running on a web server you should be using server side logging code and I found connect library is most powerful and useful for such purpose:
https://github.com/senchalabs/Connect
As you suggested your code is running in Compute Emulator means you are creating Windows Azure Cloud Service, you should follow your the below article step by step and you will get it working:
https://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
Be informed that still console.log will not show anything when your node.js code is running in Compute Emulator.

What does ERROR_AZURE_DRIVE_DEV_PATH_NOT_SET mean?

I am trying to attach a cloud drive as described here http://msdn.microsoft.com/en-us/library/gg466226.aspx#bk_Storage but I get the error ERROR_AZURE_DRIVE_DEV_PATH_NOT_SET ?
What does this mean? I've tripled checked my config at it seems ok.
I am trying to connect the cloud drive in a Windows Service on a VM Role.
I discovered that the FixMSI.js script from http://msdn.microsoft.com/en-us/library/gg466226.aspx#bk_Install was failing. For some reason $(BuiltOutputPath) was empty. I did it relative to the $(ProjectDir) instead.
It then failed with a different error (and much earlier). CloudDriveException 0x80070103.
Searching for this gave me this article which basically told me to manually edit the driver inf file for the wa miniport. http://msdn.microsoft.com/en-us/library/windowsazure/hh708321.aspx.
Now it attaches ok. The strange thing now is that the device has a warning when the vm starts (but only when hosted in azure), I have to manually go into the vm on azure and update the driver.
try to change BuiltOutputPath to BuildOutputPath. According to Richard, this is an error in the document. Refer to the Community Content section on the document for more information.

How do I debug a Worker Role using Remote Desktop with Windows Azure?

I now have my Windows Azure environment set up so that I can access my Worker Role with Remote Desktop. However, I'm not sure how to proceed at the moment. After much digging I found a web site that was offline but in Google's cache there was mention of attaching to the Worker Role running in the Azure Cloud from the Visual Studio debugger. But I only have Visual Developer (not studio) 2010 and I have searched all over and as far as I can see there is no such option to attach to a remote server. I am able to publish my project to the Azure Cloud without error and I have a "healthy" instance of my Worker Role showing as active and running.
I did connect with RDP through the Azure Management portal. The login worked fine and up came the remote desktop window. I searched through much of what I could find and was unable to find my Worker Role. I must have the wrong impression of RDP, because I had hoped to see the Worker Role's main display form when I logged in, just like I do when I debug it locally in the Cloud Emulator. But instead all I saw was a blank desktop with some base level server inspection and management routines. I even checked the Event Viewer for Application related messages and saw none.
So now I'm stuck wondering if my Worker Role is actually running or not, despite the seemingly positive status messages from the Management Portal, and I still want to attach to my Worker Role for debugging through Visual Developer, if it's possible, but I am unable to figure out how.
Anyone with experience in this area that can give me some solid tips on what to do next, please respond.
UPDATE: I believe my worker role may be running because I opened a command window and did a Netstat and saw it listening on the correct port. However, that may just be my Worker Role shell class that starts the custom EXE I have it launch as a spawned proces. I still haven't confirmed if my custom EXE is running yet.
UPDATE-2: Just ran TaskList from a command window and the custom EXE is listed.
UPDATE-3: Everything is working as I just ran a remote test of the service so that's not a problem. Still want to know how to attach to the Worker Role from Visual Developer 2010 for remote debugging, and if it's possible to see the custom EXE's display form like I do when doing local debugging in the Cloud Emulator.
-- roschler
There is a set of articles here which goes in length on how to set up for remote debugging in Azure:
http://blogs.u2u.be/peter/post/2011/06/21/Remote-debugging-an-Azure-Worker-role-using-Azure-Connect-Remote-desktop-and-the-remote-debugger.aspx
http://blogs.u2u.be/peter/post/2011/06/24/Remote-debugging-an-Azure-worker-role-using-Azure-Connect-remote-desktop-and-remote-debugger-part-2.aspx
http://blogs.u2u.be/peter/post/2011/06/26/Remote-debugging-a-Windows-Azure-Worker-Role-using-Azure-Connect-Remote-desktop-and-the-remote-debugger-part-3.aspx
The key takeaway is that you don't need to actually install Visual Studio on Azure, you only need to copy the Remote Debugger bits and then use Azure Connect to add your developer machine to the Virtual Network.
You can setup Remote Debugging with Visual Studio 2012
http://code.msdn.microsoft.com/Remote-Debugging-Windows-dedaaec9
When you say:
But instead all I saw was a blank desktop with some base level server inspection and management routines.
this is exactly what you get with an Azure VM. It's a basic OS install, plus the bare minimum of Azure stuff it needs to run and the code you've uploaded. There's no fancy monitoring or health checks available on the machine by default, you're expected to have provided those yourself to have them available without having to RDP into the machine to check on it.
RDP is very good for tracking down certain problems, like checking that a startup task will run, checking which directories items are installed in and just generally being nosey. If you need extra tools to track down a problem, you can just install them while you're connected to the server. For example I have RDPed into a server and installed the Microsoft Debugging Tools, to track down a memory issue.
I suppose you could remote into your VM, install Visual Studio there, and debug the process...
I also suppose it might be possible to enable remote debugging (not sure what's involved there, but such a thing exists, and it works over TCP) and debug from a local instance of Visual Studio.
To my knowledge, neither is commonly done.
Based on other answers, you would be better off writing a log file to a local storage. You can read the file from RDP if you reallyhace to. Keep in mind, debugging on Azure isn't really simple, and rightly so.
What I was thinking though was, maybe you could run the process using the user's credentials. I can't verify at the moment, but you have a better shot of seeing the ui when you rdp.

Resources