我正准备在Sonarqube上扫描swift代码。我们有一个代理,我相信这是这个错误的根本原因。
我在mac机器的~/.bash_profile中设置了http_proxy、https_proxy和no_proxy环境变量。
我有安装项目和声纳扫描仪在Mac节点(通过詹金斯)
16:53:39 Unpacking https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/3.0.3.778/sonar-scanner-cli-3.0.3.778.zip to /Users/jenkins/home/jenkinsdata/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarqubeScanner on Mac-Agent
16:53:39 ERROR: Failed to download https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/3.0.3.778/sonar-scanner-cli-3.0.3.778.zip from agent; will retry from master
16:53:39 java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
16:53:39 at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2124)
16:53:39 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
16:53:39 at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
16:53:39 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
16:53:39 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
16:53:39 at java.net.URL.openStream(URL.java:1045)
16:53:39 at hudson.FilePath$Unpack.invoke(FilePath.java:867)
16:53:39 at hudson.FilePath$Unpack.invoke(FilePath.java:861)
16:53:39 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2750)
16:53:39 at hudson.remoting.UserRequest.perform(UserRequest.java:153)
16:53:39 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
16:53:39 at hudson.remoting.Request$2.run(Request.java:336)
16:53:39 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
16:53:39 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
16:53:39 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
16:53:39 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
16:53:39 at hudson.remoting.Engine$1$1.run(Engine.java:94)
16:53:39 at java.lang.Thread.run(Thread.java:748)
16:53:39 at ......remote call to JNLP4-connect connection from macHost/macHost:49506(Native Method)
16:53:39 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554)
16:53:39 at hudson.remoting.UserResponse.retrieve(UserRequest.java:281)
16:53:39 at hudson.remoting.Channel.call(Channel.java:839)
16:53:39 at hudson.FilePath.act(FilePath.java:987)
16:53:39 Caused: java.io.IOException: remote file operation failed: /Users/jenkins/home/jenkinsdata/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarqubeScanner at hudson.remoting.Channel@45df1f9e:JNLP4-connect connection from macHost/macHost:49506
16:53:39 at hudson.FilePath.act(FilePath.java:994)
16:53:39 at hudson.FilePath.act(FilePath.java:976)
16:53:39 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:831)
16:53:39 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:764)
16:53:39 at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
16:53:39 at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
16:53:39 at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
16:53:39 at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
16:53:39 at hudson.plugins.sonar.SonarRunnerInstallation.forNode(SonarRunnerInstallation.java:104)
16:53:39 at hudson.plugins.sonar.SonarRunnerInstallation.forNode(SonarRunnerInstallation.java:62)
16:53:39 at hudson.plugins.sonar.utils.BuilderUtils.getBuildTool(BuilderUtils.java:70)
16:53:39 at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:279)
16:53:39 at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:261)
16:53:39 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
16:53:39 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
16:53:39 at hudson.model.Build$BuildExecution.build(Build.java:206)
16:53:39 at hudson.model.Build$BuildExecution.doRun(Build.java:163)
16:53:39 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496)
16:53:39 at hudson.model.Run.execute(Run.java:1737)
16:53:39 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
16:53:39 at hudson.model.ResourceController.execute(ResourceController.java:97)
16:53:39 at hudson.model.Executor.run(Executor.java:419)
我能够做分析的其他项目从windows和linux机器在同一服务器上。
09:51:24 INFO: SonarQube Scanner 3.0.3.778
09:51:24 INFO: Java 1.8.0_144 Oracle Corporation (64-bit)
09:51:24 INFO: Mac OS X 10.12.6 x86_64
09:51:24 INFO: User cache: /Users/jenkins/.sonar/cache
09:51:24 ERROR: SonarQube server [http://SonarserverIP:9000] can not be reached
09:51:24 INFO: ------------------------------------------------------------------------
09:51:24 INFO: EXECUTION FAILURE
09:51:24 INFO: ------------------------------------------------------------------------
09:51:24 INFO: Total time: 0.411s
09:51:24 INFO: Final Memory: 4M/245M
09:51:24 INFO: ------------------------------------------------------------------------
09:51:24 ERROR: Error during SonarQube Scanner execution
09:51:24 org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
09:51:24 at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
09:51:24 at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
09:51:24 at java.security.AccessController.doPrivileged(Native Method)
09:51:24 at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
09:51:24 at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
09:51:24 at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
09:51:24 at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
09:51:24 at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
09:51:24 at org.sonarsource.scanner.cli.Main.main(Main.java:61)
09:51:24 Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
09:51:24 at org.sonarsource.scanner.api.internal.Jars.getBootstrapIndex(Jars.java:100)
09:51:24 at org.sonarsource.scanner.api.internal.Jars.getScannerEngineFiles(Jars.java:76)
09:51:24 at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
09:51:24 at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
09:51:24 at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
09:51:24 ... 8 more
09:51:24 Caused by: java.lang.IllegalStateException: Status returned by url [http://SonarserverIP:9000/batch/index] is not valid: [403]
09:51:24 at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)
09:51:24 at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:98)
09:51:24 at org.sonarsource.scanner.api.internal.Jars.getBootstrapIndex(Jars.java:96)
09:51:24 ... 12 more
09:51:24 ERROR:
09:51:24 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
提前谢了。
在使用Jenkins访问Maven Central下载SonarQube scanner时,似乎必须通过一个身份验证代理。
为了解决这个问题,您需要用您的凭据和代理配置来配置Jenkins。您将在这里找到更多详细信息:https://wiki.jenkins.io/display/jenkins/JenkinsBehindProxy
根据您的更新1,SonarQube返回一个403 http代码,表明您使用的凭据似乎不正确。
问题内容: 我的Java作业有问题。我遇到了意外的异常,特别是: java.util.NoSuchElementException:找不到行 我正在使用,该程序不断读取任何内容,并重复“无效格式”异常文本。如果输入正确的值,则第一部分通过,然后该部分立即进入此异常。如果输入的值不正确,则它将开始循环异常。 这是我的代码: 问题答案: 您关闭了多个库,这些库关闭了底层库,因此另一个库将不再从同一库和
问题内容: 使用Scanner类中的useDelimiter时遇到一些问题。 如果我有这个输入 美国广播公司 输出将是 AB 然后等到我键入另一个“-”以打印出最后一个字符 但是,如果我没有用户输入数据,而是将字符串插入到Scanner中,则代码将起作用。原因是什么?如何解决?我不想使用StringTokenzier 问题答案: 如果没有等待您输入另一个,则将错误地假定您已完成输入。 我的意思是,
我做了一个程序,要求3个整数来输出三角形的类型。所有内容都成功运行和编译,但是,在要求用户查看是否要再次循环的部分,联机编译器会输出错误: 异常线程"main"java.util.NoSuchElement异常在java.util.Scanner.throwFor(Scanner.java:838)在java.util.Scanner.next(Scanner.java:1347)在Assignm
我有java项目(非梯度),想要测试Sonarqube。所以,我安装了sonar-scanner for mac(https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/)我如何使用它扫描我的Java项目? 我的项目结构是:src->main-java->COM->MyCompany>PackageName1->[java文件]sr
声纳扫描仪在运行扫描仪时抛出空指针异常。错误指向一个枚举。它实现了一个典型的接口。 我记得几个月前运行扫描仪时没有出现任何问题,但这次不同了,感谢您的帮助。 添加了一些乱码,我可以保证没有编译问题。 包括声纳项目属性。#所需元数据sonar.project密钥=com.companysonar.project名称=项目sonar.project版本=1.0