Friday, November 13, 2009

Configure Service Recovery from CMD Prompt

When a windows service unexpectedly exits, it can be nice to have it try to restart itself. You can do this from the CMD prompt instead of wading through the computer management applet with the following command:

sc \\<server_name> failure <service_name> actions= restart/60000/restart/60000/restart/60000 reset= 0

This configures the failure action for the <service_name> service on <server_name> server to restart when it unexpectedly fails on the first failure, the second failure, and all subsequent failures after a 60 second wait (the restart/60000 pairs represent the three recovery stages). It sets the failure counter so it does not reset.

Windows Server 2008 R2 as a Workstation

I'm about to move from XP Professional to Server 2008 R2 for a development workstation. It looks like Hyper-V will be a huge improvement over VirtualPC…

Windows Server 2008 R2 with Hyper-V as a Developer Workstation

Microsoft Windows Server 2008 with Hyper-V is a great platform for developers who need to work across a wide variety of platforms.   Many developers are already using Microsoft Virtual PC for their development environments but soon this will not be a viable option.  Why?  All future Microsoft server products will only be offered in 64bit versions and Virtual PC only supports 32bit guest operating systems. Windows Server 2008 with Hyper-V can solve this issue since it can host both 32bit and 64bit guest operating systems.

I have been running Windows Server 2008 R2 Beta with Hyper-V for a while now and have to say that I am really impressed with the performance and capabilities

Hopefully, I'll realize all the same benefits!

Wednesday, November 11, 2009

Data Loss

It looks like we're not the only ones whose SAN issues affect production databases…

Microsoft irrecoverably lost customer owned data it was holding for as many as 800,000 of its customers:

"Microsoft said a server failure impacted the main and back-up databases. One theory is that the problems cropped up as Hitachi was doing work on the storage network that manages the Sidekick data."

http://news.cnet.com/8301-13860_3-10372921-56.html?tag=mncol;txt

OUCH!!!

Monday, June 1, 2009

Team Deploy failure with PSExec

Our automated build recently stopped remotely installing our services from the build server to the system test application server.  It was able to stop and restart the service, and it thought it was installing the services, but the install was not actually running.

Here is a sample of one of our command lines: 

TeamDeploy.exe /CONFIG:EODService.xml

Because the services installed properly when running the MSI from the application server itself, and because TeamDeploy depends on PSTools for remote deployments, I started looking at thePSTools: specifically PSKill and PSExec.

First I verified that pskill was working remotely by opening notepad on the application server and killing it from the build server:

pskill \\applicationServer notepad.exe

 

PsKill v1.03 - local and remote process killer

Copyright (C) 2000 Mark Russinovich

http://www.sysinternals.com

 

Process notepad.exe killed on applicationServer.

 

Next, I tried to verify that psexec was working properly:

 

psexec \\applicationServer "c:\windows\system32\ipconfig.exe"

 

PsExec v1.31 - execute processes remotely

Copyright (C) 2001-2002 Mark Russinovich

www.sysinternals.com

 

Error communicating with PsExec service on applicationServer:

No process is on the other end of the pipe.

 

It returned an error indicating there was no process on the other end of the pipe.  This seemed to indicate a problem with psexesvc.

Since psexesvc installs automatically when running psexec, I removed psexesvc from the application server [1]:

sc \\applicationServer stop psexesvc

SERVICE_NAME: psexesvc

        TYPE               : 10  WIN32_OWN_PROCESS

        STATE              : 3  STOP_PENDING

                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))

        WIN32_EXIT_CODE    : 0  (0x0)

        SERVICE_EXIT_CODE  : 0  (0x0)

        CHECKPOINT         : 0x2

        WAIT_HINT          : 0x0

 

sc \\applicationServer delete psexesvc

[SC] DeleteService SUCCESS

 

After cleaning up the psexesvc, I verified that psexec was working properly:

 

psexec \\applicationServer ipconfig

 

PsExec v1.31 - execute processes remotely

Copyright (C) 2001-2002 Mark Russinovich

www.sysinternals.com

 

 

 

Windows IP Configuration

 

 

Ethernet adapter Local Area Connection:

 

   Connection-specific DNS Suffix  . :

   Link-local IPv6 Address . . . . . : fe80::b5eb:e3

   IPv4 Address. . . . . . . . . . . : 10.2.15.171

   Subnet Mask . . . . . . . . . . . : 255.255.254.0

   Default Gateway . . . . . . . . . : 10.2.15.251

 

