SocketOpenOfficeConnection disconnected unexpectedly

thumbnail
Dominik Marks, modified 5 Years ago. Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
In Liferay 7.0.3 GA4 we are using OpenOffice/LibreOffice to be able to convert documents like .docx to .pdf.

Sometimes this does not work and gives an error. For example if you upload a Word document to the Documents & Media portlet and then click on the link to  download the file as PDF throws the error below. However this only occurs sometimes. Most of the time it works without problems.

10:20:36,980 ERROR [MessageDispatcher][SocketOpenOfficeConnection:100] disconnected unexpectedly
10:20:36,981 WARN  [liferay/document_library_pdf_processor-1][BaseProcessorMessageListener:40] Unable to process file version 255812
com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException: could not obtain service: com.sun.star.frame.Desktop
    at com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection.getService(AbstractOpenOfficeConnection.java:119)
    at com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection.getDesktop(AbstractOpenOfficeConnection.java:124)
    at com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter.loadAndExport(StreamOpenOfficeDocumentConverter.java:100)
    at com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter.convertInternal(StreamOpenOfficeDocumentConverter.java:90)
    at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:82)
    at com.liferay.portlet.documentlibrary.util.DocumentConversionUtil._convert(DocumentConversionUtil.java:216)
    at com.liferay.portlet.documentlibrary.util.DocumentConversionUtil.convert(DocumentConversionUtil.java:63)
    at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl._generateImages(PDFProcessorImpl.java:417)
    at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl.generateImages(PDFProcessorImpl.java:102)
    at com.liferay.document.library.kernel.util.PDFProcessorUtil.generateImages(PDFProcessorUtil.java:34)
    at com.liferay.portlet.documentlibrary.messaging.PDFProcessorMessageListener.generate(PDFProcessorMessageListener.java:30)
    at com.liferay.portlet.documentlibrary.messaging.BaseProcessorMessageListener.doReceive(BaseProcessorMessageListener.java:36)
    at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
    at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
    at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:58)
    at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
    at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.sun.star.lang.DisposedException: java.io.IOException: com.sun.star.io.IOException: java.net.SocketException: Connection reset
    at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:176)



Any idea what I need to check to know what is happening here? How can I "fix" this problem? We are using LibreOffice 5.2.7.2 running on Debian Linux 9.1 and it is started using the following command line: 
/usr/bin/libreoffice --nologo --norestore --invisible --headless --accept='socket,host=0,port=8100,tcpNoDelay=1;urp;'