A tale of a crashing web app and failing crash dump collection tools

Recently, I got involved in a production web app troubleshooting, where Web Application was crashing ~70+ times a day due to Stackoverflow exception. But we haven’t been able to capture the crash dump for ~30+ days. Whenever we configure the Crash dump capturing the application won’t crash at all!

Sounds interesting?! It is a really interesting problem and we had our engineering team, Microsoft support team (They even involved top folks in troubleshooting), and Sitecore support Team (Application was built on Sitecore WCMS Platform)

Finally, We’ve been able to resolve this issue. But it took numerous amount of time and that’s why would like to share it with you as well. As when we were searching on this topic. We were unable to find anything. Excited to learn more about this? We are also excited to share with you. Let’s delve into this!

High level Application Architecture

  • Built on Sitecore 9.3 WCMS platform
  • .NET 4.7.2
  • Hosted on Azure Web App (PaaS)
  • P2V2 * 4 (Scaled to 4 instances)
  • Multisite solution using Sitecore hosting 12 websites
  • Serving ~6 M Req/Day

What we’ve been observing?

Azure Web App does a good job of reporting application crashes. You can locate it from Web App | Diagnose and Solve Problems| Type “Application Crashes”

As it is a scaled application, If you want to know which Web App Crashed at a given time. Then you can go to Web App Restarted Option and try to map it with Crashes timeline.

Troubleshooting Journey

To troubleshoot Crash behavior we started our troubleshooting process, we checked:

  • Sitecore Log files – As it was Application Crash, nothing useful found
  • Application Insights – Nothing useful found
  • CPU/Memory usage of Sitecore Application/SQL/Solr – Everything was normal
  • This issue had co-relation with latest release (Crashes started after latest sprint release). So, we checked all deployed code/configuration during that release and also tried disabling few global changes we had in release. But with no luck so far 🙁
  • Any Infrastucture level – Nothing
  • We also launched two new sites on the platform. So, we also checked Total number of requests count increase and it was negligible increase – To remove possiblity we also scaled application from 4 to 6. But that also didn’t help
  • We raised high priority ticket with Sitecore support. But they said, we need “Crash dump” to analyze this issue.
  • We checked Azure Diagnose and solve problems and found following information from Proactive Crash Monitoring analysis:
Thread 12132
ExitCode 800703E9
ExitCodeString COR_E_STACKOVERFLOW
Managed Exception = System.StackOverflowException:
CallStack - Managed Exception
========================================================
CallStack - Crashing Thread
========================================================
     FaultingExceptionFrame
     PrestubMethodFrame
     Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2+<Invoke>d__0[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].MoveNext()
     HelperMethodFrame
     System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
     Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2+<Invoke>d__0[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].MoveNext()
     System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
     System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
     System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
     System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback, System.Object, System.Threading.Tasks.Task ByRef)
     System.Threading.Tasks.Task.FinishContinuations()

But this information was not enough to reach a root cause, as it just shows System OWIN related classes. But doesn’t provide any custom implementation-related information and Proactive Crash monitoring automatically deleted raw dump files. As per: https://azure.github.io/AppService/2021/03/01/Proactive-Crash-Monitoring-in-Azure-App-Service.html

Also, Proactive crash monitoring was triggered only once and it was never triggered after that.

Then we configured Crash Monitoring and monitored for 4-5 days. But the interesting thing was the application won’t crash till we had Crash monitoring enabled. As soon as we disable the Crash Monitoring application will start crashing again 🙁

We configured the Dummy Stackoverflow exception scenario using ASPX Page and tried to use Crash Monitoring to capture it. But that also didn’t work for our application. If we try the same on Plain ASP.NET or Sitecore application it was working fine 🙂

We noticed that wherever Crash monitoring was working application was deployed on D: and for not working it was on C: and when we check KUDU Console “w3wp.exe -> CrashMon.exe -> dbghost.exe” hierarchy was missing. MSFT support initially thought this could be the issue. But then later Azure Product Group confirmed that’s not the issue.

MSFT support asked us to check our application configuration and we couldn’t find anything. Now, we were in a Catch 22 situation where we can’t do anything without a Crash dump and so far we were unable to capture a crash dump. Our full focus shifted to figure out how we can capture crash dump. Here’s a quick recap of what all we tried during that process:

As you can see no results thus far and we’ve been losing our patience. So, we thought to take a step back and started looking in other directions:

  • To reduce impact of Crashing app we configured App Service Warm-up (This was in our backlog already) this will make sure that app is not back in rotation for end users till app has been successfully warmed up. This really helped us to reduce overall outages which had major impact for end users : https://michaelcandido.com/app-service-warm-up-demystified/
  • We also configured Custom error page using Cloudflare DNS Custom error pages

The above two steps helped us calm down the client a little bit and we could focus on our troubleshooting parallelly.

  • We had Dynatrace OneAgent configured since long time and we thought to remove it : https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-cloud-platforms/microsoft-azure-services/integrate-oneagent-on-azure-app-service/
  • We had VNET enabled to access on premises API, Enabled Crash monitorig and tried capturing crash dump using Dummy Error page and it worked!
  • Above step gave us a hint that this issue is related to VNET Configuration. So, for testing purpose we create new storage account in East US2 and configured Crash monitoring to work with that and it worked!
  • We tried above step at UAT application level. To make any VNET configuration on PROD we need to take downtime. So, we thought to configure Crash Monioring with East US 2 storage account and that worked!
  • We also got this URL from MSFT support to verify your Crash monitoring can connect to Your Storage account or not : https://YOURAPPNAME.scm.azurewebsites.net/daas/api/settings/validatesasuri
  • Another way to identify whether your Crash monioring is working or not is check KUDU Console “w3wp.exe -> CrashMon.exe -> dbghost.exe” If you don’t see dbghost.exe then your Crash Monitoring has not been successfully configured
  • From dump we identified issue and fixed it!
  • Later we worked with client teams to removed the storage endpoint from the integration subnet and it started working for East US storage as well!

