2016-08-26 4 views
2

私はJohn Fergusonの "Jenkins the definitive guide"に従ってJenkinsを勉強しようとする初心者です。 githubからサンプルプロジェクト "gameoflife"をダウンロードし、Maven、Git、Java jdkの初期設定をしました。しかし、私が最初にビルドプロセスを開始するとき、プロジェクトは合格しています。しかし、私はビルド失敗メッセージを取得し続けている。私がジェンキンスにとって初めての人なので、私は何が間違っていたのか、それをどう修正するのかは分かりません。プロジェクト "gameoflife"の初期構築中に問題が発生しましたjohn fergusonの "jenkins the definitive guide"の後に

下記の障害メッセージのコピーを添付しました。

Started by an SCM change 
Building in workspace C:\Users\Justin\.jenkins\workspace\gameoflife-default 
Installing C:\Users\Justin\.jenkins\tools\hudson.model.JDK\jdk.exe 
[hudson.model.JDK] $ C:\Users\Justin\.jenkins\tools\hudson.model.JDK\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Users\Justin\.jenkins\tools\hudson.model.JDK /L C:\Users\Justin\.jenkins\tools\install5268142390914952134log 
java.io.IOException: Cannot run program "C:\Users\Justin\.jenkins\tools\hudson.model.JDK\jdk.exe" (in directory "C:\Users\Justin\.jenkins\tools\hudson.model.JDK"): CreateProcess error=740, The requested operation requires elevation 
    at java.lang.ProcessBuilder.start(Unknown Source) 
    at hudson.Proc$LocalProc.<init>(Proc.java:240) 
    at hudson.Proc$LocalProc.<init>(Proc.java:212) 
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) 
    at hudson.Launcher$ProcStarter.start(Launcher.java:381) 
    at hudson.Launcher$ProcStarter.join(Launcher.java:388) 
    at hudson.tools.JDKInstaller.install(JDKInstaller.java:271) 
    at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:144) 
    at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) 
    at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) 
    at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) 
    at hudson.model.JDK.forNode(JDK.java:144) 
    at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:357) 
    at hudson.model.Run.getEnvironment(Run.java:2232) 
    at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:922) 
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1090) 
    at hudson.scm.SCM.checkout(SCM.java:485) 
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) 
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
    at hudson.model.Run.execute(Run.java:1741) 
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
    at hudson.model.ResourceController.execute(ResourceController.java:98) 
    at hudson.model.Executor.run(Executor.java:410) 
Caused by: java.io.IOException: CreateProcess error=740, The requested operation requires elevation 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(Unknown Source) 
    at java.lang.ProcessImpl.start(Unknown Source) 
    ... 25 more 
