cancel
Showing results for 
Search instead for 
Did you mean: 

Share - Document Preview fails [Solved]

riktaminaars
Champ on-the-rise
Champ on-the-rise
Hi

Running a fresh install of Alfresco Community 4.2.0 on Linux (headless ubuntu x64), everything is default except for enabling SSO/LDAP auth (works fine).
Uploading a .pdf generates a nice thumbnail and flash preview so pdf2swf works well…

Uploading anything other than .pdf does not generate a preview or a thumbnail and results in "This document can not be previewed" (except for .png, which doesn't need conversion anyway)

We use Libreoffice so previews for those .odt and .odp files would be very useful.

So obviously I can not seem to get it working. Things I've tried:

- Updating the Libreoffice binaries in /opt/alfresco
- Running Imagemagick / Ghostscript / pdf2swf seperatly to check for issues (./common/bin/convert & ./common/bin/gs)
- Using JOD instead of OOO in alfresco-global



Ideas & suggestions welcome…

alfresco-global.properties


…snip…
### External executable locations ###
ooo.exe=/opt/alfresco-4.2.c/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/opt/alfresco-4.2.c/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=/opt/alfresco-4.2.c/common/bin/pdf2swf
swf.languagedir=/opt/alfresco-4.2.c/common/japanese

jodconverter.enabled=false
jodconverter.officeHome=/opt/alfresco-4.2.c/libreoffice
jodconverter.portNumbers=8100
…snip…



ps aux | grep alfresco


postgres 19443  0.0  0.0  53936  4348 ?        Ss   13:33   0:00 /opt/alfresco-4.2.c/postgresql/bin/postgres -D /opt/alfresco-4.2.c/alf_data/postgresql
root     19465 17.5 14.6 6222892 1193704 pts/0 Sl   13:34   6:34 /opt/alfresco-4.2.c/java/bin/java -Djava.util.logging.config.file=/opt/alfresco-4.2.c/tomcat/conf/logging.properties -XX:MaxPermSize=512m -Xms128m -Xmx1024m -XX:-DisableExplicitGC -Djava.awt.headless=true -Dalfresco.home=/opt/alfresco-4.2.c -Dcom.sun.management.jmxremote -Dsun.security.ssl.allowUnsafeRenegotiation=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/alfresco-4.2.c/tomcat/endorsed -classpath /opt/alfresco-4.2.c/tomcat/bin/bootstrap.jar:/opt/alfresco-4.2.c/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/alfresco-4.2.c/tomcat -Dcatalina.home=/opt/alfresco-4.2.c/tomcat -Djava.io.tmpdir=/opt/alfresco-4.2.c/tomcat/temp org.apache.catalina.startup.Bootstrap start
root     19613  0.0  0.5 494476 47624 pts/0    Sl   13:35   0:00 /opt/alfresco-4.2.c/libreoffice/program/soffice.bin –accept=socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager -env:UserInstallation=file:///opt/alfresco-4.2.c/alf_data/oouser –headless –nocrashreport –nofirststartwizard –nologo –norestore


catalina.out with log4j debug enabled (complete log is 32 Mb.. alot of restarting etc.)


2013-04-11 13:47:06,217  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-7] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:06,219  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-4] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.text
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:06,220  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-4] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.text
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:06,221  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.presentation
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:06,221  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.presentation
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:06,222  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-2] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:06,222  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-2] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,024  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-4] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,024  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-4] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,064  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,064  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,065  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,065  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,066  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,066  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: application/x-shockwave-flash
   transformers: []
