Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-4380

Notifications job fails with Illegal characters and resends emails every 1 minute

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Service Desk Cloud. Using JIRA Service Desk Server? See the corresponding bug report.

      Summary

      Service Desk emails are send repeatedly every 1 minute.
      JIRA logs: ERROR ServiceRunner [c.a.scheduler.core.JobLauncher] Scheduled job with ID 'sd.custom.notification.batch.send' failed

      Environment

      • JIRA Service Desk 1000.445.0

      JIRA logs the error

      2016-10-11 22:29:13,532 Caesium-1-4 ERROR ServiceRunner     [c.a.scheduler.core.JobLauncher] Scheduled job with ID 'sd.custom.notification.batch.send' failed
      java.lang.IllegalArgumentException: Illegal character in query at index 123: https://site.atlassian.net/servicedesk/customershim/secure/attachment/24804/24804_image001.png?fromIssue=28310<https://site.atlassian.net/servicedesk/customershim/secure/attachment/24804/24804_image001.png?fromIssue=28310>
            at java.net.URI.create(URI.java:852)
            at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:95)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.addFromIssueQueryString(CustomerTextRendererImpl.java:109)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.lambda$addQueryStringToAttachmentLinks$1(CustomerTextRendererImpl.java:103)
            at java.util.ArrayList.forEach(ArrayList.java:1249)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.addQueryStringToAttachmentLinks(CustomerTextRendererImpl.java:100)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.addQueryStringToCustomerLinks(CustomerTextRendererImpl.java:83)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.lambda$updateCustomerTextIntertal$2(CustomerTextRendererImpl.java:141)
            at io.atlassian.fugue.Option$Some.forEach(Option.java:454)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.updateCustomerTextIntertal(CustomerTextRendererImpl.java:141)
            at com.atlassian.servicedesk.internal.feature.customer.request.CustomerTextRendererImpl.updateEmailTextForCustomer(CustomerTextRendererImpl.java:133)
            at com.atlassian.servicedesk.internal.notifications.render.StylingBodyFinaliserImpl.buildMultiPartHtmlEmailBody(StylingBodyFinaliserImpl.java:79)
            at com.atlassian.servicedesk.internal.notifications.render.StylingBodyFinaliserImpl.buildMessageBodyForRecipient(StylingBodyFinaliserImpl.java:72)
            at com.atlassian.servicedesk.internal.notifications.render.StylingBodyFinaliserImpl.lambda$buildHtmlBody$0(StylingBodyFinaliserImpl.java:55)
            at io.atlassian.fugue.Either$RightProjection.map(Either.java:856)
            at io.atlassian.fugue.Either.map(Either.java:216)
            at com.atlassian.servicedesk.internal.notifications.render.StylingBodyFinaliserImpl.buildHtmlBody(StylingBodyFinaliserImpl.java:55)
            ... 2 filtered
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
            at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
            at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
            at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
            at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
            at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
            at com.sun.proxy.$Proxy4267.buildHtmlBody(Unknown Source)
            at com.atlassian.servicedesk.plugins.notifications.internal.rendering.StylingEmailBodyRendererHelper.lambda$renderHtmlBody$2(StylingEmailBodyRendererHelper.java:67)
            at com.atlassian.pocketknife.step.EitherStep3.lambda$null$0(EitherStep3.java:26)
            at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
            at io.atlassian.fugue.Either.flatMap(Either.java:230)
            at com.atlassian.pocketknife.step.EitherStep3.lambda$null$1(EitherStep3.java:26)
            at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
            at io.atlassian.fugue.Either.flatMap(Either.java:230)
            at com.atlassian.pocketknife.step.EitherStep3.lambda$then$2(EitherStep3.java:25)
            at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
            at io.atlassian.fugue.Either.flatMap(Either.java:230)
            at com.atlassian.pocketknife.step.EitherStep3.then(EitherStep3.java:24)
            at com.atlassian.servicedesk.plugins.notifications.internal.rendering.StylingEmailBodyRendererHelper.renderHtmlBody(StylingEmailBodyRendererHelper.java:66)
            at com.atlassian.servicedesk.plugins.notifications.internal.rendering.NotificationEmailBodyRendererImpl.renderHtmlBody(NotificationEmailBodyRendererImpl.java:105)
            at com.atlassian.servicedesk.plugins.notifications.internal.rendering.NotificationEmailBodyRendererImpl.renderBodyInternal(NotificationEmailBodyRendererImpl.java:93)
            at com.atlassian.servicedesk.plugins.notifications.internal.rendering.NotificationEmailBodyRendererImpl.renderBatchBody(NotificationEmailBodyRendererImpl.java:63)
            at com.atlassian.servicedesk.plugins.notifications.internal.dispatch.NotificationBatchDispatcher.buildEmail(NotificationBatchDispatcher.java:151)
            at com.atlassian.servicedesk.plugins.notifications.internal.dispatch.NotificationBatchDispatcher.dispatchMail(NotificationBatchDispatcher.java:130)
            at com.atlassian.servicedesk.plugins.notifications.internal.dispatch.NotificationBatchDispatcher.lambda$dispatchEmailPerIssueAndRecipient$3(NotificationBatchDispatcher.java:106)
            at com.atlassian.pocketknife.step.EitherStep4.lambda$null$8(EitherStep4.java:45)
            at io.atlassian.fugue.Either$RightProjection.map(Either.java:856)
            at io.atlassian.fugue.Either.map(Either.java:216)
            at com.atlassian.pocketknife.step.EitherStep4.lambda$null$9(EitherStep4.java:45)
            at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
            at io.atlassian.fugue.Either.flatMap(Either.java:230)
            at com.atlassian.pocketknife.step.EitherStep4.lambda$null$10(EitherStep4.java:44)
            at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
            at io.atlassian.fugue.Either.flatMap(Either.java:230)
            at com.atlassian.pocketknife.step.EitherStep4.lambda$yield$11(EitherStep4.java:43)
            at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
            at io.atlassian.fugue.Either.flatMap(Either.java:230)
            at com.atlassian.pocketknife.step.EitherStep4.yield(EitherStep4.java:42)
            at com.atlassian.servicedesk.plugins.notifications.internal.dispatch.NotificationBatchDispatcher.dispatchEmailPerIssueAndRecipient(NotificationBatchDispatcher.java:106)
            at com.atlassian.servicedesk.plugins.notifications.internal.dispatch.NotificationBatchDispatcher.dispatchEmail(NotificationBatchDispatcher.java:89)
            at com.atlassian.servicedesk.plugins.notifications.internal.scheduler.NotificationBatchJobRunner.sendBatchedMails(NotificationBatchJobRunner.java:54)
            at com.atlassian.servicedesk.plugins.notifications.internal.scheduler.NotificationBatchJobRunner.runJob(NotificationBatchJobRunner.java:41)
            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:745)
      Caused by: java.net.URISyntaxException: Illegal character in query at index 123: https://site.atlassian.net/servicedesk/customershim/secure/attachment/24804/24804_image001.png?fromIssue=28310<https://site.atlassian.net/servicedesk/customershim/secure/attachment/24804/24804_image001.png?fromIssue=28310>
            at java.net.URI$Parser.fail(URI.java:2848)
            at java.net.URI$Parser.checkChars(URI.java:3021)
            at java.net.URI$Parser.parseHierarchical(URI.java:3111)
            at java.net.URI$Parser.parse(URI.java:3053)
            at java.net.URI.<init>(URI.java:588)
            ... 84 more
      
      
      

      Workaround

      1. Disable Outgoing mail Log to prevent more emails from being sent
      2. Contact support.atlassian.com to find and fix the problematic notification
      3. Enable Outgoing mail log

      Attachments

        Issue Links

          Activity

            People

              dfranke@atlassian.com Dominik Franke
              mfernandezbadii Mauro Badii
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: