作者:朱金灿
在昨天运行每日构建时hudson突然出错,错误信息如下:
[MySoft3.1] $ cmd /c call "D:\ProgramFiles\Apache Software Foundation\Tomcat6.0\temp\hudson7759370013689135994.bat"
FATAL: command execution failed
java.io.IOException: Cannot run program"cmd" (in directory "E:\workspace\MySoft3.1"):CreateProcess error=1455, ???????С????¨?ê?
atjava.lang.ProcessBuilder.start(Unknown Source)
athudson.Proc$LocalProc.<init>(Proc.java:192)
athudson.Proc$LocalProc.<init>(Proc.java:164)
athudson.Launcher$LocalLauncher.launch(Launcher.java:639)
athudson.Launcher$ProcStarter.start(Launcher.java:274)
athudson.Launcher$ProcStarter.join(Launcher.java:281)
athudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:84)
athudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:60)
athudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
athudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630)
athudson.model.Build$RunnerImpl.build(Build.java:175)
athudson.model.Build$RunnerImpl.doRun(Build.java:137)
athudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
athudson.model.Run.run(Run.java:1366)
athudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
athudson.model.ResourceController.execute(ResourceController.java:88)
athudson.model.Executor.run(Executor.java:145)
Caused by: java.io.IOException:CreateProcess error=1455, ???????С????¨?ê?
atjava.lang.ProcessImpl.create(Native Method)
atjava.lang.ProcessImpl.<init>(Unknown Source)
atjava.lang.ProcessImpl.start(Unknown Source)
...17 more
Checking console output
[DEBUG] Skipping watched dependency updatefor build: BuildMySoft #1923 due to result: FAILURE
Finished: FAILURE
初步分析是hudson无法创建一个编译进程而出错。之前运行得好好的,为什么会这样呢?上网搜索了一下,网上有篇相关帖子:java-io-ioexception-cannot-run-program-cmd-exe-createprocess-error-5-access-denied,初步判断是权限问题,。我回忆了一下之前在服务器上做了什么动作,想到最近在服务器上安装了360杀毒,于是把360杀毒卸载了,果然就好了。360杀毒还能禁止tomcat用户启动命令行,这真是一个神奇的杀毒软件!