Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure Hudson to checkout my site's sources from Mercurial but it throws an exception. The /var/lib/hudson/jobs/jobname directory does exist, and I can create a workspace directory in there (even after su hudson), but as soon as I run the Hudson job again this directory disappears and the job ends with the same error: Cannot run program "hg" (in directory "/var/lib/hudson/jobs/jobname/workspace"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(
    at hudson.Proc$LocalProc.<init>(
    at hudson.Proc$LocalProc.<init>(
    at hudson.Launcher$LocalLauncher.launch(
    at hudson.Launcher$ProcStarter.start(
    at hudson.Launcher$ProcStarter.join(
    at hudson.plugins.mercurial.MercurialSCM.joinWithPossibleTimeout(
    at hudson.plugins.mercurial.HgExe.popen(
    at hudson.plugins.mercurial.HgExe.tip(
    at hudson.plugins.mercurial.MercurialSCM.calcRevisionsFromBuild(
    at hudson.scm.SCM._calcRevisionsFromBuild(
    at hudson.model.AbstractProject.calcPollingBaseline(
    at hudson.model.AbstractProject.checkout(
    at hudson.model.AbstractBuild$AbstractRunner.checkout(
    at hudson.model.AbstractBuild$
    at hudson.model.ResourceController.execute(
Caused by: error=2, No such file or directory
    at java.lang.UNIXProcess.<init>(
    at java.lang.ProcessImpl.start(
    at java.lang.ProcessBuilder.start(

Running on Debian 6.0.1

I wonder if anyone has ran into this before, and hopefully solved it?

share|improve this question

Duh, I overlooked this message in the output:

$ hg clone --rev default http://frodo/cgi-bin/hgwebdir.cgi/projectname "/var/lib/hudson/jobs/jobname/workspace" abort: unknown revision 'default'!

I had run hg init on the project, but not hg add and hg commit, so there was nothing to clone!

After adding and committing the files all went well....

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.