org.sonarqube.ws.client.HttpException: Error 400 on http://sonarqube:9000/sonar/api/qualitygates/project_status?analysisId=AYlIin_1KdykgZn9PS36 : {"errors":[{"msg":"Duplicate key AYlFgfScO7nd2VyqMYbQ"}]}
at hudson.plugins.sonar.client.HttpClient.getHttp(HttpClient.java:48)
at hudson.plugins.sonar.client.WsClient.requestQualityGateStatus(WsClient.java:70)
at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.lambda$checkTaskCompleted$0(WaitForQualityGateStep.java:241)
at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.checkQualityGate(WaitForQualityGateStep.java:294)
at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.checkTaskCompleted(WaitForQualityGateStep.java:241)
at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.start(WaitForQualityGateStep.java:176)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
at jdk.internal.reflect.GeneratedMethodAccessor346.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:180)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:163)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:178)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:182)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:152)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:152)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:152)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:152)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:152)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.run(WorkflowScript:202)
at ___cps.transform___(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:90)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:116)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:80)
at jdk.internal.reflect.GeneratedMethodAccessor340.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
at com.cloudbees.groovy.cps.Next.step(Next.java:83)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:146)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Finished: FAILURE
I found logs on web.log
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âjavascriptâ version : 6.6.0.13923 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âkotlinâ version : 2.12.0.1956 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âphpâ version : 3.27.1.9352 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âpythonâ version : 3.24.0.10784 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin ârubyâ version : 1.11.0.3905 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âsonarscalaâ version : 1.11.0.3905 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âtextâ version : 2.0.2.1090 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âvbnetâ version : 8.51.0.59060 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âwebâ version : 3.7.1.3306 has not been found on the update center.
2023.07.18 16:25:56 INFO web[AYlpsmHUgury/TGNAAC9][o.s.u.c.UpdateCenter] The plugin âxmlâ version : 2.5.0.3376 has not been found on the update center.
But in this not able to find the duplicate key error logs.
Kindly check and guide.
Youâre getting a bad request error (400) for a very routine request. Is anonymous access allowed on your server? And if not, are you sure youâre logged in properly? I think a first step would be clearing your cookies and trying again (so that you would be reprompted to log in if needed). And then maybe
stop server
delete $SONARQUBE-HOME/data/es7
restart server
This doesnât have the typical hallmarks of corrupt Elasticsearch indices, but itâs worth eliminating.
Anonymous access is not allowed and able to login with admin user with new password.
As suggested stopped sonar server and removed es7 folder and started the sonar server.
Cleared cookies and cache as well and login into sonar, still getting same issue.