• OpenKM 6.3 on pi3 Preview doc/excel/ods having error Doc2PDF

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #46506  by aleifuu
 
Hello guys, great work for OpenKM ! I just learned about it few days ago and have started to test it ( or plan to use it throughout our company )

What is more great news, despite requiring the recommended 4GB Ram, I can install it on mini-server pi3 and so far it's servicing request well. A huge update to Intel-running server would be great but that's another issue

Yes, there were some bumps since swftools is not part of Debian package, and hence not making it way to raspbian's repo. This issue was simply solved by building one your own from source and replace bundled pdf2swf to one your own

My current issue however with failed preview of standard office documents like MSDoc, MSExcel, ods for libre/openoffice users

When trying to preview, $TOMCAT_HOME/logs/catalina.log will come with error as follow
Code: Select all
2018-08-08 09:03:21,690 [http-bio-0.0.0.0-8080-exec-12] ERROR com.openkm.servlet.frontend.DocumentServlet- Error in application/vnd.openxmlformats-officedocument.wordprocessingml.document to PDF conversion
com.openkm.core.ConversionException: Error in application/vnd.openxmlformats-officedocument.wordprocessingml.document to PDF conversion
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:330)
        at com.openkm.servlet.frontend.DocumentServlet.convertToPdf(DocumentServlet.java:941)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
        at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)

What I have tried

1. Clear browser cache and enable/re-enable Flash in Chrome browser, and restart OpenKM server => preview for pdf/images work but for docs/excel still same error
2. Configuration check :
Code: Select all
system.swftools.pdf2swf
OK - /opt/openkm/bin/pdf2swf
system.imagemagick.convert
OK - /usr/bin/convert
system.ocr
Not configured
system.openoffice.path
OK - /usr/lib/libreoffice/program/soffice.bin
Yes, I have not enabled nor installed ocr but doesn't seem to be of important issue at the moment

3. I have installed Libreoffice on raspberry and confirm that I can convert .ods to .pdf from command line like and I can open .pdf file and it's
converted nicely
Code: Select all
~/tomcat/logs $ /usr/lib/libreoffice/program/soffice.bin --headless --convert-to pdf ../file.ods
convert ~/file.ods -> ~/file.pdf using filter : calc_pdf_Export
~/tomcat/logs $ which soffice
/usr/bin/soffice
~/tomcat/logs $ ls /usr/lib/libreoffice/program/soffice.bin 
/usr/lib/libreoffice/program/soffice.bin
I haven't tried other browser, but at this point I don't think the problem is client/browser related

Architecture used
Code: Select all
using OpenKM 6.3 community edition, downloaded from SourceForge
raspberry pi 3 running stretch
user@localhost:~ $ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

Cheers,
Arief
 #46522  by jllort
 
Consider pdf2swf as a deprecated tool what no longer is used ( basically flash player was removed or is in process of being removed from browsers what no longer be supported ). Not necessary install it, in the other hand the tool comes into tomcat/bin folder ( as others ready to be used ).

Take a look at OpenKM startup log ( catalina.log ) looking for some error at the end, when is registering the soffice service. Ensure there are not soffice daemon running before starting OpenKM otherwise it will not start.

Finally, take as a suggestion about installing OpenKM in this kind of hardware like mini-server pi3. Well, there's some huge process what might use a lot of ram ( like preview, text extraction among others ). I think if you want this kind of features enabled into a more stable scenario, should thinking on a combination of Conversion, Text Extraction service ( this second is not so clear ) based in a cloud service and OpenKM into the mini server.

The idea will be, you might have several users with mini-server pi3, but when OpenKM need to convert documents to PDF ( for example ) use external cloud for it ( might be a payment service for users who need it ) or Text Extraction, basically the process what might overload this hardware with limited resources. In this scenario you will be able to have a considerable number of documents in your mini server and externalize the huge overload operation to external one ( obviously in this scenario you need good internet connection and you lose some time in remote conversion ).

The cloud service might be a payment one for each users who use the mini server, based in total amount of actions done ( different levels of allowed actions during a month ).
 #46539  by aleifuu
 
Thanks @jilort, I understand your point of view to divert more-hungry resource to something more powerful ( like cloud-based ), however factoring somewhat unstable connection that we have in this country ( Indonesia ) I think performance-wise may just be the same /w running it on mini server raspberrypi3

Having said that, at the moment we don't really concern / demand top-notch performance. As it is, the openkm function well as document management control /w versioning features

Thanks for the suggestion though

I have dig deeper and found that about missing dependency /w sigar on raspberrypi. This dependency was not mentioned in openkm documentation, maybe someone could update that too

The following line solves it
Code: Select all
sudo apt-get install libhyperic-sigar-java
After stopping the server, and set the right LD_LIBRARY_PATH through setenv.sh, the server started and this time previewing doc/excel/ods works fine

On wether pdf2swf still relevant or not in future, I guess for time being the solution is to use old Chrome Client version 44 as suggested
 #46541  by jllort
 
Should not be necessary install sigar libraries in the server, because we have the so into de tomcat/libs/sigar what are into setenv.sh path. Seems you have installed with your own tomcat rather ours, no ? might be because we shared 64 bits and not 32 bits versions.

Files changed into tomcat are:
/libs -> some extra libs into the
OpenKM.cfg
OpenKM.xml
/bin/-> a lot of files here, specially executable files and also setenv.sh and setenv.bat
/conf/server.xml

A good option might be comparing your clean tomcat with what you can download from us to identify all the differences https://sourceforge.net/projects/openkm/files/common/ ( latest we are using is tomcat-8.5.24 although it is also available old 8 )
 #46544  by aleifuu
 
No, I use the bundled tomcat that is available from the sourceforge.
To be exact I downladed from this particular url : https://sourceforge.net/projects/openkm/files/6.3/
And the file was openkm-6.3.0-community-tomcat-bundle.zip

What I found included sigar lib was x86 or 64's sigar version I think. Had to use armv's version for raspberry

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.