In Summary,

  • If you have any extensions installed at Web App level e.g. Dynatrace try removing it
  • If you have any VNET configurations try disabling it
  • This is how Crash Monitoring works
    • Crash Monitoring tries to connect to your storage account using SAS token (Accessible from App Configurations) first. If it can’t connect, it won’t show you that it failed at UI Level (MSFT Please change this) only MSFT Support can help you check that using admin panel
    • To verify that you can use tricks given above
    • Once storage account is accessible it connects either DebugDiag or Procdump (Based WEBSITE_CRASHMONITORING_USE_DEBUGDIAG flag)
    • You can verify it from KUDU Console
  • Most Important thing : Whenever you have such issues – Rember one thing – “Never lose hope!”

Thought to craft small Crash dump tool Marix – Small gift from me for you!

ProcDumpProcDumpHelperCrash DiagnoserProactive Crash MonitoringCrash Monitoring
NoteOOTB available on Azure Web App : c:\devtools\sysinternals\
* Version might not be the latest
Community ExtensionCommunity ExtensionOOTB is available as part of the Azure Web App. Auto attachedOOTB is available. But you have to enable it
ParametersRefer docRefer docRefer docWEBSITE_PROACTIVE_CRASHMONITORING_ENABLEDWEBSITE_CRASHMONITORING_USE_DEBUGDIAG (True/False)

WEBSITE_DAAS_STORAGE_SASURI
Behind the scenes which tool it uses?ProcDumpProcDumpProcDumpCrashMon.exe, procdump.exe, or dbghost.exeDepends on configuration OOTB – DebugDiag

This has been the most complex issue, I’ve worked on in my ~15 years of a career (and most of my colleagues and MSFT support folks). We’ve invested a lot of hours to fix this and that’s why I wanted to make sure that I pen down our learnings. So, it helps you to fix such issues in the past and spend saved time with your loved ones!

Thank you to everyone who worked on this challenge and kept the positive attitude alive till the end!

Venn diagram of developer types

Hey readers, It has been so long since we had a chat [Even one way :-)]. Have been busy with lot of things. But as I have been saying in past, The more busy I’m, the more I got for you to read.  So, le’s come to the point.
It has been roughly a decade since I am privileged to be in Software Development field. During that period, have played different roles. Now, When I look back, I try to analyze lot of things and I came up with my understanding about type of developers. You might ask why I need to know type of developers. Here are my views why:

  1. Hiring : When you are hiring new developers, you need to understand which type of developer is this and which type of developer you are looking for or your team needs right now [I have been part of roughly >50 interviews till this time, and hiring is also one of the data source for this blog post]
  2. Coaching and mentoring : If you know various types of developers and based on that if you identify someone is of some type and he/she should work on X/Y/Z to be of some else type etc.
  3. Forming team: When you start a new project, and you are one of the team selector, Then it will be good to know and make a balanced team.
  4. Self improvement: After reading this post, and If you agree what I am going to say then this post might help you to identify your type and work towards improving other aspects and be THAT BEST DEVELOPER Which World is searching for!

Enough reasons to convince you to read this further? 🙂
I thought a bit and then came a Eureka moment — Where an idea came, Why don’t we use Venn diagram to explain this! And I’m excited to share output with you:
 
venn_diagram_for_developers
 
Let me explain these types in detail:
Mainly they are based on their thinking style

  1. Technical : They are super technical. They know each technology as soon as they are available. They would like to get their hands on it and would love to implement it in their current/future project. There are quite a few who will try to fit new technology without even fully understanding it. But they will have solution for all technical problems. And each project must have at least one of  them. They make good Technical Architect or Technical role.
  2. Business : This type of devs will understand business very well. They speak client’s language and that’s why most of the time client loves to work with them.
  3. Analytical : This person thinks all things from analytical point of view. (s)he will come up with the easiest and best solution which neither technical/analytical person can think of. They will not be super strong in technical. But If you pair this dev with Technical team member they rock
  4. Technical-Business-Analytical: And you know that sweet spot, when one person can think from all angles. YES, they do exist. But sadly they are very few and again this type of thinking takes sometime. Because when you are out of college, initially you think to solve everything using technology. Because that’s what you have been taught. But gradually, If you mentor someone closely they can come in this type in a longer run. Usually, This type of folks should be leading a team.

So, what makes a best team? It depends on lot of factors, e.g. Project complexity, Resource availability etc. But If you want to make super complex project successful. I would recommend, Combination of these types will rock your project. And that’s what I look for when I have to form a team — Sharing my secret with a wish that you will share with others!
Happy Team Building! 🙂

Technology trends you should know

