Service Desk Customer Portal Attachments Fail

We just upgraded to service desk 3.0 and JIRA Software. When a user attempts to upload an attachment from the customer portal, they receive the following error:

Cannot attach file: Unknown server error (500).

Here's what I see in the log at the same time:

 

/rest/servicedesk/1/servicedesk/customer/comment/tempfile [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.reflect.InvocationTargetException
    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:497)
    at com.atlassian.servicedesk.squalor.comment.ServiceDeskAttachmentManager.createTemporaryAttachment(ServiceDeskAttachmentManager.java:29)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16$$anonfun$apply$17.apply(InternalServiceDeskCommentService.scala:208)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16$$anonfun$apply$17.apply(InternalServiceDeskCommentService.scala:202)
    at scalaz.$bslash$div.map(Either.scala:111)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16.apply(InternalServiceDeskCommentService.scala:202)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16.apply(InternalServiceDeskCommentService.scala:201)
    at scalaz.$bslash$div.flatMap(Either.scala:134)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1.apply(InternalServiceDeskCommentService.scala:201)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1.apply(InternalServiceDeskCommentService.scala:200)
    at scalaz.$bslash$div.flatMap(Either.scala:134)
    at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService.addTemporaryAttachment(InternalServiceDeskCommentService.scala:200)
    at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3$$anonfun$apply$4.apply(ServiceDeskCommentResource.scala:180)
    at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3$$anonfun$apply$4.apply(ServiceDeskCommentResource.scala:179)
    at scalaz.$bslash$div.flatMap(Either.scala:134)
    at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3.apply(ServiceDeskCommentResource.scala:179)
    at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3.apply(ServiceDeskCommentResource.scala:178)
    at scalaz.$bslash$div.flatMap(Either.scala:134)
    at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource.temporaryFileUploadAJAX(ServiceDeskCommentResource.scala:178)
    ... 3 filtered
    at java.lang.reflect.Method.invoke(Method.java:497)
    ... 19 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
    ... 1 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
    ... 41 filtered
    at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65)
    ... 64 filtered
    at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)
    ... 21 filtered
    at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply$mcV$sp(PortalContextSetter.scala:12)
    at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11)
    at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11)
    at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:23)
    at com.atlassian.servicedesk.internal.web.PortalContextSetter.doFilter(PortalContextSetter.scala:11)
    ... 56 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: size must be >= 0.
    at com.atlassian.jira.web.util.DefaultWebAttachmentManager.createTemporaryAttachment(DefaultWebAttachmentManager.java:163)
    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:497)
    at com.sun.proxy.$Proxy56.createTemporaryAttachment(Unknown Source)
    ... 3 filtered
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    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:207)
    at com.sun.proxy.$Proxy4830.createTemporaryAttachment(Unknown Source)
    ... 241 more

 

This happens with any type of attachment and with a number of users. Any ideas?

1 answer

0 vote
Pedro Cora Atlassian Team Oct 23, 2015

I once saw a similar case where the problem was related to reverse proxy. Do you have a proxy in front of JIRA? From the error, it seems that the file is being sent as 0 bytes. 

It might be worth to bypass it and see if the problem still reproduces.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Mar 09, 2018 in Jira Service Desk

E.L. Fridge's take on education, Jira Service Desk, and creative Jira use cases

...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...

1,160 views 2 14
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you