Have you seen this error in your Jira log? If so, then you are in the right place to solve it 🙂
2019-10-10 02:03:34,970 Caesium-1-4 ERROR ServiceRunner [c.a.j.p.devstatus.provider.DefaultDevSummaryPollService] Refresh failurecom.atlassian.jira.plugin.devstatus.provider.DataProviderRefreshFailure: Data Provider refresh failed with error code 400 and message - HTTP status 400 ] at com.atlassian.jira.plugin.devstatus.provider.DefaultCachingProviderHelper.refreshProvider(DefaultCachingProviderHelper.java:79) at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService.handlePollingSuccess(DefaultDevSummaryPollService.java:69) at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService.lambda$performPull$1(DefaultDevSummaryPollService.java:51) at com.atlassian.jira.plugin.devstatus.provider.source.applink.PollResult$PollResultSuccess.fold(PollResult.java:51) at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService.performPull(DefaultDevSummaryPollService.java:47) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at com.atlassian.jira.plugin.devstatus.provider.DevSummaryUpdateJob.runJob(DevSummaryUpdateJob.java:85) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:438) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(CaesiumSchedulerService.java:462) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:390) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34) at java.lang.Thread.run(Thread.java:748)
The error is caused by that Bitbucket rejects the application links polling request from Jira. The most common possible root causes are:
- The request URL is too long, the return code normally is 414.
- The header is too large, the return code normally is 400.
- Some specific settings for plugin.dev-summary.
How to solve this issue? It really depends on how you set it up. Take a typical architecture for example: Jira -> Nginx -> Bitbucket. The troubleshooting steps should be:
- Check your Nginx to confirm whether it rejects the request from Jira. If yes, then tune the client_header_buffer_size and large_client_header_buffers parameters to fit your needs.
- If Nginx does not reject the request, then the problem should be in the upstream – Bitbucket/Tomcat. How to confirm that? Check the Nginx errror log, you should see something like: [error] 24#24: *46774189 readv() failed (104: Connection reset by peer) while reading upstream, client: xxx.xxx.xxx.xxx, server: xxx.xxx.xxx, request: “GET /rest/remote-link-aggregation/latest/aggregation?globalId=xxx-xxxx&….
- Check the server.max-http-header-size in the bitbucket.properties, update it to a larger value to match your incoming requests.
- If none of them solved your problem, then you probably need to tune the plugin.dev-summary.xxx parameter. Check details here: https://confluence.atlassian.com/bitbucketserver059/bitbucket-server-config-properties-949255485.html