After getting positive feedback on : https://kiranpatils.wordpress.com/2011/09/29/why-we-need-windows-communication-foundation/
https://sitecorebasics.wordpress.com/2015/04/04/sitecore-multisite-basics/
Thought to spend sometime to write a new comic on Technology trend! So, If you would like to learn about Latest technology trend then  this article is for you
Before you go further I would like to mention that this article would have not been possible without this article from Tess : https://blogs.msdn.microsoft.com/tess/2015/11/12/mastering-asp-net-5-without-growing-a-beard/
So. If you liked this article then the credit goes to her and NOT me. Because I just converted those learnings in comic — So, you enjoy reading it!
Let’s go!
In a small town there used to be a guy. Who was very had working. His name was Mr.Earner he was very busy in his project and personal life (like you!) and when one fine evening he was reading about latest technology trend. He felt that he left behind the technology trend. So, he went to church and prayed to Jesus for showing him path!
As always Jesus listens him and guides him to talk to Mr. Learner — Mr. Learner is a famous in town for his knowledge and knowledge sharing skills.
TT1
TT2
TT3
TT4
TT5
TT6
TT7
TT8
Keep learning, Keep Sharing!
Happy Coding! 🙂

Future Unleashed India 2015 Experience

Luckily, Along with my troop got a chance to be present at Future Unleashed India 2015. Would like to share my experience with them who can’t make it happen or who would like to have a quick recap of it!
It was held at Nesco convention center at Mumbai on 5th and 6th November 2015. On 5th there was a business track (Where Mr. Nadella and lot of big names of Indian IT Industry attended and presented) and on 6th there was a technical track.
Full agenda can is here : http://futureunleashed.microsoft.com/default.aspx
I’ve been able to be part of Technical Day and keen to share that experience with all of you!
But before that will share my registration experience. It was just awesome, Microsoft team kept calling and we were in sync with all latest and greatest details. And on the event day as well. Whole process was super simplified — And would like to say thanks for all the teams for being so helpful and co-operative!

My notes from Technical tracks which I’ve been able to attend:

Keynote by Scott G.

Before keynote started the musical performance was awesome, and it recharged the whole environment!
It was great to see Scott in person. He shared few important updates:

  • Now, Azure is in 24 Regions around the world!
  • Azure is unique platform which support On premise setup as well as Cloud setup
  • Azure it opening 2/3 Data Centers in India
  • Quick demo of creating new VM and publishing stuff from Visual studio
  • Quick demo or Power BI as well
  • He also called few partners to share their learnings with audience. It was great to hear their experience!

Building Modern Web App with ASP.NET 5 and VS 2015

  • Great session by Mr. Chetan Vaja
  • He demonstrated capabilities of ASP.NET 5
    • Few big changes
      • You can host your ASP.NET Website without IIS — On Console — Self hosted
      • Can be hosted on Linux and Mac as well — He demoed it!
      • Has Built in DI
      • Everything is modular
      • For web forms you have to use 4.6
      • It uses Roslyn compiler. Which means you no need to build your change and wait for a long time. Just do a change and do F5 on browser — More like PHP Experience
    • Got integration like
      • grunt
      • gulp
      • bower
  • DNX = Dotnet execution environment
  • Kestrel : New open source linux server
  • Good to read links: docs.asp.net

Continuous Testing

  • Awesome session by Mr. Atin Bansal – Senior Program Manager
  • Demo of IntelliTest : Using which you Visual studio can create all possible test cases automatically. And you can save them as .CS file – As of now it works with Public methods only
  • Cool things with VSO – Visual Studio Online
  • Load testing on VSO and VS 2015 : Covers all scenarios I know. But you need to have VS Enterprise license and ready to pay for VSO load testing
  • Manual testing — Test cases addition and execution support

IOT From Scratch

  • There will be 25 B connected Gadgets by 2020 [Source : Gartner]
  • Grove PI +
  • Full demo : Where PI sent data, Azure was receiving data, and using Power BI we can analyze that data!

Technical Debt with TFS and SonarQube

  1. Good session by Harysh Menon
  2. MS is working on integrating it with SonarQube
  3. So, you can see Technical Debt and can do quality releases!

As of now have to install it using Zip. But they are working on making installer

Neo4j – The graph DB

  • Good session by BrijRaj Singh
  • Nicely explained
  • Graph DB Concept
  • We had few demos

Overall the event was awesome! Microsoft took very good care of us. Everything was just perfect. Would like to give my gratitude to the whole team — And I thought doing it via blog post will be the best way to do it!
Waiting for the next one..!

References:

http://futureunleashed.microsoft.com

One-Click Publish in Visual Studio showing an error The underlying connection was closed: An unexpected error occurred on a send

Challenge:

