cancel
Showing results for 
Search instead for 
Did you mean: 

'Download unsucessfull' when downloading using Android app

jonvargas
Confirmed Champ
Confirmed Champ
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
4 REPLIES 4

arcko
Champ in-the-making
Champ in-the-making
This should be caused by tomcat 7 bug, here are some info
ClientAbortException:  java.io.IOException: Failed to send AJP message
https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
Bug 53119 - java.nio.BufferOverflowException in AjpAprProcessor.output() when AJP client disconnects
http://svn.apache.org/viewvc?view=revision&revision=1344253

robaczka
Champ in-the-making
Champ in-the-making
I have similar problem with my androidSmiley Sad

gavinc
Champ in-the-making
Champ in-the-making
What configuration have you put in place on the Alfresco repository to handle the proxy?

Have you tried the steps in this JIRA issue: https://issues.alfresco.com/jira/browse/ALF-17109 ?

Hi Gavin, sorry for my late response. The issue was solved after upgrading to a nightly snapshot of Alfresco Community 4.2.d and disabling the use of SSL. Now I am testing a new nightly snapshot and with SSL, to see what happens.