Sonarqube with Jenkins and sonarqube runner - jenkins

We have configured SOnarqube with Jenkins and sonarqube runner.
Getting following error on building:
Can you please help:
NFO: ------------------------------------------------------------------------
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: The svn blame command [svn blame --xml --non-interactive -x -w ext/projectmgt/ProjectNumberAutoSuggestion.java] failed: svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at 'C:\CodeReview\JenkinsHome\jobs\Test\workspace'
is too old (format 29) to work with client version '1.8.13 (r1667537)' (expects format 31). You need to upgrade the working copy first.
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:110)
at org.sonar.plugins.scm.svn.SvnBlameCommand.access$000(SvnBlameCommand.java:45)
at org.sonar.plugins.scm.svn.SvnBlameCommand$1.call(SvnBlameCommand.java:91)
at org.sonar.plugins.scm.svn.SvnBlameCommand$1.call(SvnBlameCommand.java:88)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone SonarQube Analysis' marked build as failure
Finished: FAILURE

The problem looks pretty clear to me. The workspace was checked out with an older version of SVN, below 1.8. When sonar is trying to run, it is using SVN 1.8 which won't work if the workspace was checked out with a previous SVN version. There are two options here:
Delete the workspace and do the checkout with SVN 1.8
Configure Jenkins to use the same version of SVN you used to check out the code.

Related

Error while running jenkins build

I am getting below error while running my build. The build is triggering other builds also and creating and deploying RPMS.
Artifactory plugin version is 2.10.3
FATAL: org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.setConnectionRetries(Ljava/lang/Integer;)V
java.lang.NoSuchMethodError: org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.setConnectionRetries(Ljava/lang/Integer;)V
at org.jfrog.hudson.util.ExtractorUtils.setRetryParams(ExtractorUtils.java:400)
at org.jfrog.hudson.util.ExtractorUtils.setPublisherInfo(ExtractorUtils.java:313)
at org.jfrog.hudson.util.ExtractorUtils.getArtifactoryClientConfiguration(ExtractorUtils.java:155)
at org.jfrog.hudson.util.ExtractorUtils.addBuilderInfoArguments(ExtractorUtils.java:141)
at org.jfrog.hudson.maven3.extractor.MavenExtractorEnvironment.buildEnvVars(MavenExtractorEnvironment.java:139)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:931)
at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56)
at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:169)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:635)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1720)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Please clear Jenkins cache and update
Artifactory-Jenkins-Plugin to the latest version v2.10.4.

Build Grails project (2.5) with jenkins

I try to build my grails project with jenkins, i'm newbie on jenkins.
first step i get my project from bitbucket,
after i used the grail plugin to build but i have this error :
What's wrong with my configuration, it's not a jenkins user right issue as i could see in several tickets
[mycj] $ /var/jenkins_home/workspace/mycj/grailsw -Dgrails.work.dir=mycj cl
ean --non-interactive --plain-output
FATAL: command execution failed
java.io.IOException: Cannot run program "/var/jenkins_home/workspace/mycj/grailsw" (in directory "/var/jenkins_home/workspace/mycj"): error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:245)
at hudson.Proc$LocalProc.<init>(Proc.java:214)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:846)
at hudson.Launcher$ProcStarter.start(Launcher.java:384)
at hudson.Launcher$ProcStarter.join(Launcher.java:395)
at com.g2one.hudson.grails.GrailsBuilder.perform(GrailsBuilder.java:266)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 15 more
Build step 'Build With Grails' marked build as failure
Finished: FAILURE
It looks like the Jenkins user doesn't have write permission on the working directory.

Artifactory Eclipse RCP in Jenkins Build Error

