Error de Previsualizacion - Error in application/vnd.ms-* to PDF conversion - Centos 6.x

Problemas con la instalación de OpenKM? No problemo, la solución está más cerca de lo que piensas.
Forum rules
Por favor, antes de preguntar algo consulta el wiki de documentación o utiliza la función de búsqueda del foro. Recuerda que no tenemos una bola de cristal ni poderes mentales, o sea que que para informar sobre un error es necesario que nos indiques tanto la versión de OpenKM que usas como la del navegador y sistema operativo. Para más información consulta Cómo informar de fallos de forma efectiva.
Post Reply
Carjosdan
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Wed Feb 25, 2015 8:29 pm

Error de Previsualizacion - Error in application/vnd.ms-* to PDF conversion - Centos 6.x

Post by Carjosdan » Thu Mar 16, 2017 3:44 pm

Buenas,

Información relevante:

S.O. : Centos Server 6.8
v6.3.0-community

Aún cuando la instalación de:

system.swftools.pdf2swf
OK - /opt/openkm-6.3.0-community/tomcat/bin/pdf2swf
system.imagemagick.convert
OK - /usr/bin/convert
system.ocr
Not configured
system.openoffice.path
OK - /usr/lib/libreoffice/program/soffice.bin


Al momento de realizar previsualizaciones con cualquier archivo de tipo Office lanza el error:

Error in application/vnd.ms-* to PDF conversion

el catalina.log muestra la siguientes lineas de error:

Code: Select all

 [http-bio-0.0.0.0-8080-exec-3] ERROR [b]com.openkm.servlet.frontend.ConverterServlet- Error in application/vnd.ms-excel to PDF conversion
com.openkm.core.ConversionException: Error in application/vnd.ms-excel to PDF conversion[/b]
	at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:330)
	at com.openkm.servlet.frontend.ConverterServlet.toPDF(ConverterServlet.java:246)
	at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:301)
	at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:145)
	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)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
	at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:70)
	at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:78)
	at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:69)
	at com.openkm.util.DocConverter.convert(DocConverter.java:273)
	at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:327)
	... 46 more
Por favor si pueden darme una luz/idea para solucionarlo estaré muy agradecido.
Saludos Cordiales.
Last edited by Carjosdan on Fri Mar 17, 2017 2:29 pm, edited 1 time in total.

jllort
Moderator
Moderator
Posts: 9708
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error de Previsualizacion - Error in application/vnd.ms-* to PDF conversion - Centos 6.x

Post by jllort » Fri Mar 17, 2017 9:52 am

Veo que el path del libreoffice lo tienes bien /usr/lib/libreoffice/program/soffice.bin pero esto no quiere decir que OpenKM arranque el servicio, fíjate en el erro rque te da

Code: Select all

Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
Probablemente al instalar el office te falta alguno paquete. Fíjate en esta sección de la documentación https://docs.openkm.com/kcenter/view/ok ... tml#CentOS donde se indican 3 paquetes que deberías tener ( en especial el headless, sin este paquete el servicio de office no se va a levantar ).

Mira el log ( al final de l proceso de carga, ahora te debe estar dando un error de que el servicio de office no lo esta arrancando ). Deberías tener un proceso soffice.bin corriendo después de arrancar OpenKM.

Carjosdan
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Wed Feb 25, 2015 8:29 pm

Re: Error de Previsualizacion - Error in application/vnd.ms-* to PDF conversion - Centos 6.x

Post by Carjosdan » Fri Mar 17, 2017 2:27 pm

Buenas, en efecto aparece este warn:

Code: Select all

[localhost-startStop-1] INFO  org.artofsolving.jodconverter.office.ProcessPoolOfficeManager- ProcessManager implementation is SigarProcessManager
2017-03-17 05:17:36,884 [OfficeProcessThread-0] WARN  org.artofsolving.jodconverter.office.OfficeProcess- profile dir '/opt/openkm-6.3.0-community/tomcat/temp/.jodconverter_socket_host-127.0.0.1_port-2002' already exists; deleting
2017-03-17 05:17:36,896 [OfficeProcessThread-0] INFO  org.artofsolving.jodconverter.office.OfficeProcess- starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/opt/openkm-6.3.0-community/tomcat/temp/.jodconverter_socket_host-127.0.0.1_port-2002'
2017-03-17 05:17:36,914 [OfficeProcessThread-0] INFO  org.artofsolving.jodconverter.office.OfficeProcess- started process; pid = 1981
2017-03-17 05:17:37,622 [localhost-startStop-1] WARN  com.openkm.servlet.RepositoryStartupServlet- failed to start and connect
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:64)
	at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)
	at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:62)
	at com.openkm.util.DocConverter.start(DocConverter.java:190)
	at com.openkm.servlet.RepositoryStartupServlet.start(RepositoryStartupServlet.java:279)
	at com.openkm.servlet.RepositoryStartupServlet.init(RepositoryStartupServlet.java:127)
	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:62)
	... 22 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:142)
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:31)
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:58)
	... 5 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: office process died with exit code 0
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess$6.attempt(ManagedOfficeProcess.java:136)
	at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:40)
	at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:30)
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:120)
	... 7 more
revisando la documentación que me linkeaste encontré que había una paquetería faltante como me indicabas en el post. Los paquetes impresindibles son:

libreoffice-ure.x86_64 ( ure )
libreoffice-headless.x86_64 ( headless )
libreoffice-pyuno.x86_64 ( pyuno )

en mi caso solo faltaba instalar el "headles". Dejo información adicional por si alguna otra persona la necesita, en mi caso he realizado la instalación del LibreOffice desde el repositorio del Centos 6.8. Muchísimas gracias jllort por el apoyo, ya todo resuelto.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest