6 steps to update Jenkins Slave Agents on Windows

After having updated Jenkins to the latest Long Term Service release (1.509.4) I wanted to ensure the Windows Slave Agents that we’ve got running were up to date. The Windows Slave agents had previously been installed using the Java Web Start process and then turned into Windows Service slave agents.

To reinstall the Slave Agents we had to do the following:

  1. Stop the ‘Jenkins Slave’ Windows service
  2. Launch a Command Prompt (ensuring its run as an Administrator)
  3. type the following (assuming your Slave Agent was installed at c:\jenkins)
    • sc delete jenkinsslave-c__jenkins
  4. Browse to your Node definition on your Master Jenkins instance in a web browser (Jenkins -> Manage Jenkins -> Manage Nodes -> Node)
  5. Click the Java Web Start process & run it on your Slave machine
  6. Select the option to install as a Windows Service from the File menu.

The ‘magic sauce’ was finding the ‘sc delete’ command which allowed us to quickly upgrade all of our Windows Slaves.

Hope it helps you maintain your Jenkins instances.


Getting Windows Git Bash to Hitch

On a Windows 7 machine that already had Windows Git bash version 1.7.9-preview20120201 on it, I wanted to add ‘hitch’. Hitch is a great little Ruby program that manipulates the Git author settings to properly attribute pair programming work. Rather than a commit having a single author, Hitch creates a unique email address from a known base email address and adding the pair names after a + symbol.

This is useful as when we push code up to GitHub it becomes clear which pair have been working on a task. You can also create a Gravatar for the unique concatenated email address so the pair combination can have their own logo too.

The installation is simple: gem install ruby. The Windows machine didn’t have Ruby on it so I went to Ruby Installers for Windows and downloaded v1.9.3-p125. make sure you tick the box in the install wizard to add the Ruby executables to your PATH. When Git Bash starts it’s loaded with the Windows PATH settings anyway so it should be able to find Ruby to install hitch.

Hitch itself is a breeze to setup using your GitHub usernames.
hitch username1 username2

Hitch will ask if you want to add the usernames to its local hitch_pairs files to save you entering their full name again. Enter their full name and you’re good to go. Now each subsequent git commit will have the correct author information. Pair programming is great and Hitch allows both members of the pair to have their work attributed.


Foreign Raspberries

The exciting Raspberry Pi project is nearing fruition but it seems their attempts to boost the UK economy by getting the boards made over here has been thwarted by lead times and an insane tax law.

It seems UK manufacturers end up paying tax on components, but if they get the boards made overseas and then shipped over then that’s ok because they’re completed products rather than raw materials. Bottom line is that this insanity means that foreign outsourcing of manufacturing gets even more attractive.

So in these times of austerity it would seem the sensible thing to do to support UK manufacturing by lobbying for a change in those tax laws. We have a lot of manufacturing talent in the UK and we should be supporting it.

If you want to support a lobby on this issue there’s an e-Petition been set up to register your support at http://submissions.epetitions.direct.gov.uk/petitions/27158

Are your contacts portable?

Spare Office by sidewalk_flying (Flickr)

With an increasing amount of technology to help you communicate, the job of keeping your multiple contact lists up-to-date across these devices and services has mainly fallen to you.

Contact information lurks in many places and is often locked to serve one purpose. Whether it’s contact details in your mobile phone; on the address book in your email client at work or the list of friends you’ve built up on social media.

This post introduces Portable Contacts as a solution to getting access to these distinct collections of your contacts to avoid needing to duplicate them.

Continue reading

1&1 domain transfer status: ‘Domain Update Done’

In the process of moving a .co.uk domain over to 1&1 for someone this week, I encountered the undocumented status code of ‘Domain Update Done’.

The domain had previously shown as ‘Ready’ in the control panel and I was able to set the server and mailserver for them using 1&1′s nameserver.

The gotcha is that during the ‘Domain Update Done’ status you can’t swap the nameserver settings. You can still get to change the A and MX records with 1&1′s Nameserver but if you wanted to point it to an external nameserver you’ll have to wait until this status clears.

