2016-10-25 8 views
0

msbuildスキャナを使用してSonarQube分析をローカルで実行しようとしています。MSBuild.SonarQube.Runner.exeがhttps://sonarqube.comにアクセスできない

MSBuild.SonarQube.Runner.exe begin /key:"CanoePoloLeagueOrganiser" /name:"CanoePoloLeagueOrganiser" /version:"1.0.0"は問題なく電話できます。

msbuildの手順("C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" "C:\Users\ceddl\Documen ts\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiser.sln")を問題なく実行することもできます。

しかし、私がMSBuild.SonarQube.Runner.exe endを呼び出すと失敗します。

私は完全なデバッグログの出力を有効にして、多くのグーグルを行い、生成されたファイルを見ましたが、それは私にはうまくいくようです。私はxmlファイルにあるトークンを生成しました。curlhttps://sonarqube.comという問題はないので、ファイアウォールの問題とは思われません。 javax.net.ssl.SSLHandshakeException

これは、私はそれはSSLの問題だ

SonarQube Scanner for MSBuild 2.1 
Default properties file was found at C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\tools\sonar\SonarQube.Analysis.xml 
Loading analysis properties from C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\tools\sonar\SonarQube.Analysis.xml 
sonar.verbose=true was specified - setting the log verbosity to 'Debug' 
Post-processing started. 
Using environment variables to determine the download directory... 
Executing file C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin\MSBuild.SonarQube.Internal.PostProcess.exe 
    Args: 
    Working directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube 
    Timeout (ms):-1 
    Process id: 8236 
SonarQube Scanner for MSBuild End Step 2.1 
22:01:54.73 sonar.verbose=true was specified - setting the log verbosity to 'Debug' 
22:01:54.734 Loading the SonarQube analysis config from C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\conf\SonarQubeAnalysisConfig.xml 
22:01:54.734 Not running under TeamBuild 
22:01:54.734 Analysis base directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube 
Build directory: 
Bin directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin 
Config directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\conf 
Output directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\out 
Config file: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\out 
Generating SonarQube project properties file to C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\out\sonar-project.properties 
The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiserXamarin\bin\Debug\CanoePoloLeagueOrganiserXamarin.dll.RoslynCA.json 
The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiser\bin\Debug\CanoePoloLeagueOrganiser.dll.RoslynCA.json 
The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\XamarinFormsPortable\XamarinFormsPortable.Droid\bin\Debug\XamarinFormsPortable.Droid.dll.RoslynCA.json 
The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\XamarinFormsPortable\XamarinFormsPortable\bin\Debug\XamarinFormsPortable.dll.RoslynCA.json 

WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\AppData\Local\Temp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiserTests\CanoePoloLeagueOrganiserTests.csproj 

WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\packages\xunit.runner.visualstudio.2.1.0\build\_common\xunit.runner.visualstudio.testadapter.dll, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiserTests\CanoePoloLeagueOrganiserTests.csproj 
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\packages\xunit.runner.visualstudio.2.1.0\build\_common\xunit.runner.utility.desktop.dll, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiserTests\CanoePoloLeagueOrganiserTests.csproj 
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\packages\xunit.runner.visualstudio.2.1.0\build\_common\xunit.abstractions.dll, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiserTests\CanoePoloLeagueOrganiserTests.csproj 
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\AppData\Local\Temp\MonoAndroid,Version=v6.0.AssemblyAttributes.cs, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiserXamarin\CanoePoloLeagueOrganiserXamarin.csproj 

WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\AppData\Local\Temp\.NETPortable,Version=v4.5,Profile=Profile111.AssemblyAttributes.cs, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiser\CanoePoloLeagueOrganiser.csproj 
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\AppData\Local\Temp\MonoAndroid,Version=v6.0.AssemblyAttributes.cs, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\XamarinFormsPortable\XamarinFormsPortable.Droid\XamarinFormsPortable.Droid.csproj 
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\ceddl\AppData\Local\Temp\.NETPortable,Version=v4.5,Profile=Profile111.AssemblyAttributes.cs, project: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\XamarinFormsPortable\XamarinFormsPortable\XamarinFormsPortable.csproj 
Setting analysis property: sonar.visualstudio.enable=false 
Writing processing summary to C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\out\ProjectInfo.log 
Removing the existing directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin\sonar-scanner 
Creating directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin\sonar-scanner 
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m 
Calling the SonarQube Scanner... 
Setting environment variable 'SONAR_SCANNER_OPTS'. Value: -Xmx1024m 
Executing file C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin\sonar-scanner\bin\sonar-scanner.bat 
    Args: -Dproject.settings=C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\out\sonar-project.properties -e <sensitive data removed> 
    Working directory: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser 
    Timeout (ms):-1 
    Process id: 3228 
C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin\sonar-scanner\bin\.. 
INFO: Scanner configuration file: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\bin\sonar-scanner\bin\..\conf\sonar-scanner.properties 
INFO: Project root configuration file: C:\Users\ceddl\Documents\GITHub\CanoePoloLeagueOrganiser\.sonarqube\out\sonar-project.properties 
INFO: SonarQube Scanner 2.6 
INFO: Java 1.7.0_71 Oracle Corporation (32-bit) 
INFO: Windows 8.1 6.3 x86 
INFO: SONAR_SCANNER_OPTS=-Xmx1024m 
INFO: Error stacktraces are turned on. 
INFO: User cache: C:\Users\ceddl\.sonar\cache 
DEBUG: Extract sonar-scanner-api-batch in temp... 
DEBUG: Get bootstrap index... 
DEBUG: Download: https://sonarqube.com/batch_bootstrap/index 
INFO: ------------------------------------------------------------------------ 
ERROR: SonarQube server [https://sonarqube.com] can not be reached 
INFO: EXECUTION FAILURE 
INFO: ------------------------------------------------------------------------ 
INFO: Total time: 0.797s 
INFO: Final Memory: 3M/15M 
ERROR: Error during SonarQube Scanner execution 
INFO: ------------------------------------------------------------------------ 
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube 
     at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84) 
     at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71) 
     at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67) 
     at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218) 
     at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156) 
     at org.sonarsource.scanner.cli.Main.execute(Main.java:70) 
     at org.sonarsource.scanner.cli.Main.main(Main.java:60) 
Caused by: java.lang.IllegalStateException: Fail to download libraries from server 
     at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93) 

     at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70) 
     at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39) 
     at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75) 
     ... 8 more 
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 
     at sun.security.ssl.Alerts.getSSLException(Unknown Source) 
     at sun.security.ssl.Alerts.getSSLException(Unknown Source) 
     at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source) 
     at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) 
     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) 
     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 
     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connectTls(Connection.java:239) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connectSocket(Connection.java:201) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connect(Connection.java:172) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connectAndSetOwner(Connection.java:358) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:117) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Call.getResponse(Call.java:276) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:234) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Call.getResponseWithInterceptorChain(Call.java:196) 
     at org.sonarsource.scanner.api.internal.shaded.okhttp.Call.execute(Call.java:79) 
     at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:114) 
     at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99) 
     at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78) 

     ... 11 more 
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. 
Process returned exit code 1 
The SonarQube Scanner did not complete successfully 
22:01:55.932 Creating a summary markdown file... 
Process returned exit code 1 
Post-processing failed. Exit code: 1 

おかげ

Cedd

答えて

1

を得る出力されます。最も可能性の高い原因:(古い)Java 7 JVMはTLS v1.2を使用していません。

Java 7のJVM設定を修正する必要はありません。Java 7は、SonarQube(requirementsを参照)でサポートされていません。

ボトムライン:

  • それでもSSL関連の例外を取得した場合、その後(SONAR_SCANNER_OPTS環境変数で)-Djavax.net.debug=allでのJava-SSLのデバッグログを有効にするJava 8
  • を使用してくださいルートで理解します原因
+0

ありがとうございました。 Javaはほぼ毎日更新されますが、古いバージョンのメジャーバージョンではないとは思いません。 – cedd

関連する問題