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 votes
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
Community showcase
Published Feb 15, 2019 in Jira Service Desk

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

357 views 0 11
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