If you are using Visual Studio one click publish, and you are facing following error (We were getting it while doing publish from Build server to Target server.)
Web deployment task failed. (Could not complete the request to remote agent URL ‘https://<HOSTNAME/IP>:8172/msdeploy.axd?site=<OURWEBSITE>’.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details: Could not complete the request to remote agent URL ‘https://<HOSTNAME/IP>:8172/msdeploy.axd?site=<OURWEBSITE>’.
The underlying connection was closed: An unexpected error occurred on a send.Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host                   0              0              WEBSITENAME
Or any other error related to Web Deploy [a.k.a. MsDeploy] technology used behind the scenes of Visual studio publish. Then this post is for you!

Solution:

This is the error, Which took days and days for us. Because all settings were working since couple of years and suddenly it stopped working. Without getting any clue. This is what we did for troubleshooting:

  1. Disable Firewall/Antivirus, Allow Port 8172
  2. Make sure Hostname/IP gets resolved
  3. Server’s IP and Port number is reachable : Yes – We verified it using Telnet and it can connect to Port 8172  and also verified Firewall rules as well – All good!
  4. Verified all Web deploy related services are fine or not – and they are fine – We tried to run Powershell script given by Microsoft in Reference Link #2 – But no luck
  5. Verified username and password are fine – They are fine – Verified it using remote desktop with those credentials
  6. Reinstalled MSDeploy on SBX – and It didn’t helped
  7. No any log entry in MS Deploy IIS Log [HEAD/POST]
  8. Tried with MSDeploy command : msdeploy.exe -verb:dump -source:iisapp=”Default Web Site”,computername=https://:8172/msdeploy.axd?site=Default%20Web%20Site,username=,password=,authType=basic  -verbose –whatif
  9. Fired MS deploy command from my local – as given in earlier email and monitored packets on SBX server using TCPView and netstat command : Found that : TCP Packet gets sent on 8172 and status : SYNC_RCVD – and then it drops packet

During this whole process. This is what we understood:
– Web Management Service listens on 8172
– If request received it calls MsDeploy.axd
Somehow, packet gets reached to Machine – But after that it should forward it to IIS – And in turn IIS will send it to MsDeploy – And looking at log files – Packet is being dropped at machine level

  1. http://forums.iis.net/t/1227905.aspx?The+underlying+connection+was+closed+An+unexpected+error+occurred+on+a+send+
  2. http://stackoverflow.com/questions/12959501/web-deployment-task-failed-when-using-webdeploy-in-vs2012
  3. http://www.iis.net/learn/publish/troubleshooting-web-deploy/troubleshooting-web-deploy-problems-with-visual-studio
  4. http://stackoverflow.com/questions/5841370/cant-get-my-ec2-windows-server-2008-web-stack-instance-to-receive-publishings
  5. http://stackoverflow.com/questions/11479927/visual-studio-2012-web-deploy-to-windows-server-2008-r2-with-iis-7-and-msdeploy
  6. http://www.asp.net/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-(web-deploy-handler
  7. http://stackoverflow.com/questions/10894671/msdeploy-fails-for-webdeploy
  8. http://blogs.msdn.com/b/amol/archive/2011/02/09/errors-seen-while-using-msbuild-to-deploy-on-a-remote-iis-server-and-their-solutions.aspx

We raised ticket with Microsoft Support folks and this has been fixed by changing Server URL to : http://<HOSTNAME/IP>  from : https://<HOSTNAME/IP>:8172/msdeploy.axd [Reference link : https://msdn.microsoft.com/en-us/library/dd465337%28v=vs.110%29.aspx]
To be honest — We haven’t been able to find out why earlier URL was working earlier and not working now!

Raspberry Pi Quick start guide

Howdy Friends – Sorry for being away since so long. But have been super busy with lot of things. And still lot of things going on. Unfortunately unable to find time to write a blog and share knowledge (I know you don’t find time. You have to allocate it. And yes — Somehow not able to allocate it.) But I’m sure soon will be able to share my learnings with you! And today’s blog would like to dedicate it to Sir Abdul Kalam. He has always been an inspiration for most of us! (Including me and you!). And when I read his following quote – I thought will work extra and get this blog out – Just for you Sir!
Kalam-Sir-Quote

What is Raspberry Pi? And what’s the usage of it?

If you haven’t heard about this then you need to come out of your cave. Because lot of techies are talking about this. Especially during March is for Makers movement. No worries — Will help you to understand it.
For Basics — Let’s talk to our friend wiki The Raspberry Pi is a series of credit card–sized single-board computers developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools.”
So, It’s a tiny computer for fun if you are techie and If you would like to inspire kids for learning programming, getting acquainted with computers and start thinking about using Technology to solve real world problems. This is a perfect start! I would strongly recommend you following links:

  1. https://www.raspberrypi.org/
  2. https://www.youtube.com/watch?v=uDCS45YntqI
  3. http://www.hanselman.com/blog/ManyRaspberryPiProjectsHowCanYouNotLoveATinyComputer.aspx
  4. http://www.hanselman.com/blog/Top10RaspberryPiMythsAndTruths.aspx
  5. http://www.hanselman.com/blog/HowToRunASPNET5Beta3OrGoLangOnARaspberryPi2.aspx

Also, I see this device got lot of capabilities for Schools and Kids. Because every Kid will have TV at their home. And using Pi they can convert to computer in around 3-5 K (Pi, Wireless Keyboard, Dongle etc.) and they have a machine ready. On which:

  1. They can do programming!
  2. They can access FULL Internet! (Obviously will need Internet Connection) – Access educational material, explore the world!
  3. They can play games
  4. And you never know — Their might be future Bill Gates/Steve Jobs who might be think of great idea — Which might change the future!

I know I am very optimistic. But possibilities are immense! And If someone gets interest in Computers/anything at this age — Then they will surely do miracles!
It looks like, I’ve portrayed Pi as a Kids computer. But wait a minute. If you are not Kid then also this is super useful to solve some real world problems. Few examples:

  1. http://www.itpro.co.uk/mobile/21862/raspberry-pi-top-15-projects-to-try-yourself
  2. http://www.pcworld.com/article/2895874/10-insanely-innovative-incredibly-cool-raspberry-pi-projects.html
  3. http://readwrite.com/2014/01/21/raspberry-pi-great-projects
  4. https://www.youtube.com/watch?v=ZszlVVY1LXo

Sounds interesting?! Eager to get your hands on it! That sounds good!

How to get it?

You can buy it from Raspberry Pi distributors : https://www.raspberrypi.org/products/
While I am writing. Current latest model is : https://www.raspberrypi.org/products/raspberry-pi-2-model-b/
You can also order it from Amazon. I’ve ordered this one : http://www.amazon.com/dp/B008XVAVAW/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=1LNNW3EMN1G6Z&coliid=I1XQEDLACW1CNU&psc=1 (Yes, It is from Amazon.com — During my U.S. Visit — I got it – Thanks to Nathan Miller — My colleague for helping me to get ordered it using his Amazon account]
This one is complete Ultimate Starter Kit. It is not required to order complete Starter kit. You can order stuff what yo really need. But If you ask me – I would suggest ordering complete Starter kit — Because it contains everything at once! And things become really easy! But again, this suggestion doesn’t apply to you. If you have budget constraints.
And thanks to CanaKit folks. Everything was perfect! http://www.canakit.com/raspberry-pi-starter-ultimate-kit.html

 
The kit also includes a 2.5A / 5V USB power supply specially designed and tested for the power-hungry Raspberry Pi 2. The included 2.5A adapter comes with a 5-foot cable and can power the Pi2 and other USB accessories (such as most portable hard drives) without requiring an external powered USB hub.
Kit Includes:
1 x Raspberry Pi2 Model B 1GB
1 x 8 GB MicroSD Card – Raspberry Pi Recommended MicroSD Card with the new NOOBS
1 x Raspberry Pi 2 Case
1 x CanaKit 2.5A MicroUSB Power Supply specially designed for the Raspberry Pi 2 (5-foot cable)
1 x Premium Quality HDMI Cable (6-foot)
1 x WiFi Adapter/Dongle (Ralink RT5370 chipset)
1 x Set of Heat Sinks
1 x Breadboard
1 x 40-pin GPIO Ribbon Cable
1 x 40-pin T-Shaped GPIO to Breadboard Interface Board
2 x Push Button Switches
1 x RGB LED
2 x Red LEDs
2 x Green LEDs
2 x Yellow LEDs
2 x Blue LEDs
10 x 180 Ohm Resistors
5 x 10K Ohm Resistors
1 x CanaKit General Guide for Beginners to Electronic Components
So, go ahead and order one — right now! You already have it — Perfect! Then let’s see next section!

I have got it – Now what?

  1. Unpacking : Unpacking is very easy. And you can find a lot of online tutorials for it.
  2. Installation and Configuration : If you’ve ordered complete kit — Then you will have one Micro SD Card with NOOBS [New Out of Box Software] on it. If not then you can follow this instruction to install NOOBS on your card :  https://www.raspberrypi.org/help/noobs-setup/ — Just follow the instructions. You will have your Pi up and running! [I was not lucky, my initial journey was bit bumpy. I spent the couple of days starting my Pi. But I think during that journey. I learnt a lot more about it. Please refer “Few Challenges” section for more info] This is also good : http://www.canakit.com/Media/CanaKit-Raspberry-Pi-Quick-Start-Guide-1.0.pdf
  3. Few commands : Make sure you read these links and run these commands : https://www.raspberrypi.org/documentation/raspbian/updating.md
  4. How to configure WIFI? : In case you have configured WIFI in your laptop and forgot password of it. Then you can use this link to get it : https://4sysops.com/archives/how-to-find-the-wifi-password-in-windows-8-1/ then these links helped me to configure WIFI :  https://www.maketecheasier.com/setup-wifi-on-raspberry-pi/ https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
  5. How to enable Remote Desktop? : Using this link you can configure Remote Desktop for your Pi : http://www.raspberrypiblog.com/2012/10/how-to-setup-remote-desktop-from.htmlWhich means you can disconnect your Pi from Monitor and can access it using your laptop or machine!

What was my First Project?

As you know in programming world. When you start learning any new language you start with “Hello World”! In Maker’s world it is Starting an LED using your python script — Trust me when you start LED — That feeling is just awesome! To do that, I followed this article :
http://www.thirdeyevis.com/pi-page-2.php
Make sure you follow first step and your LED should light up without any program — If it is not lighting up. Which means your connection is not perfect
 

IMG_20150729_240731745
Pi Connected with Breadboard and LED light up!

 

Pi GPIO Header Quick Reference

Now, Let’s do it programmatically!

  1. connect your one cable to – GPIO 27 and another one to Any Ground
  2. Make sure you’ve setup your circuit as per schematic mentioned in an article
  3. Make sure you’ve opened Python IDE using terminal as mentioned in an article
  4. Your code should look like this:

[sourcecode language=”python”]
import RPi.GPIO as GPIO ##Import GPIO Library
GPIO.setmode(GPIO.BOARD) ##Use board pin numbering
GPIO.setup(13,GPIO.OUT) ## Setup GPIO on Pin13 to out
GPIO.output(13,True) ##Turn on GPIO pin 13
[/sourcecode]
Run it, and your LED should light up!
 
After that, I wanted to ON/OFF this LED using my mobile! — And we did that using Flask – Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions. Basically it is a web server — Which is easy to set up and run! – Trust me — Super easy! — Once we started web server — Then it was very easy to get it done. And then connected my mobile in same WIFI — And accessed URL. Using which I can start LED ON/OFF from my phone!
Few things to keep in mind:

  1. Make sure you connect your board correctly. Basically all pins should be touching the bottom portion of breadboard. Good read : https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/breadboard/
  2. When you connect your GPIO Ribbon cable make sure RED line is at right side — Or at First GPIO
  3. Understand GPIO numbers — http://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/ — It will save a lot of your time!

Few challenges:

When I was configuring Pi with my old monitor [VGA to HDMI Converter], PS2 Mouse and Keyboard [PS2 to USB Converter]. I was getting following error:
Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

Referred all above blogs. But nothing worked. But after changing it to new monitor with HDMI Cable and new Wireless USB Keyboard and Mouse — It started working! So, I am sure it was hardware failure!

References:

I hope this article helped you to understand Basics of Pi and inspired you to get your hands on it! This is just begining — Lot of things can be done using this. And it will be done in upcoming days — Just need to find sometime!
Special Thanks to Daniel – For helping me understand all the basics!

Completed 8 years of professional experience!

8 is greatHey Readers — You will be happy to know that, Your this blog author has completed 8 years working in an industry! Yeap, this happened on 14th May. It really feels great!
To be honest, Haven’t realized. How these 8 years went! When you take a step back, sit quietly and think on it– Then it seems like all happened in a blink of an eye!
To check whether you are moving in right direction or not, It’s always good to check where you were and where you are! If you are in good position, you are happy then you are moving in to right direction!
8 Years is a big time, it means:

  • 96 Months
  • 417 Weeks
  • 2921 Days

And luckily I found this article so long back, Which I tried to follow : http://programmer.97things.oreilly.com/wiki/index.php/Do_Lots_of_Deliberate_Practice
Now, When I look back, I feel happy and enjoyed and enjoying what I did and do. Because when you start your career. You are enthusiastic, You want to change  the world, And then after sometime you get carried away. For an instance, There were lot of good players in Cricket. But few of them had a great career as Sachin, Brian Lara, Sunil Gavaskar etc. Same as in film industry. You take any industry you will find the examples.
So, I was writing quick notes in my diary. What things I learnt in these 8 years. Good/Bad. And then I thought to share it with you. Especially folks who are young and starting their career or going to start their career or in between of their career. Might find it helpful. So, here we go:

  1. Focus on your basics — Somehow I figured this out sooner. That focus on your basics skills. Whether it is in Technical, Communication or Soft. Because to be in this/any industry. You just can’t sustain on a single skill — e.g. If only your technical skills are good. But your communication is not good. Then you will survive. But not grow! At the same time, Based on your communication skills you will survive for a shorter time. But not for a long time
  2. Be Technically Strong : At initial stage, Focus on your technical skills a lot. Because if you are technically not strong. Then it will be tough to sustain in a longer run! — Yes other skills matter for sure. But at initial stage this matters more as per my view! — Because once plant is a tree, you can’t mold it! Always be in sync with latest and greatest. Because technical industry changes over the night. And if you don’t upgrade your self. You will be dinosaur!
  3. Read Read Read, Learn Learn Learn – Read as much as you can. Technical or Non Technical. But you must need to have reading habit! When I see my small library, It feels good. Because those books made me good programmer and good human being as well!
  4. Keep Sharing your knowledge : If you learnt something, share it as soon as you can. Because when you share, you learn it better. Following are few of my ways to share:
    1. Blog : Every Developer must need to have blog — And so,as you!
    2. Have been visiting faculty — And was lucky to share my craft with great talented students!
    3. Mentor and Train : Have been luck to mentor and train — few young and great minds!
  5. Communication :  Because communication is key. If you can talk to compilers, that’s good. But at the end of the day. Your software will be used by Humans! So, you need to understand what they need. And explain them how that works! I worked a lot on this, Because I was pass out from Local Indian language school. Where English was just one subject. I still remember, initially before sending an email and writing blogs. I was double checking my spelling and grammatical mistakes! 🙂 But that’s exercise helped a lot!
  6. Soft Skills : As I said earlier, Along with Technical and Communication skills. Soft Skills are also interested. I am a big fan of this series : Driving Your Career – Soft Skills to Move You Forward
  7. Keep your passion alive : What I’ve seen is, gradually people goes in to Comfort zone — The dangers zone in this world! Always be on your toes, Keep pushing your self. Find your big dream about life. And just keep working in that direction! Please remember, So fewer people in this world, get a chance to work on the stuff they love to do!
  8. Work smart : Always keep looking for ways to improve – The biggest room in this world is room for improvement! Work smart, and get things done — Rather than complaining about anything!
  9. Make good relations : Respect people, make good relations. That will help you as you grow in your career for sure! And it’s humanity right! We are humans!  “I’ve learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.”
  10. Be a good team player : Each company, and each team needs good team players. Be away from office politics, crab mentality. Help people grow, and then only you will grow!
  11. Finally, Great lines from Harsha BhogleAnd I have seen too many outrageously talented, young Indian cricketers who chased the rupee and lost the runs. In essence, one must chase the performance goals and letting the results take care of itself.”

Links:

  1. You are starting your career in IT Industry?  Here are my learnings for you!
  2. Harsha Bhogle at IIM
  3. Very Inspiring Speech by Navjot Singh Sidhu
  4. Leadership Basics

You also completed long time with this industry? I missed to cover your point? Please do share with young folks. They will surely thank you for that!
Thanks for reading, Love what you do!

Cleanup failed to process the following paths

Challenge:

One fine day, while doing SVN Cleanup. We faced following error:
Cleanup failed to process the following paths:
<PATH>
Previous operation has not finished. If it was interrupted
Please execute the ‘Cleanup’ command.
You are also facing similar challenge? Then you are at the right place.

Solution:

  1. Open command prompt
  2. Type TortoiseProc.exe /command:cleanup /path: /closeonend:0

That’s it!

You've been promoted from Developer to a Team Leader?

TeamLeaderLast year during this time, I was packing my bags for an unexplored journey. Before I was signing off, champs  asked me to share my learnings of Transformation from Developer to a Team Leader. Their wish was my command! I did that and they liked it so much!
I was checking few old folders [At times, you should try this. Rather than surfing the web – FB,Twitter, Google, Mails. Try to surf folders from your machine. You will find a gold out of it! It recharges you. And it’s always good to STOP and look back!] and found that same document. I thought rather than having it with me. Why don’t I share with you! And that’s how this post came in to this world.
Since starting of my career, I was always a developer. Who would like to solve most complex business solutions. And convert Software Blue Print in to reality. While working lot of people asked, you are planning to be a Team Leader or Manager? When there was an internal openings for such places, people used to ask me. Have you applied? And the answer was always NO. As I was clear that will never go in to managing people. The reason for that was my myth. As per my perception Leaders/Managers should be :

  • Able to get angry on people
  • Should have shouting and dominating nature
  • Most of the time Political
  • Person who always sits at the other side of the Table
  • Doesn’t get involved in Development
  • Does Micro Management

And as far as my knowledge, I was far far far away from all above qualities. And still today I love spending most of the time with Visual Studio. Which I was afraid that I won’t be able to spend. And as it is said that “Human Plans and God Laughs“. Everything is already scripted! [The Wold is Stage, Life is Drama, We are Actors, God is Director]. One fine day, the need of an hour was.  I have to lead the team. When I’ve been asked — Would you like to lead? The first answer was NO. But finally after discussing a lot. I’ve thought to give it a try! [Would like to Thank you! To all the people who identified a leader within me — Please remember Only Good leader’s eyes can spot other potentially good leader!]
Long story short, Here I am in the role of a Leader from the role of a Developer.  I was not sure. How I will do it. But one thing I was sure. Will give my best to it! [Do your best, forget the rest!] and I was lucky that I got a chance to lead few of the best people I know!
As per the rule of Change, It is initially tough! [“All change is hard at first, messy in the middle and gorgeous at the end” – Robin Sharma]. But leadership is NOT as tough as I was thinking of. If you are thinking Can I lead? The answer is here : Yes, If you can breathe you can lead! But please be aware leading is sacrificing!

I believe that, Building Nation’s responsibility is on — Parents, Teachers, And Leaders — as per your life’s stage. They play a crucial role in our society! [If as a leader, you’ve insulted someone in public or you had a bad day for some one in office. That frustration shows up in that person’s personal life as well. As per stats 90% of people in the world are NOT Happy with whatever they are doing — I believe few might got caught in to a wrong job, and few of them might got caught in to wrong leaders]
I’ve already written my thoughts on Leadership in my earlier posts:

As per my experience and observation, have worked with few nice leaders (and at the same time few bad as well!) and would like to thank both of them. Because knowing what not to do takes more time than knowing what to do! 🙂 and the other ones helped me to do so very quickly! In this blog post, will try to summarize the characteristics of a good leader [what I’ve seen], it’s solely based on my observations and reading whatever I had during my working experience as a leader since 2 years!

As per my above blogs, I took learnings from :

  • Good Leaders with whom I worked! — They taught me What to do?
  • Bad Leaders with whom I worked! — They taught me What NOT to do?
  • Lessons from Best Public Leaders/Icons, History — By their life examples, Reading from their book
  • Sports — Sports makes us good team player/leader
  • Started treating others, The way I wanted to be treated
  • And the best example to remember is — Leading is like parenting!

So, you are also in same situation? Eager to know what was my learnings? Eager to see what I shared with champs? Looking for some points, what all things you should take care when you start as a leader?

Disclaimer : This is based on my learnings. I am not expert on this subject. But few basics which I learnt through my journey and have noted it down. Which I am sharing with you. So, if you think something might not work for you. Feel free to ignore it

Let’s go! (Just a note : will write pointers or one liners only. In future, will expand few points from following list If you think you need detailed explanation on any pointer, feel free to drop it in a comment) :

  • Basic characteristics which a leader should have :
    • Good human being : You can’t be a good professional, without being a good person first!
    • Good Listener — God has given two ears, and one mouth. So, speak less and listen more!
    • Patience — You need to have full patience!
    • Stithpragya — This one is from Hindu scripture– Shreemad Bhagvat Geeta – This word is used for someone who doesn’t get so much excited on Winning and doesn’t gets down on losing — Read more here : http://bhagwadgita.nimblefoundation.org/what-we-learn-from-bhagwad-gita-chapter-3/
    • Self motivated – Need to motivate team, When they are down!
    • Control your emotions/Channelize your anger : At times your role comes with lot of frustration, Anger etc. But that’s part of it. You’ve to find a way out of it. So, spend quality time with Family, Friends, Listen Music which recharges you, Read books which talks to you – Books are your best friends! — I always get most of the critical solutions while reading one of my favorite book!
    • Honest, Transparent : If you are driving a car, will you drive it. If you can’t see the road because of foggy or something? No, Correct? Then how you can expect people to follow you. When  things are NOT Transparent. Honesty and Transparency people always like to have! [Honesty is still the best policy!]
  • Initial meeting : Talk to your team first. What are their problems? What makes them happy? What makes them unhappy? What they would like to change? What are their old open issues? Old promises? Take a note of them. And act on them ASAP. These points are your first and important project. If you can’t do something, please update team with logical reasons.
  • New Place always full : When you go at new place it will be always full. People to whom  you are going to lead. Will say. Why we need a leader. We are doing our things perfect? Aren’t we? They are right. But do you know story of  – Kissa-I-Sanjan? : Read here : http://delhiparsis.com/2007/08/19/the-story-of-sanjan-kissa-i-sanjan/ — So, You’ve to be Sugar in the Milk
  • Understand the process first : Initially Understand everything and then try to improve the process. I’ve seen that, lot of leaders join new place/role and try to change everything. Based on their past learnings. But do you know that, One Size Shirt, doesn’t fit for all?
  • Reading : Keep reading, Switch off everything just 30 minutes to read, it will enrich you, boosts you! – “Reading is to the mind what exercise is to the body”Story of a wood cutter
  • Understand And Analyze : When you’ve to take any decision. First, try to understand, Analyze and then conclude. Good story to read : http://rishikajain.com/2012/05/16/a-heart-touching-story-with-moral-and-inspiration/
  • Be on TOP of Everything : Be Technically Strong and have full knowledge of everything! – I know you can’t master everything. But you should be on top of everything! – Be expert! Good leaders are the one who are ready to roll their sleeves and start working if their team needs it.
  • Stand Firm : Stand firm in tough time – Leaders are like TEABAGS This is the time, When your TEAM really needs you. And based on this time’s stand. People with respect you or NOT respect you
  • Let them fail : At times, let them fail! – Story of a baby Giraffe
  • Small things matters : Team’s small issues are Important may it be Cupboard, Mouse etc.
  • Act promptly :  No one likes a leader, who just takes an issue and works on it for ages, we are living in 4G world 🙂 Take a decision and act on it!
  • Appreciate in public : Appreciate team, Make sure they are always highlighted and NOT You
  • Criticize in Private : Appreciate [Public]/Criticize[1:1] on time. Give them honest feedback (We Indians have to learn about Constructive feedback) – Don’t go and shout on people. Explain them specifically what was NOT right? And how can you help them. So, it doesn’t happen again. [Doing mistake is fine. But repeating Mistake is crime!]
  • Focus on Basics : Whatever complex the situation is — Always stick to basics. Most of the times follow your guts/Intuition — They know what you want or should do. [“Have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.” – Steve jobs]
  • Know your Team : Know your team very well. Individual’s Strengths and weakness. Their likes and dislikes. It is proven that if you give people stuff what they like. They do it by heart! I call it Know your weapons. – Do it Krishna way [This is again from Hindu scripture — Mahabharata – Where Shri Krishna assigns tasks to individual as per their strength. Like if some task needs more Strength — it goes to Bhim — as he was the strongest in Pandavas. But if it needs focus then it goes to Arjuna — As he was the Sharpest in Pandavas ]  – Because If you give someone what he/she likes he/she will enjoy!
  • Make them feel safe and trust them – No one would like to work with leader who can’t cover them from outsiders. Who is NOT Strong enough to fight for their teams. Good to watch : Simon Sinek: Why good leaders make you feel safe Fight for their rights, Even though you need to get wounded for that. At times, when someone is not in form. Help him/her out and boost them up! Rely/Trust on your champs always!
  • Know them personally – Don’t always talk about WORK, WORK, WORK — Know them personally. It will help you to understand them more. What’s their personal likings.
  • Do their tasks on time : If you promised them something to happen by some date. Make sure you do it. If their appraisal is due. Do it first. Remember Lead by Example? If you do their tasks on time, Then only they will do yours!
  • Use Technology as much as you can : Use Softwares like Google Doc/Excel/Outlook calendar to manage and remember tasks – And keep space in your mind! Learn Outlook and office softwares! They are your friends!
  • Share Expectations : Share your vision, and work for a common goal, Convey them! I’ve seen people shine when they know what exactly is expected from them. Clear expectations from both side – Rather than explaining this is not right. Be specific!
  • Share knowledge : Don’t feel insecure – Good leaders create good leaders other create followers!
  • Chunks : When you are working/going to start working on any task. Try to create small chunks of it. Ask your team to do the same. It clarifies your and teams understanding. And you will see the flaws, issues before they arise. And gradually your estimates will become more accurate!
  • Sharpen your memory : You need to have good RAM. Because you’ve to keep track of lot of things
  • Promises : Keep note of your promises – It will be a good option not to promise rather than doing false promise
  • Focus on Solution : Always be cool. Even though everything is down! Think on a solution rather than problem source. Never blame anyone
  • Accept Mistakes : Learn from Mistakes, Accept your mistakes! – And even if it’s team’s mistake for outer world, you should take it on your own! – Story by Abdul Kalam
  • Communicate : Always try to be clear in your communications. Small miss communication can create big confusions. And people starts speculating — That’s human nature
  • Be accessible : No one likes a leader, who is not accessible. And always busy with meetings or closed in Cabin. You are because your team is!
  • No False Justification Please : If something you are not convinced, don’t try to convince them. Fix it OR let them know you can’t fix it. And you are not happy. But no false justification. Because they are engineers and they are as logical as you.
  • Everyone is Special : Accept people the way they are — Everyone is special – Never bad mouth your team — NEVER NEVER NEVER do it in front of others
  • Respect Seniors : Respect seniors in your team. Complement them and never try to compete with them
  • Lead by Example – Don’t ask a task to team, which you don’t do!
  • Take decisions for team – for a team not for individual and stand by them and make them true!
  • Say “Thank you” to your team always! – Because whatever you are, is just because of them!
  • Never lose hope – The game is not WON till the last ball – Challenges for which you don’t find solution/direction don’t worry, Just stay on pitch, runs will come automatically – Story of Two Frogs and Milk
  • Leading is like parenting – Take care of your team, And one day step back. See them shining from afar. Remember the way your parent did when they taught you cycling?!

Have I missed something? Does it matches with your good leader’s perception?
Happy Leading! 🙂