Tunnel adapter Local Area Connection* 8:

 

   Media State . . . . . . . . . . . : Media disconn

   Connection-specific DNS Suffix  . :

 

Tunnel adapter Local Area Connection* 9:

 

   Media State . . . . . . . . . . . : Media disconn

   Connection-specific DNS Suffix  . :

ipconfig exited on applicationServer with error code 0.

 

The final test of course was to run TeamDeploy.exe /CONFIG:EODService.xml from the build server, and it successfully installed our service remotely.  Our build is back in business!

 

 

[1]  http://forum.sysinternals.com/forum_posts.asp?TID=3935&PN=1&TPN=2#32755

Sunday, January 18, 2009

Leaky Dog


Our first puppy, Shelby

Thursday, January 15, 2009

Missing Database Report


Heat database disappears



OMAHA, Nebraska (DW) - In an unexpected turn of political events, the Heat database appears to have been dropped by a rival database faction.

In an interview with Heat's mother, Tempura, it was revealed that Heat had expressed concern for its well being after receiving a chain of threatening letters from an unnamed rival.  Ms. Ture told authorities that her offspring, Heat, has a stable background with nearly unrivaled up time.

While dropping a database is rare, this year has seen a rash of droppings, ranging from relative newcomers, likeProtivity3, to long established players, such as ISProjects and Project_CentralDB.

Friday, January 9, 2009

Compare Web Sites as Images Using Beyond Compare 3

I was having a discussion today with two of our web guys about how to easily compare similar (or identical) web pages in ways that a non-technical user would find useful.  Currently, our customers open the pages side by side and visually inspect them for differences.


I suggested taking a programmatic capture of each page and comparing the images.  Of course, the first question was “How would you do that?”  Being more of an idea person than actually knowing how to do anything useful, I just mentioned that is must be easy because so many website have hyperlinks that show thumbnail images of their target sites when you place your mouse over them (I really have no idea).


After spending some not-so-productive time with my friend Google, I decided that grabbing web sites as images was easier said than done.  However, while trying to figure the whole programmatic capture thing out, I did think of another easy way to compare two web sites that uses tools that we already have in-house.  Since I’m not a technically savvy kind of person, this technique should work well for anybody with access to an image compare tool (I used Beyond Compare 3 for this example).


To demonstrate, I’ll pick a web page to inspect for changes.  I like http://www.cropinsurancespecialists.com both because it’s clean and because the content “rotates.”  This allows me to take different screen shots without opening up another page.  First, open the page in a browser window and take a screenshot (Alt+PrtSc).  Paste the image into “Paint” and save the file.  I just used the default .bmp format.  Then, after the content rotates – for a second web site, you would just open that site here – take a screenshot and save it with the first image.


You can now open Beyond Compare 3 and do a “Picture Compare”:

 

Browse out to your previously saved images and select one for each side of the compare.  For this compare, I took two screen-shots of the cropinsurancespecialists.com website that were at the same stage of “rotation” 


As you can see in the first screen shot below, there is a small amount of difference in the IE tab section (not discernable to the eye), but the bodies of the pages are the same.  With a single glance at the compare screen, you can see these web pages are identical.  There is no going back and forth reading and visually comparing all the content on each site.


In the second screen shot, I compared one of the original page images with a second image that was in a different stage of “rotation”  As you can see, it not only shows large differences in the farm image, it also shows text differences very clearly, both actual copy changes and font changes, such as color.
 

Web page with no changes
 

 Web page with several changes (note how easy it is to identify text changes)

 

In about one minute I was able to go through three web sites, determine that two were identical and to identify the specific differences in the third.  All without complex tools that might hinder adoption.  I think this technique for comparing web sites will save our customers (and us!) money the very first time they use it.


Thursday, January 1, 2009

Derailed


Very unhappy derailer (the chain was bent, too). It came off the inside during a right-hand switchback and the chain drug it around the gears. The shop gave me a discount on the repair because they had just replaced both the chain and gears but "may" have failed to adjust the stop properly. The stop seemed to be fine on the test ride around their parking lot, but once I got out on the trails, it let me down. The stop is adjusted a lot better now!
Posted by Picasa