Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
SocketOpenOfficeConnection disconnected unexpectedly
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.
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:
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;'
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™