The official word I got from 1&1 support says : “Domain Update Done status means that a domain is already on its last phase of propagation and normally, this will take 24-48 hours.”

So just be warned that if you want to change your initial settings when transferring a domain, you might get locked out while the domain is being finalised on your account.

Fixing MSDTC between two machines on different domains

I’ve been chasing problems with MSDTC today. We were trying to get one machines on a different domain to use MSDTC through COM+ to talk to a remote SQL Server on a different domain.

Select / Read operations seemed to work fine but when it attempted to use an UPDATE method in a transaction, it failed with an exception saying

COM+ was unable to talk to the Microsoft Distributed
Transaction Coordinator (Exception from HRESULT: 0x8004E00F)

The following information describes my eventual journey to success.

Continue reading

Google Contacts throws a gauntlet at Facebook?

Given the size Facebook has grown to, it has an obvious ‘elephant in the corner’ for those willing to step back from their time-line for a minute.  Those users who are only interested in friends, photos and now location-based checkins too might miss the fact that Facebook is data-mining on a grand scale.

The debate about the public visibility of your data has grabbed the media’s attention. What’s given less coverage is the missing ability for you to easily use and share the data you’ve chosen to store with Facebook elsewhere on the internet.

Google have recently changed their terms of service on their Contacts API in a seemingly simple way, but with hopefully bigger consequences. GigaOm summised in their article about this by saying “Third-party apps and services can’t pull data from Google without allowing Google to do the same with their data”.

We shall have to see whether linking with Google Contacts in Gmail etc. to find new friends to connect to on Facebook is enough to force Facebook to apply a can-opener to their own APIs.

Thanks to Adam Bird for sending me a link to the GigaOm story.

Shutting down log4net repositories

I’ve been learning and evaluating the Gibraltar ‘Runtime intelligence’ & logging application recently. If you’re already using log4net, there’s a very low impact route to adopting its many benefits by using their simple Gibraltar Appender.

In knocking up a quick sample application to test, I had setup and configured my Log4Net logger:

public class Program
  private static readonly ILog Log = 
  static int Main(string[] args)
    if (!LogManager.GetRepository().Configured)

The simple application went on to output some simple log lines to test using the Gibraltar appender. All was fine, except this simple console application appeared to hang on exit. I quit the running application and Gibraltar dutifully announced that my session had Crashed.

A bit of headscratching later made me realise that I needed to be a better Log4Net citizen in my sample application. I had omitted the line:


Now my code properly stopped its logging activities before the program exited and Gibraltar was able to report successfully. The Log4Net RollingFileAppender or ConsoleAppenders don’t complain like this on program exit if the repository isn’t shutdown first but it does makes sense to tidy up after yourself rather than relying on the garbage collector.

I’ll write more about my positive experiences of Gibraltar in another post, but just wanted to share this in case any early adopters faced the same ‘facepalm’.

TDD, Visual Studio 2010 & BadImageFormatException

Just had a very strange run-in with Visual Studio 2010 throwing a BadImageFormatException. Just to set the scene I’ve got Visual Studio 2010 running on a Windows XP 64-bit machine.

My solution has a Console Application and a few Class Libraries; one of which is for Integration Tests using StoryQ and another which is for my unit tests classes.

Running my Console application works fine on its own, but as soon as I either ran the Unit Tests or got Resharper to run my Integration Tests, I was hitting a BadImageFormatException. It could not load my console application (or one of its dependencies).

A bit of blog searching found an forum thread which talks about how a new c# console application targets x86 by default. I think the combination of it attempting to run my console application in x86 and my test libraries on the 64-bit environment was causing a battle of wills.

The solution is to go into your console application Properties and switch to the Build tab. Then make sure that for both Debug and Release configurations that your Platform Target is set to “Any CPU” rather than “x86″.

This then allows your TDD to continue unchallenged by assumed defaults and the use of a 64-bit OS.