Problem with Azure SDK 1.3 Tracing - azure

I'm having an apparent AppDomain issue with tracing from within web pages (as opposed to the WebRole). Basically, if I invoke one of the tracing methods (i.e. Trace.TraceWarning("Ooops!")) the trace message doesn't show up in the Windows Azure Compute Emulator. The message does, however, show up just fine in the Output window.
Any help in this regard would be greatly appreciated.....

I think that for now this is just a limitation of the Compute Emulator... it only shows trace messages from your RoleEntryPoint code.

Related

Application Insight - Unable to get teletry from different environments

We are experimenting Azure Application Insight within a SharePoint 2013 solution. We managed to configure it manually, and we are collecting data from the development farm.
However, the same configuration looks like not to be working in the test farm, as only a few requests are tracked.
We tried two ways of diagnosing the issue:
With a custom command-line tool that traces an exception, on the test front-end. No errors are shown, and enabling diagnostic tracing on System.Net shows no problem actually occurs in transmission. Eventually, the exception is logged on AppInsight, but not every time.
Implementing a custom WebApi controller that performs the same action, but within of our solution code. This never gets collected.
In the end, what looks very weird is only certain URL are tracked server-side (no problems with client JS), which interestingly are the slowest requests.
I've decompiled all Application Insight assemblies, and of course telemetry transmission in done asynchronusly, but within w3wp.exe there's no chance that the process is aborted and the transmission never occurs...
What else can I try?
You can install Fiddler or Other HTTP Debugging tool on the box to see the data that AI sends.
To View internal Application Insights traces you can Install PerfView and collect traces:
PerfView.exe /onlyProviders=*Microsoft-ApplicationInsights- collect
http://www.microsoft.com/en-us/download/details.aspx?id=28567
http://channel9.msdn.com/Series/PerfView-Tutorial

Remote Debugging Azure Mobile Service

Trying to debug azure mobile service running in the cloud. I have published debug configuration, in the options indicated to allow debugging non JustMyCode and use source server.
Attach to running process works and I could put break points and step through the code, though I could not get the values of any variables. Even 'this' would not show the values in the watch window.
Prior to that I was trying to debug a release published configuration and the watch used to display values of some of the variables. Others were indicated that due to optimizations values are not available.
Thanks for help,
Ruben
I think you did something wrong, because if you did the remote debug the break point should be hit and you can see all data.
Please see this article
Cconnecting a menu app to azure mobile service > How to do the remote debugging
If it not help, provide a movie with that you are doing :)
I recommend to have Azure SDK 2.5 and Visual Studio 2013 update 4

Exporting big liferay portal into LAR-file fails with no sensible error message

I'm using liferay portal community edition 6.1-
I'm trying to export a portal in order to move the content to another intance of liferay. however, when trying to export the portal content the export fails with message 'Your request failed to complete."
When looking at log files, there is no sign of anything going wrong.
Could someone please explain to me what can possibly be wrong, and from where should I get the information for what is failing on server?
Marko
I've been digging into similar issues with the LAR importing/exporting system myself. There isn't much logging in that code unfortunately. I ended up enabling remote debugging in the server's JVM and stepping through the problematic tasks using the Eclipse debugger.
One of the main issues I've had with Liferay is that it swallows detailed exceptions, doesn't log them, and waters them down into very generic error messages by the time they're displayed to you in the UI. Using the debugger really helps because you can often see the original exception without having to dig too deeply into the code.
How's your free disk space looking on the server? I believe Liferay saves the LAR to a temp file as it works on it (at least, it does as part of the publishing process). On our test site, with only ten pages and almost no content, that temp file is still 3.5M. If your site is really big you might just be running out of space.

Loading profiler failed during CoCreateinstance - error, but I'm not using a profiler

