2015-09-10 85 views
-1

我試圖與Jenkins建立一個SonarQube工作,甚至在開始的時候它工作,現在它失敗,出現以下異常。Jenkins建築SonarQube

My Jenkins和SonarQube實例在Windows 2008 Server R2 Enterprise上工作。

ERROR: Error during Sonar runner execution 
org.sonar.runner.impl.RunnerException: Unable to execute Sonar 
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) 
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) 
at java.security.AccessController.doPrivileged(Native Method) 
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) 
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) 
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) 
at org.sonar.runner.api.Runner.execute(Runner.java:100) 
at org.sonar.runner.Main.executeTask(Main.java:70) 
at org.sonar.runner.Main.execute(Main.java:59) 
at org.sonar.runner.Main.main(Main.java:53) 
Caused by: java.lang.IllegalStateException: Cannot analyse the file 'D:\Appl\CI\Jenkins\workspace\AWSE1Modules\A4_VolSurfHelper.py', details: 'org.sonar.api.utils.command.CommandException: java.io.IOException: Cannot run program "pylint": CreateProcess error=2, The system cannot find the file specified' 
at org.sonar.plugins.python.pylint.PylintSensor.analyse(PylintSensor.java:91) 
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) 
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) 
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) 
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) 
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93) 
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78) 
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) 
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) 
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) 
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93) 
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78) 
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) 
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) 
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) 
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93) 
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78) 
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) 
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) 
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) 
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) 
... 9 more 
Caused by: org.sonar.api.utils.command.CommandException: java.io.IOException: Cannot run program "pylint": CreateProcess error=2, The system cannot find the file specified 
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:98) 
at org.sonar.plugins.python.pylint.PylintArguments.pylintVersion(PylintArguments.java:47) 
at org.sonar.plugins.python.pylint.PylintArguments.<init>(PylintArguments.java:39) 
at org.sonar.plugins.python.pylint.PylintIssuesAnalyzer.<init>(PylintIssuesAnalyzer.java:46) 
at org.sonar.plugins.python.pylint.PylintSensor.analyzeFile(PylintSensor.java:102) 
at org.sonar.plugins.python.pylint.PylintSensor.analyse(PylintSensor.java:81) 
... 34 more 
     Caused by: java.io.IOException: Cannot run program "pylint": CreateProcess error=2, The system cannot find the file specified 
at java.lang.ProcessBuilder.start(Unknown Source) 
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:68) 
... 39 more  Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified 
at java.lang.ProcessImpl.create(Native Method) 
at java.lang.ProcessImpl.<init>(Unknown Source) 
at java.lang.ProcessImpl.start(Unknown Source) 
... 41 more 
ERROR:  
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging. 
Build step 'Invoke Standalone SonarQube Analysis' marked build a failure 

     Finished: FAILURE 

回答

0

看起來你有enabled pylint根據規則,將need to install它。請參閱第一個鏈接中的第4步(可選),其中提到了這一點。

+0

我已經在該服務器上安裝了pylint,但似乎sonarqube找不到exe。我在哪裏定義? – Krasnars

+0

在您的路徑上找到它嗎? –

+0

現在它可以工作,但它需要將近2個小時,而沒有pylint需要5分鐘。 – Krasnars