升級到3.5.1後,我們的Sonar在我們的一臺子機(我們有1個主機和3個從機)中顯示INVALID HASH錯誤。我發現C:\ Users \ xxxxx.sonar \ cache_tmp下的所有文件大小爲零。但是像C:\ Users \ xxxxx.sonar \ cache \ 1b8de6f094e072c092b4ef1b332fdbf0這樣的其他目錄仍然具有文件(如commons-dbcp-1.3.jar)並且該文件是正確的。聲納無效散列
這是錯誤信息,有沒有什麼建議呢?
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXXXXXXX: Can not execute Sonar: INVALID HASH: File C:\Users\xxxxx\.sonar\cache\_tmp\1374226573512-28 was expected to have hash 099c91d9bb47f3c7f98b0e1825f593df but was downloaded with hash d41d8cd98f00b204e9800998ecf8427e -> [Help 1]
17:36:11 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXXXXXXX: Can not execute Sonar
17:36:11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
17:36:11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
17:36:11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
17:36:11 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
17:36:11 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
17:36:11 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
17:36:11 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
17:36:11 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
17:36:11 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:36:11 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17:36:11 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:36:11 at java.lang.reflect.Method.invoke(Method.java:597)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
而且它仍然沒有加入「SONAR_USER_HOME」環境變量 (http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-INVALIDHASH)
我們清理緩存但它不起作用。最後,我們將所有緩存文件從master的緩存目錄複製到slave的目錄中,現在就可以了。但是當我們有新的插件(或新版本)時,我需要再次做。 – Dennys
事實上,這對於讀取生產使用來說不是一個可以接受的解決方法。你應該檢查你的盒子和服務器之間的HTTP連接,並理解爲什麼文件被損壞。例如是否有代理? –