Closed jgutierrezglez closed 9 months ago
Hi @jgutierrezglez,
Just to confirm, are you using Jira Cloud? Does the "validate settings" button return OK?
From the exception, I'm guessing it might be a bug caused by this change not being implemented for getUser()
or a problem of credentials configured for accessing Jira.
Hello @rantoniuk,
We're using Jira Cloud. If I click on 'validate settings' button, it returns OK.
The credentials that are currently in place are fine - in case I replace the current username (username@email.com) by the account id of this user - I get a different error (authentication error).
@jgutierrezglez can you still observe this behavior with 3.12?
It seems that this issue is solved after 3.12. Thanks
@rantoniuk I'm still getting this issue on RHEL8, Jenkins 2.426.1 with 3.12 installed. Should I create a new issue or can we reuse this one?
Dec 21, 2023 9:52:31 AM WARNING hudson.plugins.jira.JiraRestService getUser
Jira REST client get user error. cause: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The 'accountId' query parameter needs to be provided]}]}
RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The 'accountId' query parameter needs to be provided]}]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:49)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:10)
at io.atlassian.util.concurrent.Promises$OfStage.lambda$fold$4(Promises.java:332)
at io.atlassian.util.concurrent.Promises.lambda$biFunction$7(Promises.java:422)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:914)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at com.atlassian.httpclient.apache.httpcomponents.CompletableFuturePromiseHttpPromiseAsyncClient.runInContext(CompletableFuturePromiseHttpPromiseAsyncClient.java:87)
at com.atlassian.httpclient.apache.httpcomponents.CompletableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(CompletableFuturePromiseHttpPromiseAsyncClient.java:158)
Caused: java.util.concurrent.ExecutionException
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at io.atlassian.util.concurrent.Promises$OfStage.get(Promises.java:357)
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.get(DelegatingPromise.java:106)
at hudson.plugins.jira.JiraRestService.getUser(JiraRestService.java:371)
at hudson.plugins.jira.JiraMailAddressResolver.findMailAddressFor(JiraMailAddressResolver.java:51)
at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:122)
at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:751)
at org.jenkinsci.plugins.builduser.varsetter.impl.UserIdCauseDeterminant.setJenkinsUserBuildVars(UserIdCauseDeterminant.java:79)
at org.jenkinsci.plugins.builduser.BuildUser.makeUserBuildVariables(BuildUser.java:78)
at org.jenkinsci.plugins.builduser.BuildUserVarsEnvironmentContributor.buildEnvironmentFor(BuildUserVarsEnvironmentContributor.java:18)
at hudson.model.Run.getEnvironment(Run.java:2430)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.getEnvironment(WorkflowRun.java:519)
at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:80)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:262)
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.GeneratedMethodAccessor92000.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
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 com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at org.jenkinsci.plugins.workflow.cps.LoggingInvoker.methodCall(LoggingInvoker.java:105)
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.fixArg(FunctionCallBlock.java:85)
at jdk.internal.reflect.GeneratedMethodAccessor507.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
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:423)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:331)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:295)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:97)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
@faandg since the issue was resolved apparently for another user, please open a new issue with the version report template filled. That will help triaging the issue. You can cross-reference this issue though in the description. Thanks!
Jenkins and plugins versions report
Environment
```text Jenkins: 2.364 OS: Linux - 4.9.0-12-amd64 --- ace-editor:1.1 ansible-tower:0.16.0 ant:475.vf34069fef73c antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61 artifactory:3.17.0 audit-trail:3.11 authentication-tokens:1.4 authorize-project:1.4.0 aws-credentials:191.vcb_f183ce58b_9 aws-java-sdk:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-cloudformation:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-codebuild:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ec2:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ecr:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ecs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-iam:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-logs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-minimal:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-sns:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-sqs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ssm:1.12.246-349.v96b_b_f7eb_a_c3c basic-branch-build-strategies:1.3.2 blueocean:1.25.6 blueocean-autofavorite:1.2.5 blueocean-bitbucket-pipeline:1.25.6 blueocean-commons:1.25.6 blueocean-config:1.25.6 blueocean-core-js:1.25.6 blueocean-dashboard:1.25.6 blueocean-display-url:2.4.1 blueocean-events:1.25.6 blueocean-git-pipeline:1.25.6 blueocean-github-pipeline:1.25.6 blueocean-i18n:1.25.6 blueocean-jira:1.25.6 blueocean-jwt:1.25.6 blueocean-personalization:1.25.6 blueocean-pipeline-api-impl:1.25.6 blueocean-pipeline-editor:1.25.6 blueocean-pipeline-scm-api:1.25.6 blueocean-rest:1.25.6 blueocean-rest-impl:1.25.6 blueocean-web:1.25.6 bootstrap4-api:4.6.0-5 bootstrap5-api:5.2.0-1 bouncycastle-api:2.26 branch-api:2.1046.v0ca_37783ecc5 build-monitor-plugin:1.13+build.202205140447 built-on-column:1.1 caffeine-api:2.9.3-65.v6a_47d0f4d1fe checks-api:1.7.5 cloud-stats:0.27 cloudbees-bitbucket-branch-source:785.ve724eb_44e286 cloudbees-folder:6.758.vfd75d09eea_a_1 codesonar:3.0.0 command-launcher:84.v4a_97f2027398 commons-lang3-api:3.12.0.0 commons-text-api:1.9-9.v39a_53e2e0343 conditional-buildstep:1.4.2 config-file-provider:3.11.1 configuration-as-code:1512.vb_79d418d5fc8 configuration-as-code-groovy:1.1 credentials:1139.veb_9579fca_33b_ credentials-binding:523.vd859a_4b_122e6 cucumber-living-documentation:3.2 cucumber-perf:2.0.9 cucumber-reports:5.7.3 cucumber-testresult-plugin:0.10.1 cucumber-trends-report:1.3 display-url-api:2.3.6 docker-commons:1.19 docker-workflow:521.v1a_a_dd2073b_2e durable-task:500.v8927d9fd99d8 ec2:1.68 echarts-api:5.3.3-1 email-ext:2.91 extended-read-permission:3.2 external-monitor-job:192.ve979ca_8b_3ccd favorite:2.4.1 font-awesome-api:6.1.2-1 gatling:1.3.0 git:4.11.4 git-client:3.11.2 git-server:99.va_0826a_b_cdfa_d github:1.35.0 github-api:1.303-400.v35c2d8258028 github-branch-source:1677.v731f745ea_0cf github-checks:1.0.18 github-pr-coverage-status:2.1.1 global-slack-notifier:1.5 gradle:1.39.4 greenballs:1.15.1 h2-api:1.4.199 handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.30 instance-identity:116.vf8f487400980 ivy:2.2 jackson2-api:2.13.3-285.vc03c0256d517 jakarta-activation-api:2.0.1-1 jakarta-mail-api:2.0.1-1 javadoc:226.v71211feb_e7e9 javax-activation-api:1.2.0-4 javax-mail-api:1.6.2-6 jaxb:2.3.6-1 jdk-tool:55.v1b_32b_6ca_f9ca jenkins-design-language:1.25.6 jira:3.7.1 jjwt-api:0.11.5-77.v646c772fddb_0 jnr-posix-api:3.1.7-3 job-dsl:1.81 jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.6.0-4 jsch:0.1.55.61.va_e9ee26616e7 junit:1119.1121.vc43d0fc45561 junit-attachments:101.v82f494a_00e9e lockable-resources:2.16 mailer:438.v02c7f0a_12fa_4 mask-passwords:3.3 matrix-auth:3.1.5 matrix-project:785.v06b_7f47b_c631 maven-info:0.3.0 maven-plugin:3.19 mercurial:2.16.2 mina-sshd-api-common:2.8.0-36.v8e25ce90d4b_1 mina-sshd-api-core:2.8.0-36.v8e25ce90d4b_1 momentjs:1.1.1 monitoring:1.91.0 multibranch-build-strategy-extension:1.0.10 node-iterator-api:1.5.1 nodejs:1.5.1 nvm-wrapper:0.1.7 okhttp-api:4.9.3-108.v0feda04578cf pam-auth:1.10 parameterized-scheduler:1.0 parameterized-trigger:2.45 pipeline-aws:1.43 pipeline-build-step:2.18 pipeline-graph-analysis:195.v5812d95a_a_2f9 pipeline-groovy-lib:612.v84da_9c54906d pipeline-input-step:449.v77f0e8b_845c4 pipeline-maven:1161.v89a_7dcec5d31 pipeline-milestone-step:101.vd572fef9d926 pipeline-model-api:2.2114.v2654ca_721309 pipeline-model-definition:2.2114.v2654ca_721309 pipeline-model-extensions:2.2114.v2654ca_721309 pipeline-multibranch-defaults:2.1 pipeline-npm:0.9.2 pipeline-rest-api:2.24 pipeline-stage-step:293.v200037eefcd5 pipeline-stage-tags-metadata:2.2114.v2654ca_721309 pipeline-stage-view:2.24 pipeline-utility-steps:2.13.0 plain-credentials:139.ved2b_9cf7587b plugin-usage-plugin:3.0 plugin-util-api:2.17.0 popper-api:1.16.1-3 popper2-api:2.11.5-2 pubsub-light:1.17 resource-disposer:0.19 role-strategy:555.v8d194cc85b_30 run-condition:1.5 saml:2.333.vc81e525974a_c scm-api:621.vda_a_b_055e58f7 script-security:1175.v4b_d517d6db_f0 slack:616.v03b_1e98d13dd snakeyaml-api:1.30.2-76.vc104f7ce9870 sonar:2.14 sse-gateway:1.26 ssh-credentials:295.vced876c18eb_4 ssh-slaves:1.834.v622da_57f702c sshd:3.249.v2dc2ea_416e33 structs:324.va_f5d6774f3a_d throttle-concurrents:2.8 timestamper:1.18 token-macro:308.v4f2b_ed62b_b_16 trilead-api:1.67.vc3938a_35172f uno-choice:2.6.3 variant:59.vf075fe829ccb windows-slaves:1.8.1 workflow-aggregator:590.v6a_d052e5a_a_b_5 workflow-api:1192.v2d0deb_19d212 workflow-basic-steps:991.v43d80fea_ff66 workflow-cps:2759.v87459c4eea_ca_ workflow-durable-task-step:1199.v02b_9244f8064 workflow-job:1232.v5a_4c994312f1 workflow-multibranch:716.vc692a_e52371b_ workflow-scm-step:400.v6b_89a_1317c9a_ workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:838.va_3a_087b_4055b ws-cleanup:0.42 xray-connector:2.6.1 xvfb:1.2 ```What Operating System are you using (both controller, and any agents involved in the problem)?
Jenkins instance is running as docker in a Debian 10 VM All the agents are Debian 10 / 11 VMs
Reproduction steps
Every single time a pipeline that contains a reference to a Jira reference we're getting this warning:
The jira plugin is configured exactly as it's shown here. None of these pipelines have any reference to the jira-plugin.
Expected Results
The warning disappears
Actual Results
The warning is flooding the logs of Jenkins instance.
Anything else?
No response