I'm trying to use Tycho Maven to build an RCP application in Jenkins. The build works fine from the command line and even in Jenkins (when I use the appropriated settings.xml file to resolve the artifacts using my Artifactory server) but as soon as I enable the Artifactory plugin in the job configuration I get the following error:
Checking out Revision 6e23fe54a2fef24e13e4c08551c132c7932392a9 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 6e23fe54a2fef24e13e4c08551c132c7932392a9
First time build. Skipping changelog.
Jenkins Artifactory Plugin version: 2.8.2
Artifactory integration is enabled
[ConsolePOMlss] $ /var/lib/jenkins/tools/hudson.model.JDK/JDK1.8/bin/java -classpath /usr/share/maven/boot/plexus-classworlds-2.x.jar -Dmaven.home=/usr/share/maven -DbuildInfoConfig.propertiesFile=/tmp/buildInfo1521811850289716273.properties -Dm3plugin.lib=/var/lib/jenkins/cache/artifactory-plugin/2.8.2 -Dclassworlds.conf=/tmp/classworlds2157837551391886905conf -Dmaven.multiModuleProjectDirectory=/var/lib/jenkins/workspace/BigItem/ConsolePOMlss org.codehaus.plexus.classworlds.launcher.Launcher clean verify
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
/var/lib/jenkins/workspace/BigItem/ConsolePOMlss/bundles/com.acme.jdom/.polyglot.build.properties
/var/lib/jenkins/workspace/BigItem/ConsolePOMlss/bundles/com.acme.clientserverkit/.polyglot.build.properties
/var/lib/jenkins/workspace/BigItem/ConsolePOMlss/bundles/com.acme.items.datastoreclasses/.polyglot.build.properties
/var/lib/jenkins/workspace/BigItem/ConsolePOMlss/bundles/com.acme.ui.utilities/.polyglot.build.properties
/var/lib/jenkins/workspace/BigItem/ConsolePOMlss/bundles/com.acme.ui.debug/.polyglot.build.properties
/var/lib/jenkins/workspace/BigItem/ConsolePOMlss/bundles/com.acme.items.console/.polyglot.build.properties
[main] ERROR org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener - Failed while enforcing Artifactory artifact resolver
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver
roleHint:
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:237)
at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener.enforceArtifactoryResolver(ArtifactoryEclipseRepositoryListener.java:71)
at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener.contextualize(ArtifactoryEclipseRepositoryListener.java:258)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:282)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate(PlexusLifecycleManager.java:203)
at org.eclipse.sisu.bean.BeanScheduler$Pending.activate(BeanScheduler.java:156)
at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:185)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.wire.EntrySetAdapter$ValueIterator.next(EntrySetAdapter.java:102)
at org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher.dispatch(DefaultRepositoryEventDispatcher.java:91)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.artifactResolving(DefaultArtifactResolver.java:662)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:276)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:202)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.resolveExtensionArtifacts(DefaultMavenPluginManager.java:908)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupExtensionsRealm(DefaultMavenPluginManager.java:839)
at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:196)
at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:99)
at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:44)
at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1295)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:441)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:421)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:620)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:411)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:4189)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
... 61 more
I'm using:
Jenkins 2.32.1
Artifactory Plig-in 2.8.2
Tycho 0.26.0
maven 3.3.9
Some more information ... This is the point where my build in Jenkins with Maven-3-Artifactory enabled an the build with Maven-3-Artifactory differ. It seems that it doesn't have to do with my sources but a bug in the plugin.
With Maven-3-Artifactory Integration enabled:
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] DEBUG org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener - Enforcing Artifactory artifact resolver
[main] ERROR org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener - Failed while enforcing Artifactory artifact resolver
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver
roleHint:
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:237)
at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener.enforceArtifactoryResolver(ArtifactoryEclipseRepositoryListener.java:71)
at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener.contextualize(ArtifactoryEclipseRepositoryListener.java:258)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:282)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate(PlexusLifecycleManager.java:203)
at org.eclipse.sisu.bean.BeanScheduler$Pending.activate(BeanScheduler.java:156)
at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:185)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
And with Maven-3-Artifactory Integration disabled:
[INFO] Scanning for projects...
/home/jmorcate/bundles/com.acme.packageA/.polyglot.build.properties
/home/jmorcate/bundles/com.acme.packageB/.polyglot.build.properties
/home/jmorcate/bundles/com.acme.utilities/.polyglot.build.properties
/home/jmorcate/bundles/com.acme.ui.debug/.polyglot.build.properties
/home/jmorcate/bundles/nato.ncia.sssb.cloud22.console/.polyglot.build.properties
/home/jmorcate/features/com.acme.feature/.polyglot.build.properties
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=81, ConflictIdSorter.graphTime=1, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=40, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=4, ConflictResolver.conflictItemCount=80, DefaultDependencyCollector.collectTime=178, DefaultDependencyCollector.transformTime=5}
We got the same issue due to takari extentions in "${project.basedir}/.mvn/extensions.xml" folder. Everything works after extensions were disabled.
Despite you did not specify that i am sure that you use it.

Fail to find sonarqube while using jenkins

I m using jenkins and I need my sonarqube to make some analysis on my code.
I use docker to manage both images and mapped the port so that they are accessible from outside. It works great, I can open and login in both portals.
My problem is that when I try to run my jenkins build and ask sonarqube for informations, it throws me the following error :
ERROR: Error during SonarQube Scanner execution
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: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.Platform.connectSocket(Platform.java:101)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connectSocket(Connection.java:198)
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.
Build step 'Execute SonarQube Scanner' marked build as failure
Finished: FAILURE
I don't know at all what's going wrong here.
What I did :
I have registered a server key in the "user=>token=>generate a token for user" in sonarqube and use it inside of my jenkins app
This error means that your Jenkins server can't access your sonar server. Maybe the IP or domain is set wrong. Maybe the networking between them isn't set up correctly.
Somewhere in your Jenkins console log you should see something like this:
Injecting SonarQube environment variables using the configuration: Sonarqube Local
[workspace] $ mvn sonar:sonar -Dsonar.host.url=http://sonar.yourserver.com -Dsonar.login=******
Make sure that this sonar.host.url is set correctly. Then make sure you can access this from your jenkins server.

Failed to install MStest plugin : Jenkins

I try to install the MSTest for showing the results from .trx file.
As I install through Download Now and Install after Restart, My Jenkins is taking so long time to restart so I tried with Install without restart.
It shows the following error
enter code here
Emma plugin
Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install emma plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:473)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
... 5 more
Caused by: java.io.IOException: Dependency maven-plugin (1.447) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:463)
... 6 more
MSTest plugin Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install mstest plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:473)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
... 5 more
Caused by: java.io.IOException: Dependency emma (1.29) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:463)
... 6 more
It is because MSTest plugin depends on emma and maven-plugin. I suspect you have bad network condition while download these 2 dependencies.
First, try Download Now and Install after Restart but wait for a longer time until it get successfully installed. Jenkins will take care of the dependencies.
Or,
as an alternative, you can first install emma and maven-plugin, then install MSTest then.

Resources