JOD Converter is not working anymore

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

JOD Converter is not working anymore

Jump to solution

Since serveral week, I cannot preview office documents anymore. Therefore I shutdown the alfresco instance. During restart the following jodconverter error is displayed in alfresco.log:

2020-05-05 09:13:48,482 ERROR [org.alfresco.repo.content.JodConverterSharedInstance] [localhost-startStop-1] Unable to start JodConverter library. The following error is shown for informational purposes only.
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:62)
        at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:96)
        at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:60)
        at org.alfresco.repo.content.JodConverterSharedInstance.afterPropertiesSet(JodConverterSharedInstance.java:364)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
        at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:824)
        at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:1098)
        at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:637)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:221)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:186)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:206)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:60)
        ... 41 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:141)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:29)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:56)
        ... 5 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: office process died with exit code 77
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$6.attempt(ManagedOfficeProcess.java:135)
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:34)
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:24)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:139)
        ... 7 more
2020-05-05 09:13:48,512 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] complete

After some research I found the same error in the jodconverter google user group (https://github.com/sivanthiinfowave/jodconverter/issues/109). The only solution provided is to change the implementation how the JODConverter object is created.

Has someone the same problem and found another solution?

System:

  • Ubuntu 18.04.4 LTS
  • LibreOffice 6.0.7.3 00m0(Build:3)
  • Community - 6.2.

Thanks,

Florian

1 Solution

Accepted Solutions
ryo39
Active Member II

Re: JOD Converter is not working anymore

Jump to solution

Hi, Florian

I think the exit code 77 shown in the log is a permission denied.

Do you launch your alfresco process as a correct user?

Correct user means that the user you use to launch alfresco process has a permission to execute 'soffice.bin'.

Best,

ryo

 

View solution in original post

7 Replies
ryo39
Active Member II

Re: JOD Converter is not working anymore

Jump to solution

Hi, Florian

I think the exit code 77 shown in the log is a permission denied.

Do you launch your alfresco process as a correct user?

Correct user means that the user you use to launch alfresco process has a permission to execute 'soffice.bin'.

Best,

ryo

 

nettania
Active Member II

Re: JOD Converter is not working anymore

Jump to solution

Hi,

thank you for your repsonse, you are right, there is a permission issue. If I start alfresco as root user it is working. However I can run soffice.bin also with the user who runs alfresco.

Does someone knows how to test the user privileges required to execute JOD conveter, I do not want to run alfresco as root.

Thanks,

Florian

ryo39
Active Member II

Re: JOD Converter is not working anymore

Jump to solution

Hi,

How did you install your alfresco?  at that time which user was used to install?

JODConverter creates and use  temporary directory : $ALFRESCO/tomcat/temp/(like .jodconverter_socket_host-127.0.0.1_port-8100) on my environment and also tomcat puts various log files into $ALFRESCO/ , $ALFRESCO/tomcat/logs. I think that you would better to be an owner of alfresco.

Best,

ryo

 

nettania
Active Member II

Re: JOD Converter is not working anymore

Jump to solution

I installed Allfresco from scratch, meaning without Docker.

I am just wondering, because everything has worked fine since month, and suddenly I get this error. Therefore I am not sure if this is not a result of an update.

Alfresco runs under his own user and that user has full access to /usr/local/alfresco which contains al required application and libraries except PorstgreSQL, openoffice, and imagemagick which I installed as debian packages.

I will check the again permission and ownerships.

Florian

nettania
Active Member II

Re: JOD Converter is not working anymore

Jump to solution

Hi,

finally I found the reason for thic exception during startup. Thank you to @ryo39 it was a permission problem with the libreoffice cache. After I changed the permission of WHATEVER_YOUR_LIBREOFFICE_DIRECTORY_IS/share/uno_packages/cache/uno_packages/ to a+rx (chmod a+rx WHATEVER_YOUR_LIBREOFFICE_DIRECTORY_IS/share/uno_packages/cache/uno_packages/) it resumed working.

I am not sure what was the reason for this wrong permissions, but I still think that probably an update changed the permissions.

However thank you for your help!!!

Florian

EddieMay
Alfresco Employee

Re: JOD Converter is not working anymore

Jump to solution

Hi @nettania,

Great news to see that you've resolved your problem - thanks for reporting back. So helpful to other users.

Take care, 

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

Re: JOD Converter is not working anymore

Jump to solution

Thanks for sharing your solution.

I had a similar problem on zip instal with Ubuntu20.04 on arm64.

Incredibly, a similar (parallel) install on  Ubuntu20.04 + amd64 di not show this issue in the log file.

You tip solved the "error 77" problem...

 

PS

May I aks how did you find the "specific" directory that was preventing the jodconverter to run (there are a lot of them in libreoffice installation tree) ?