Matt Gornick's Blog

a day in the life of an entrepreneur

Hostname resolution errors on CruiseControl.rb on Ubuntu 9.04

leave a comment »

I finally resolved an error I’ve been having with CruiseControl.rb with our Ruby on Rails project in Subversion (SVN).  Currently we use RoR with Cucumber for our BDD and CruiseControl.rb as the CI environment.  Below are the steps I’ve taken and the final resolution to fix the problem:

1. Setup Ubuntu Server 9.04 (grab all the necessary gems, subversion, db, etc.)
2. After downloading the source from http://cruisecontrolrb.thoughtworks.com/
3. cd ~/cruisecontrol-1.4.0
4. ./cruise add ProjectName –repository ‘https://projectpath.com/trunk‘ -s subversion –username cruisecontrol –password secretpassword
At this point, the code properly checked out of subversion and I didn’t receive any errors.
5. cd ~/.cruise/projects/ProjectName/
6. edit cruise _config.rb and uncomment project.rake_task = ‘features’
This will build using the ‘cucumber features’ tests
7. cd ~/cruisecontrol-1.4.0 and run ./cruise start
At this point the CruiseControl.rb server is supposed to startup, svn update your projects, and run a build if necessary.  I notice that I received errors:
svn –non-interactive log –limit 1 –revision HEAD:1 –verbose –xml
Host not found

I went into the ~/.cruise/projects/ProjectName/work/ directory and ran a svn update and it would intermittently work and other times return “host not found”.
8. Since this appeared to be a DNS issue I modified the DNS entries via:
sudo vi /etc/resolv.conf
modified and added a line for 4.2.2.2 (Verizon’s public DNS server).
9. I reran step 7 and magically my CruiseControl.rb build ran successfully

Advertisement

Written by mattgornick

July 16, 2009 at 2:17 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.