2013-04-11 13:47:11,066  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,066  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,067  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,067  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,067  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,067  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,132  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,132  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,214  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-1] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,214  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-1] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,305  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-7] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,305  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-7] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,369  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-5] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,370  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-5] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,433  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-9] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,433  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-9] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,498  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-8] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,498  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-8] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,585  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-3] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,585  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-3] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,648  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-10] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,648  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-10] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,728  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,728  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-12] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:11,790  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:11,790  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,602  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,602  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,612  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.presentation
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,612  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.presentation
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,621  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.text
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,622  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.text
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,631  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,631  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,835  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-6] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,835  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-6] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,888  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-8] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.text
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,888  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.presentation
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,888  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-8] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.text
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,888  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-11] Searched for transformer:
   source mimetype: application/vnd.oasis.opendocument.presentation
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:14,889  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-6] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:14,889  DEBUG [content.transform.ContentTransformerRegistry] [http-apr-8080-exec-6] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/png
   transformers: []
2013-04-11 13:47:15,178  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8443-exec-10] Searched for transformer:
   source mimetype: text/plain
   target mimetype: image/jpeg
   transformers: []
2013-04-11 13:47:15,178  DEBUG [content.transform.ContentTransformerRegistry] [http-bio-8443-exec-10] Searched for transformer:
   source mimetype: text/plain
   target mimetype: text/plain
   transformers: [StringExtractingContentTransformer[ average=1ms], TikaAutoContentTransformer[ average=6ms]]
2013-04-11 13:47:15,178  DEBUG [content.transform.TransformerDebug] [http-bio-8443-exec-10] 25           txt  txt  346b6e11-2866-4b0c-878b-950b9a54c97b 285 bytes NodeContentGet
2013-04-11 13:47:15,179  DEBUG [content.transform.TransformerDebug] [http-bio-8443-exec-10] 25           **a) transformer.StringExtracter           1 ms
2013-04-11 13:47:15,179  DEBUG [content.transform.TransformerDebug] [http-bio-8443-exec-10] 25             b) transformer.TikaAuto                  6 ms
2013-04-11 13:47:15,179  DEBUG [content.transform.TransformerDebug] [http-bio-8443-exec-10] 25.1         txt  txt  <<TemporaryFile>> 285 bytes transformer.StringExtracter
2013-04-11 13:47:15,180  DEBUG [content.transform.TransformerDebug] [http-bio-8443-exec-10] 25           Finished in 2 ms



6 REPLIES 6

enkidu
Champ in-the-making
Champ in-the-making
hi mate,
try this in your alfresco-global.properties

img.coders=${img.root}\\modules\\coders
img.config=${img.root}\\config
img.gslib=${img.root}\\lib

and restart your alfresco.

(maybe this link is also interesting for u: http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/config/alf...)

riktaminaars
Champ on-the-rise
Champ on-the-rise
Thanks for the suggestion, unfortunatly there was no change.

I've scrolled through the logs again and came across this:


2013-04-12 08:59:03,287  WARN  [alfresco.util.OpenOfficeConnectionTester] [localhost-startStop-1] An initial OpenOffice connection could not be established.


As a test I've installed an Ubuntu x64 headless 12.10, updated and upgraded and then installed alfresco: ofcourse that works out of the box… In those logs I found the same message "initial connection could not be made, but in less than 10 seconds it stated that: "OpenOffice connection re-established"

Pretty sure the problem is the libreoffice <-> alfresco connection.

Any ideas on how to re-establish or test the connection ?

Right, solved it.

"telnet 127.0.0.1 8100" worked, but "telnet localhost 8100" didn't… last command returned:


/opt/alfresco-4.2.c# telnet localhost 8100
Trying ::1…
telnet: Unable to connect to remote host: Connection refused


The ::1 part lead in the direction of a ipv6 issue, adjusting the /etc/hosts file fixed it.

ttownsend
Champ on-the-rise
Champ on-the-rise
Hi Rik,

I'm curious - what change did you make in /etc/hosts?

Cheers,
Trevor

eihab86
Champ in-the-making
Champ in-the-making
You can add the property ooo.host set to 127.0.0.1 instead of localhost in alfresco-global.properties. I think this will solve the issue.

sim2487
Confirmed Champ
Confirmed Champ
I am unable to open the pdf document which is inside the word document at the time of document preview. Is there any way alfresco have to do this?