Recently I published to my Azure Staging server (Asp.Net MVC App) and my app wouldn't come up. I checked the Event logs on the machine, and this was the error:
.NET Runtime version 4.0.30319.18033 - Loading profiler failed during
CoCreateInstance. Profiler CLSID:
'{F1260058-1A1F-4738-8BE2-0BF9D3A64219}'. HRESULT: 0x8007007e. Process
ID (decimal): 1872. Message ID: [0x2504].
The thing is that I am not using a profiler, everything worked fine yesterday (day old publish) - any ideas what could be causing this, and how I could fix it? Thank you.
Not to say there is not a better fix (I tried all I could find elsewhere, nothing seemed to relate to my specific problem) but here is what I ended up doing. Simply delete your deployment, and re-publish. This must re-set whatever turning on your profiler sets.
Remember that if this is a non domain dns instance, your address will be changed. Hope this can save someone a few hours.
Blog Post Here

Azure: Worker role looping through "recycling"

I'm currently working on an Azure project that works 100% locally with emulator resources. I'm now trying to deploy a worker role, but I'm running into an issue that I'm not sure how to troubleshoot.
Upon deploying the worker role in my Azure portal, the two instances continually loop through "recycling".
I can try to RDP into the role, but I only have about a minute to look around before the connection closes, I'm assuming due to the recycling.
After some searching it doesn't seem like this is a super common problem. Is there something trivial I'm overlooking that could be causing this issue? How would you go about troubleshooting this? Thank you for your time :)
In case of missing Reference you can troubleshoot this issue by:
Unzip your CSPKG file and then again unzip .CSSX file (just rename CSSX to zip) and match that everything references and static content is all there.. This way you can match what is on VM. Also in 2 minute windows when you RDP, try to look for Application event log for exception and get it because that would be the key to find the root cause.
IF you could see the exception in event log and look for the exception, you sure can find where it was generated. You can also use Intellitrace which might require you to redeploy the app.
Also there are ways were copying WinDBG and locking to the specific process you can debug it. I am not sure how much you would want to try but just copy the WinDBG to VM and use it would be enough (not sure how much experience you have with WinDBG though and how much time you would want to spent.)
Also been pestered by this role recycle issue numerous times. Here is the sequence of steps to debug persistent role recycles:
Debugging Azure Role Recycles
Enable Remote Access to your role - RDP login
Check eventvwr.msc (Windows Logs -> Application, App & Service Logs->Windows Azure)
Review the Azure text file logs across both C:\logs and c:\resources
Review custom logs in the Volume E: or F: for any custom role startup logging
Run AzureTools and attach to startup processes (download WinDBG, use Utils->Attach Debugger, select process - WaWorkerHost/WaIISHost, etc), use G to continue and watch debugger output for assemblies failing to load.
Installing Azure Debugging Tools via Powershell
PS> md c:\tools; Import-Module bitstransfer; Start-BitsTransfer http://dsazure.blob.core.windows.net/azuretools/AzureTools.exe c:\tools\AzureTools.exe; c:\tools\AzureTools.exe
If all items above fail - try using other tools in the AzureTools treasure trove - such as fusion logging, etc, this approach above will work!
WinDBG Sample Output - Failing to Locate Assembly (WaIISHost)
The most likely cause is that you have a missing assembly. One tactic to catch this is to wrap any startup processing in a master try/catch that manual logs the error to Azure storage.
If you added any referrences, check to make sure they're set to copylocal=true and that any external assets that were included in your service package were also set to be included.
From Avkash above:
Yes. this mean some issue in your Worker Role code is causing your Worker Role Host Process to crash.. If you look your fault stack you must see the function or the link from your code which generate this fault. IF you need help open a free Azure Support incident to Windows Azure Support team and they will help you.
Just a suggestion: Also Check the installable(if any)and any other references you use are 64bit.Azure VMs have 64bit OS. Once i was stuck up with this kind of problem due to 32/64 bit issues.
Are your worker roles exiting their work loop? A local recycle is very fast and you might not notice it, but spin-up time in the cloud can be long.
If the issue is caused by a startup batch file, I have stopped the loop by editing the batch file on the instance to include "exit /b 0" at the beginning. This will tell Azure that the startup was successful and you then have all the time you need to diagnose issues without the VM getting killed.

Resources