Monday, 6 April 2015

Thumbnail generation failing in alfresco

Many of us might be facing issues in alfresco while generating thumbnails for uploaded files.
My alfresco version : Alfresco 4.2.f Community Edition

I have just applied an inbound rule on a folder in alfresco which 'Executes a script' named 'generateThumbnail.js' when a file
is uploaded in that space.

Code in js:
document.createThumbnail("doclib", true);
document.save();

I was facing a problem that for all other mimetypes except images, the thumbnail was not generated in alfresco.
I was getting 'Creation of thumbnail 'doclib' failed' error.

The issue in my case was : The path of imagemagick was incorrectly picked up.
I had previously installed an ephesoft instance on my local machine (Windows 7 64-bit);
which had set multiple paths in my environment variables and had set a couple of entries in windows registry.
This made alfresco pick up incorrect path of imagemagick everytime from windows registry.
I had to go to the registry (edit/modify the path set) and give my alfresco's imagemagick path.
This worked for me.

Reference Link : http://www.imagemagick.org/discourse-server/viewtopic.php?t=15056#p52945


In some other scenarios, where you might face this issue, you can try some of the following steps:

1) Make sure your thumbnail generation property is set to true (you will find it in repository.properties if not overridden; if you have
   overridden it then it may exist in alfresco-global.properties):
   system.thumbnail.generate=true 

   Based on the file(s) size you upload; there are a certain properties which are defaulted to -1.
   Check them based on your requirement.

    # Default thumbnail limits
# When creating thumbnails, only use the first pageLimit pages
system.thumbnail.definition.default.timeoutMs=-1
system.thumbnail.definition.default.readLimitTimeMs=-1
system.thumbnail.definition.default.maxSourceSizeKBytes=-1
system.thumbnail.definition.default.readLimitKBytes=-1
system.thumbnail.definition.default.pageLimit=1
system.thumbnail.definition.default.maxPages=-1

# Max mimetype sizes to create thumbnail icons
system.thumbnail.mimetype.maxSourceSizeKBytes.pdf=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.txt=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.docx=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.xlsx=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.pptx=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.odt=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.ods=-1
system.thumbnail.mimetype.maxSourceSizeKBytes.odp=-1



2) Check the alfresco logs which may be trying to point out something related to root cause.
   Enable transformer debug in log4j.properties to get the transformation logs:
log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=DEBUG

3) Verify the path of your imagemagick is correct and alfresco is not picking up some other imagemagick instance (which may be an older version or
   may not be compatible with your alfresco version)

4) You can try switching from OOoDirect to JODConvertor; by setting the following properties to true|false and vice versa.
   ooo.enabled=false
   jodconverter.enabled=true

5) You can update some binaries or libraries used by Imagemagick to newer version.

6) Also check that you are not getting the error - An initial OpenOffice connection could not be established.
   In this case, you need to check your openoffice connection. The following link has some pointers :
   https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/share-document-preview-fails

7) In some cases, you may try reinstalling imagemagick :
   http://docs.alfresco.com/4.1/tasks/imagemagick-config.html

8) For Windows/ImageMagick 6.5.x issue and other related issues, you can go through : https://wiki.alfresco.com/wiki/ImageMagick_Configuration

9) Some ImageMagick configuration file related stuff can be found at :
   http://www.imagemagick.org/script/resources.php

10) For normal content transformation problems and limits in alfresco, I think this is the best link :
   https://wiki.alfresco.com/wiki/Content_Transformation_Limits

11) For some scenarios, this link be useful :
http://keytocontent.blogspot.in/2010/03/reviving-alfresco-share-thumbnail-and.html

Thank you for going through the blog.

3 comments:

  1. Hi
    I am facing the same problem
    How can you apply inbound rule?
    Can you please describe the steps?

    ReplyDelete
  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Alfresco, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Alfresco. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/




    ReplyDelete
  3. Passionatesanket: Thumbnail Generation Failing In Alfresco >>>>> Download Now

    >>>>> Download Full

    Passionatesanket: Thumbnail Generation Failing In Alfresco >>>>> Download LINK

    >>>>> Download Now

    Passionatesanket: Thumbnail Generation Failing In Alfresco >>>>> Download Full

    >>>>> Download LINK Iu

    ReplyDelete