hg clone fails, hg pull succeeds

487 views
Skip to first unread message

Ron

unread,
Feb 13, 2012, 2:42:45 PM2/13/12
to Jenkins Users
Hello,

I'm having some issues with my Jenkins install with a protected HG
repository and the stack trace from Jenkins is included below. Once
we set up the deny_push and deny_read options on our mercurial
repository Jenkins starting having issues cloning. We have the
username and password set in our user .hgrc and running hg from the
command line works just fine. On Jenkins our builds had the Delete
workspace before build starts option enabled. Leaving this unchecked
mitigates avoids the clone issue but it's still an issue. To work
around we did the clone manually once and then unchecked the Delete
workspace option option. Do we have something configured incorrectly?
Has anyone else had issues with the hg clone command running on a
slave?

-- ERROR --

Started by timer
ln -s 2012-02-13_08-00-51 /Sonar/builds/95 failed: -1
Building remotely on Slave
$ hg clone --rev default --noupdate http://my-server/hg/bundles/
c:\jenkins\workspace\Sonar
abort: http authorization required
ERROR: Failed to clone http://my-server/hg/bundles
WARN: Revision data for previous build unavailable; unable to
determine change log
[Sonar] $ hg log --rev . --template {node}
java.io.IOException: Cannot run program "hg" (in directory
"c:\jenkins\workspace\Sonar"): CreateProcess error=267, The directory
name is invalid
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:698)
at hudson.Launcher$ProcStarter.start(Launcher.java:329)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:923)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:890)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=267, The directory
name is invalid
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 17 more
Skipping sonar analysis due to bad build status FAILURE
Finished: FAILURE

-- SUCCESS --

Started by user cmtest
ln -s 2012-02-13_16-38-40 /Sonar/builds/96 failed: -1
Building remotely on Slave
[Sonar] $ hg showconfig paths.default
[Sonar] $ hg pull --rev default
[Sonar] $ hg update --clean --rev default
745 files updated, 0 files merged, 0 files removed, 0 files unresolved
[Sonar] $ hg --config extensions.purge= clean --all

Thank you!
-- Ron

Ron

unread,
Mar 12, 2012, 12:03:23 PM3/12/12
to Jenkins Users
[SOLVED]

Our slave instance was running as a Windows service under an anonymous
account so it wasn't picking up any of our authentication
information. Once the service was configured to run as our CI user
account everything worked as expected.

Side issue: Jenkins failed silently on a hg update if the clone was
already in the correct location and continued to build as if nothing
had erred. There should be some better feedback if the hg commands
fail.

Hope this helps someone!

-- Ron

On Feb 13, 2:42 pm, Ron <ronald.hor...@gmail.com> wrote:
> Hello,
>
> I'm having some issues with my Jenkins install with a protected HG
> repository and the stack trace from Jenkins is included below.  Once
> we set up the deny_push and deny_read options on ourmercurial
> repository Jenkins starting having issues cloning.  We have the
> username and password set in our user .hgrc and running hg from the
> command line works just fine.  On Jenkins our builds had the Delete
> workspace before build starts option enabled.  Leaving this unchecked
> mitigates avoids thecloneissue but it's still an issue.  To work
> around we did theclonemanually once and then unchecked the Delete
> workspace option option. Do we have something configured incorrectly?
> Has anyone else had issues with the hgclonecommand running on a
> slave?
>
> -- ERROR --
>
> Started by timer
> ln -s 2012-02-13_08-00-51 /Sonar/builds/95 failed: -1
> Building remotely on Slave
> $ hgclone--rev default --noupdatehttp://my-server/hg/bundles/
> c:\jenkins\workspace\Sonar
> abort: http authorization required
> ERROR: Failed toclonehttp://my-server/hg/bundles
Reply all
Reply to author
Forward
0 new messages