AnsweredAssumed Answered

'Download unsucessfull' when downloading using Android app

Question asked by jonvargas on Dec 24, 2012
Latest reply on Aug 14, 2013 by jonvargas
Environment:

* Alfresco Community 4.2.b (bundle)
* Tomcat listening on internal IP address on port 8080
* Connections are established through a AJP reverse proxy handling external connections through port 80
* Alfresco Share works great under this configuration

Steps to repro:

* Login into Alfresco using Android app
* Go to a site and download a PDF document

Results:

* Android shows immediately a notification: "Download unsucessful"
* Tomcat log shows the following error:

2012-12-24 16:33:00,324  ERROR [impl.atompub.CmisAtomPubServlet] [ajp-apr-8009-exec-5] 
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
   at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:99)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.dispatch(CmisAtomPubServlet.java:229)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:178)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:92)
   … 22 more
Caused by: ClientAbortException:  java.io.IOException: Failed to send AJP message
   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
   at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:371)
   at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:413)
   at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:401)
   at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
   at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
   at org.apache.chemistry.opencmis.server.impl.atompub.ObjectService.getContentStream(ObjectService.java:433)
   … 27 more
Caused by: java.io.IOException: Failed to send AJP message
   at org.apache.coyote.ajp.AjpAprProcessor.output(AjpAprProcessor.java:294)
   at org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1122)
   at org.apache.coyote.Response.doWrite(Response.java:504)
   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:383)
   … 33 more
2012-12-24 16:33:00,331  ERROR [impl.atompub.CmisAtomPubServlet] [ajp-apr-8009-exec-5] getOutputStream() has already been called for this response
java.lang.IllegalStateException: getOutputStream() has already been called for this response
   at org.apache.catalina.connector.Response.getWriter(Response.java:639)
   at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:214)
   at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:105)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.printError(CmisAtomPubServlet.java:294)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:188)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)


Expected:

* Document is downloaded correctly

Outcomes