从Jenkins运行脚本以测试SonarQube安装时,我经常遇到错误。请在下面找到日志。我检查了各种帖子,但无法获得适当的解决方案。我观察到的是,当我以管理员身份运行bat文件时,它可以完美运行,因此Jenkins可能无法在文件上运行它。
03:17:20 > git.exe rev-list --no-walk b14e98bc6329ee51489f7d5804bde206e7f9fb8c # timeout=10
03:17:20 No emails were`enter code here` triggered.
03:17:22 ERROR: Failed to parse POMs
03:17:22 java.io.IOException: Failed to install https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/3.3.0.1492/sonar-scanner-cli-3.3.0.1492.zip to C:\Program Files\sonarqube-6.7.6\bin\windows-x86-64
03:17:22 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:940)
03:17:22 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:848)
03:17:22 at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
03:17:22 at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
03:17:22 at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
03:17:22 at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
03:17:22 at hudson.plugins.sonar.SonarRunnerInstallation.forNode(SonarRunnerInstallation.java:90)
03:17:22 at hudson.plugins.sonar.SonarRunnerInstallation.forNode(SonarRunnerInstallation.java:48)
03:17:22 at hudson.plugins.sonar.utils.BuilderUtils.getBuildTool(BuilderUtils.java:56)
03:17:22 at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:267)
03:17:22 at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:249)
03:17:22 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
03:17:22 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
03:17:22 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:945)
03:17:22 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:683)
03:17:22 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
03:17:22 at hudson.model.Run.execute(Run.java:1810)
03:17:22 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
03:17:22 at hudson.model.ResourceController.execute(ResourceController.java:97)
03:17:22 at hudson.model.Executor.run(Executor.java:429)
03:17:22 Caused by: java.io.IOException: Unable to delete 'C:\Program Files\sonarqube-6.7.6\bin\windows-x86-64\InstallNTService.bat'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
03:17:22 at hudson.Util.deleteFile(Util.java:279)
03:17:22 at hudson.FilePath.deleteRecursive(FilePath.java:1305)
03:17:22 at hudson.FilePath.deleteContentsRecursive(FilePath.java:1314)
03:17:22 at hudson.FilePath.access$1800(FilePath.java:213)
03:17:22 at hudson.FilePath$DeleteContents.invoke(FilePath.java:1289)
03:17:22 at hudson.FilePath$DeleteContents.invoke(FilePath.java:1285)
03:17:22 at hudson.FilePath.act(FilePath.java:1078)
03:17:22 at hudson.FilePath.act(FilePath.java:1061)
03:17:22 at hudson.FilePath.deleteContents(FilePath.java:1283)
03:17:22 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:904)
03:17:22 ... 19 more
03:17:22 Caused by: java.nio.file.AccessDeniedException: C:\Program Files\sonarqube-6.7.6\bin\windows-x86-64\InstallNTService.bat
03:17:22 at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
03:17:22 at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
03:17:22 at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
03:17:22 at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
03:17:22 at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
03:17:22 at java.nio.file.Files.deleteIfExists(Unknown Source)
03:17:22 at hudson.Util.tryOnceDeleteFile(Util.java:318)
03:17:22 at hudson.Util.deleteFile(Util.java:274)
03:17:22 ... 28 more
03:17:25 Sending e-mails to: cchopda62@gmail.com
03:17:25 ERROR: 535-5.7.8 Username and Password not accepted. Learn more at
03:17:25 535 5.7.8 https://support.google.com/mail/?p=BadCredentials x82sm1324127ywd.11 - gsmtp
03:17:25
03:17:25 javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
03:17:25 535 5.7.8 https://support.google.com/mail/?p=BadCredentials x82sm1324127ywd.11 - gsmtp
03:17:25
03:17:25 at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:809)
03:17:25 at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:752)
03:17:25 at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669)
03:17:25 at javax.mail.Service.connect(Service.java:317)
03:17:25 at javax.mail.Service.connect(Service.java:176)
03:17:25 at javax.mail.Service.connect(Service.java:125)
03:17:25 at javax.mail.Transport.send0(Transport.java:194)
03:17:25 at javax.mail.Transport.send(Transport.java:124)
03:17:25 at hudson.tasks.MailSender.run(MailSender.java:131)
03:17:25 at hudson.tasks.MailSender.execute(MailSender.java:106)
03:17:25 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1094)
03:17:25 at hudson.model.Run.execute(Run.java:1857)
03:17:25 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
03:17:25 at hudson.model.ResourceController.execute(ResourceController.java:97)
03:17:25 at hudson.model.Executor.run(Executor.java:429)
答案 0 :(得分:0)
您的脚本似乎想在路径上升级SonarScanner
C:\ Program Files \ sonarqube-6.7.6 \ bin \ windows-x86-64 \ InstallNTService.bat
但是,詹金斯没有这样做的特权。 当Jenkins连接到Sonar安装时,Jenkins用户可能没有足够的特权。您需要在Sonar Installation实例上为Jenkins提供管理员用户。