Saturday, December 3, 2016

It's Not a Tumah!!

 on  with No comments 
In , ,  
Have you ever been working on a problem and were convinced you knew what the problem was but just couldn't figure out how to fix it?  And then later realized that you were barking up the complete wrong tree on the matter?  Here's one example I came across recently.

I had just set up a terminal server for outside access to my network, and port forwarded a random port to 3389 on that local server.  Everything tested out fine, from a couple of different locations outside of my house so I assumed I was good.  A couple days later, a coworker said he wanted to kick the tires of SCCM 2012R2 a bit, so I set him up a domain account and passed him along the details.  The next day he couldn't get in.  Fortunately I was working from home that day, so I had a chance to look into it.

In my infinite wisdom, I determined that someone had to be logged into the console of the server before a user could RDP into the server.  That's how it looked locally at the moment, so I figured that was the problem remotely as well.  After a little while reading Google hits on the problem, I thought I had it taken care of with a couple GPO settings.  Everything looked good until the next day, and the next day I was at the office.  So when wasn't working again, I was unable to check into it.  I changed a few settings that night, declared it fixed again, and moved on to something else.  Of course it still wasn't actually fixed, but I had other fish to fry with another attempt at the SENSS coming up.

Fast forward a few days and the memory card in my wife's phone became corrupt.  I popped it into one of the kids' computer because nothing else at my house has a memory card reader and started running some diagnostics.  When I put the kids to bed that night (which was about an hour after I logged out and let the diagnostic run), I noticed that the computer had gone to sleep.  WTH I thought, I have a GPO in place stopping computers from going to sleep if they're plugged in.

Later that night while checking my GPO, I noticed that I had the settings backwards.  Computers would go to sleep after 20 minutes while plugged in, and never while on battery.  DOH!

So what does this have to do with my RDP problem from earlier?  Simple, the terminal server was going to sleep after 20 minutes of inactivity.  It's running in ESXi, so when I clicked into the console, I was actually waking the server up rather than just grabbing focus.  The login screen came up fast enough that I didn't realize what was really happening.   So after a reboot of the terminal server, I haven't had the problem again.

The Android RDP Client from Microsoft was quite handy here.  There's a bit of a learning curve in handling mouse clicks, but you'll catch on quick enough.


Post a Comment

Discuss this post!