Archiving artifacts 
ERROR: Failed to archive artifacts: **/target/*.jar 
java.io.IOException: Unable to delete 'C:\Users\Justin\.jenkins\tools\hudson.model.JDK'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. 
    at hudson.Util.deleteFile(Util.java:257) 
    at hudson.FilePath.deleteRecursive(FilePath.java:1231) 
    at hudson.FilePath.access$1000(FilePath.java:195) 
    at hudson.FilePath$14.invoke(FilePath.java:1201) 
    at hudson.FilePath$14.invoke(FilePath.java:1198) 
    at hudson.FilePath.act(FilePath.java:1018) 
    at hudson.FilePath.act(FilePath.java:996) 
    at hudson.FilePath.deleteRecursive(FilePath.java:1198) 
    at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:133) 
    at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) 
    at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) 
    at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) 
    at hudson.model.JDK.forNode(JDK.java:144) 
    at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:357) 
    at hudson.model.Run.getEnvironment(Run.java:2232) 
    at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:922) 
    at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:234) 
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) 
    at hudson.model.Build$BuildExecution.post2(Build.java:185) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) 
    at hudson.model.Run.execute(Run.java:1766) 
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
    at hudson.model.ResourceController.execute(ResourceController.java:98) 
    at hudson.model.Executor.run(Executor.java:410) 
Caused by: java.nio.file.DirectoryNotEmptyException: C:\Users\Justin\.jenkins\tools\hudson.model.JDK 
    at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) 
    at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source) 
    at java.nio.file.Files.deleteIfExists(Unknown Source) 
    at hudson.Util.tryOnceDeleteFile(Util.java:296) 
    at hudson.Util.deleteFile(Util.java:252) 
    ... 26 more 
Recording test results 
ERROR: Step ‘Publish JUnit test result report’ aborted due to exception: 
java.io.IOException: Unable to delete 'C:\Users\Justin\.jenkins\tools\hudson.model.JDK'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. 
    at hudson.Util.deleteFile(Util.java:257) 
    at hudson.FilePath.deleteRecursive(FilePath.java:1231) 
    at hudson.FilePath.access$1000(FilePath.java:195) 
    at hudson.FilePath$14.invoke(FilePath.java:1201) 
    at hudson.FilePath$14.invoke(FilePath.java:1198) 
    at hudson.FilePath.act(FilePath.java:1018) 
    at hudson.FilePath.act(FilePath.java:996) 
    at hudson.FilePath.deleteRecursive(FilePath.java:1198) 
    at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:133) 
    at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) 
    at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) 
    at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) 
    at hudson.model.JDK.forNode(JDK.java:144) 
    at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:357) 
    at hudson.model.Run.getEnvironment(Run.java:2232) 
    at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:922) 
    at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:146) 
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) 
    at hudson.model.Build$BuildExecution.post2(Build.java:185) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) 
    at hudson.model.Run.execute(Run.java:1766) 
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
    at hudson.model.ResourceController.execute(ResourceController.java:98) 
    at hudson.model.Executor.run(Executor.java:410) 
Caused by: java.nio.file.DirectoryNotEmptyException: C:\Users\Justin\.jenkins\tools\hudson.model.JDK 
    at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) 
    at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source) 
    at java.nio.file.Files.deleteIfExists(Unknown Source) 
    at hudson.Util.tryOnceDeleteFile(Util.java:296) 
    at hudson.Util.deleteFile(Util.java:252) 
    ... 26 more 
Finished: FAILURE 
+0

どのJenkinsバージョンを使用していますか? –

+0

最新のジーンズを使用しています、2.7.4.war – Thor

答えて

3

関連するエラーメッセージが

Cannot run program "C:\Users\Justin\.jenkins\tools\hudson.model.JDK\jdk.exe" 
(in directory "C:\Users\Justin\.jenkins\tools\hudson.model.JDK"): 
CreateProcess error=740, The requested operation requires elevation 
    at java.lang.ProcessBuilder.start(Unknown Source) 

Caused by: java.io.IOException: CreateProcess error=740, 
The requested operation requires elevation 
    at java.lang.ProcessImpl.create(Native Method) 

あるコールスタックは

hudson.tools.JDKInstaller.install 

試してみて、あなたのジェンキンスの構成を確認し、"Install automatically" selected in either your job or in Jenkins "Configure System" main settings sectionがあるかどうかを確認することを含みます。

https://www.safaribooksonline.com/library/view/jenkins-the-definitive/9781449311155/httpatomoreillycomsourceoreillyimages864759.png

そのオプションの選択を解除あなたを確認して、すでに(Ferguson's exampleを以下の前に)インストールされているJDKのパスを参照します。

+0

ありがとうございました。あなたはジンキンズをかなりよくしているようですが、ジンキンズを学ぶための最善の学習方法は何ですか?一般的な継続的な統合?あなたの助けをもう一度ありがとう!心から感謝する! – Thor

+0

btw私は10時間の時間であるので、私が許可するとすぐに賞金ポイントを出します – Thor

+0

@トニースタークありがとう。私は現在のミッションでジェンキンスのインスタンスを担当しているので、多くの助けになります。私は一般的に、これらのツールを職場で学びます(そしてStack Overflowに関する質問に答えてください:http://stackoverflow.com/search?tab=newest&q=user%3a6309%20%5bjenkins%5d) – VonC

関連する問題