Hudson cannot find powershell after update to powershell 3 -
one of jobs had need convertto-json
commandlet available in powershell 3.0 i installed wmf 3.0 on our windows server 2008 r2 (sp1) box. after restart powershell using jobs result in error:
[workspace] $ powershell.exe "& 'c:\users\hudson~1\appdata\local\temp\hudson1263303013566726397.ps1'" system cannot find file specified fatal: command execution failed java.io.ioexception: cannot run program "powershell.exe" (in directory "c:\hudson\jobs\myproject\workspace"): createprocess error=2, system cannot find file specified @ java.lang.processbuilder.start(processbuilder.java:1029) @ hudson.proc$localproc.<init>(proc.java:192) @ hudson.proc$localproc.<init>(proc.java:164) @ hudson.launcher$locallauncher.launch(launcher.java:639) @ hudson.launcher$procstarter.start(launcher.java:274) @ hudson.launcher$procstarter.join(launcher.java:281) @ hudson.tasks.commandinterpreter.perform(commandinterpreter.java:84) @ hudson.tasks.commandinterpreter.perform(commandinterpreter.java:60) @ hudson.tasks.buildstepmonitor$1.perform(buildstepmonitor.java:19) @ hudson.model.abstractbuild$abstractrunner.perform(abstractbuild.java:630) @ hudson.model.build$runnerimpl.build(build.java:175) @ hudson.model.build$runnerimpl.dorun(build.java:137) @ hudson.model.abstractbuild$abstractrunner.run(abstractbuild.java:429) @ hudson.model.run.run(run.java:1366) @ hudson.model.freestylebuild.run(freestylebuild.java:46) @ hudson.model.resourcecontroller.execute(resourcecontroller.java:88) @ hudson.model.executor.run(executor.java:145) caused by: java.io.ioexception: createprocess error=2, system cannot find file specified @ java.lang.processimpl.create(native method) @ java.lang.processimpl.<init>(processimpl.java:188) @ java.lang.processimpl.start(processimpl.java:132) @ java.lang.processbuilder.start(processbuilder.java:1021) ... 16 more
running powershell.exe
cmd prompt works fine.
what happened? how fix this?
i using powershell plugin launch scripts , cannot find configuration area it.
after day's worth of hassle found answer. we're still not sure why happened powershell directory disappeared hudson's path. then, although ps3 installed , machine had been restarted, hudson reason had not picked new path variable.
manually shutting down , restarting hudson got pick correct path , fixed issue.
Comments
Post a Comment