Document previews not working

cancel
Showing results for 
Search instead for 
Did you mean: 
ChrisAlker
Active Member II

Document previews not working

Jump to solution

Hi guys, we have a problem in our live system and I built a test system to see if the issue replicates, which it has. The problem I am experiencing, is that when a document is uploaded to the repository, I am getting a message when trying to preview it:  'This document can't be previewed. Click here to download it.'

I can see others have had this issue on the forum, but in the cases I have seen they have made changes from the install configuration, whereas I am working with a new install. I have checked and I can see that soffice.bin is running as a local service.

The file type is a .docx and is around 1.3Mb in size, when it is uploaded Alfresco regognises the mimetype as Microsoft Word 2007.

Interestingly, I did some basic testing and found that the software does not behave the same 100% of the time. I uploaded the document, tried to preview and got the 'document can't be previewed' message, I then deleted the document and uploaded again, this time the preview was available. I deleted and uploaded the document again to see if it would always now show a preview, only this time it did not preview the document. I repeated this around 4-5 times and in all of those cases I got the 'document can't be previewed' message, so out of around 6-7 uploads, only one showed a preview.

Could it be that whatever generates the preview has a very short timeout (as the document takes seconds to upload in all cases)?

1 Solution

Accepted Solutions
EddieMay
Alfresco Employee

Re: Document previews not working

Jump to solution

Hi @ChrisAlker,

I can replicate your issue but only on larger documents ie, > 4MB. As you can see from the screenshot, thumbnails and previews work for the 'Test Large Word Doc 1.doc' file, but fails for the 'Test Large Word 2.docx' file which is 14MB.

Have you had a look at increasing the timeouts - see this document.  It's worth noting the consideration re: allowing one document too many resources as the expense of other users.  This is what I would try next.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

View solution in original post

18 Replies
EddieMay
Alfresco Employee

Re: Document previews not working

Jump to solution

Hi @ChrisAlker,

Are you able to provide any logs, esp. debug info on the Transformers? Also, environment, etc?

Cheers, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
ChrisAlker
Active Member II

Re: Document previews not working

Jump to solution

I can provide a log file if you can advise which one, however, even though I have seen people on here upload files, I do not seem to have anywhere here that I can add a file?

My environment is Alfrsco CE 6.2 on a Bitnami stack on my windows 10 laptop

EddieMay
Alfresco Employee

Re: Document previews not working

Jump to solution

Hi @ChrisAlker,

You possibly don't have permissions to upload at the moment? Just truncate the bit where the transformation error occurs - something like this:

2020-04-24 07:47:36,551 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [ajp-nio-127.0.0.1-8009-exec-11] Exception from executeScript: 03240001 Wrapped Exception (with status template): 03240020 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 03240019 03240018 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/f5f4ff84-4749-4b77-8435-fb7cf924d5a3
org.springframework.extensions.webscripts.WebScriptException: 03240001 Wrapped Exception (with status template): 03240020 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 03240019 03240018 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/f5f4ff84-4749-4b77-8435-fb7cf924d5a3
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1139)
at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:202)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:595)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:664)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:435)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:315)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
at org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:525)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.alfresco.scripts.ScriptException: 03240020 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 03240019 03240018 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/f5f4ff84-4749-4b77-8435-fb7cf924d5a3
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:211)
at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181)
at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109)
at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1376)
at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:146)
... 39 more

Hopefully this will give us something to work on.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
ChrisAlker
Active Member II

Re: Document previews not working

Jump to solution

Thanks Eddie, I think this is the error from the Tomcat logs:

 

2020-04-30 12:24:16,892 ERROR [extensions.webscripts.AbstractRuntime] [ajp-nio-127.0.0.1-8009-exec-5] Exception from executeScript: 03300003 The content node was not specified so the content cannot be streamed to the client: classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js
org.springframework.extensions.webscripts.WebScriptException: 03300003 The content node was not specified so the content cannot be streamed to the client: classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js
at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:176)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:595)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:664)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:435)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:315)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
at org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:508)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

EddieMay
Alfresco Employee

Re: Document previews not working

Jump to solution

Hi @ChrisAlker

There is a thread on the bitnami forum where this issue ('The content node was not specified ....') was resolved  - but that's 4 years old. There was a possible conflict between two versions of Imagemagick running & setting appropriate values in alfresco-global.properties file. It might be worth excluding these possibilities in your own setup.

However, the fact that it sometimes works though *might* point to a memory issue? Perhaps a timeout during the transformation? Can you test with a similar document < 1MB in size? Let us know what the results are please.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
ChrisAlker
Active Member II

Re: Document previews not working

Jump to solution

Hi Eddie,

I followed the advice from the link you gave me and that hasn't changed anything, but I have done some testing with a 12KB file and the 1.3MB file. Out of 5 attempts to upload the files, the 12KB file produced a preview 5 out of 5 times, the 1.3MB file did not produce a preview in any of the 5 attempts.

EddieMay
Alfresco Employee

Re: Document previews not working

Jump to solution

Hi @ChrisAlker,

Thanks for getting back so quickly. So, you've demonstrated that the transformation works as expected on small files - so the original issue is suggestive of a resource or timeout problem. I've just installed Bitnami Mac stack - I'm going to see if I can replicate & resolve. I'll update when I have something useful to add.

Cheers, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
EddieMay
Alfresco Employee

Re: Document previews not working

Jump to solution

Hi @ChrisAlker,

I can replicate your issue but only on larger documents ie, > 4MB. As you can see from the screenshot, thumbnails and previews work for the 'Test Large Word Doc 1.doc' file, but fails for the 'Test Large Word 2.docx' file which is 14MB.

Have you had a look at increasing the timeouts - see this document.  It's worth noting the consideration re: allowing one document too many resources as the expense of other users.  This is what I would try next.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
ChrisAlker
Active Member II

Re: Document previews not working

Jump to solution

Hi @EddieMay 

Many thanks for your help, I've now resolved the issue. For anyone else coming across this thread with the same issue I will list my findings.

Within the link you provided, there was a link to another post (hub.alfresco.com/t5/alfresco-content-services-hub/content-transformation-limits-4-0/ba-p/289784#w_se...

This post states the following:

The initial configuration included the following. However this is a general mechanism which may be used to limit other transformations.

  • Preview of plain text files is limited to 10 MB.
  • Preview of Microsoft Excel (xls and xlsx) files is limited to 1MB.
  • Preview of PDF is limited to 1.25 MB.

I suspected my word/docx file also held the same limit of 1MB.

By then returning to the link that you provided, I updated the global properties file with the following setting (note only for docx files, as each file type has its own file setting):

content.transformer.JodConverter.extensions.docx.pdf.maxSourceSizeKBytes=10000

This set the max file size for preview to 10MB, of course I could have set this much lower at maybe 2MB for performance/resource related reasons.