Maxim, I completely forgot that this is its own process -- no Apache web server... Everything has been running as root (I'll change that later once everything is working correctly .. AND turn on selinux again).
Here's what is happening when OM attempts to convert: Here's the command that OM is executing: java -Doffice.home=/usr/lib64/libreoffice -cp /opt/jodconverter-core-3.0-beta-4/lib/commons-io-1.4.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/juh-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/jurt-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/ridl-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/unoil-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/commons-cli-1.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/json-20090211.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar -jar /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar /opt/red5303/webapps/openmeetings/uploadtemp/files/8ccfad9d8bd6a720662bb80b4580e66a.doc /opt/red5303/webapps/openmeetings/upload/files/8ccfad9d8bd6a720662bb80b4580e66a/8ccfad9d8bd6a720662bb80b4580e66a.pdf And here's what is happening with it: Dec 04, 2014 11:03:49 PM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init> INFO: ProcessManager implementation is LinuxProcessManager Dec 04, 2014 11:03:49 PM org.artofsolving.jodconverter.office.OfficeProcess start INFO: starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002' Dec 04, 2014 11:03:49 PM org.artofsolving.jodconverter.office.OfficeProcess start INFO: started process; pid = 18757 Exception in thread "main" 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 org.artofsolving.jodconverter.cli.Convert.main(Convert.java:112) 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) ... 3 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) 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: 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 Again, when I run this by hand, it works flawlessly. What could be going on? Some kind of Java security issue? Here's the same command (with the input file changed) along with the output: java -Doffice.home=/usr/lib64/libreoffice -cp /opt/jodconverter-core-3.0-beta-4/lib/commons-io-1.4.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/juh-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/jurt-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/ridl-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/unoil-3.2.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/commons-cli-1.1.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/json-20090211.jar -cp /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar -jar /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar /opt/red5303/webapps/openmeetings/upload/files/8ccfad9d8bd6a720662bb80b4580e66a/8ccfad9d8bd6a720662bb80b4580e66a.doc /opt/red5303/webapps/openmeetings/upload/files/8ccfad9d8bd6a720662bb80b4580e66a/8ccfad9d8bd6a720662bb80b4580e66a.pdf Dec 04, 2014 11:10:07 PM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init> INFO: ProcessManager implementation is LinuxProcessManager Dec 04, 2014 11:10:07 PM org.artofsolving.jodconverter.office.OfficeProcess start INFO: starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002' Dec 04, 2014 11:10:07 PM org.artofsolving.jodconverter.office.OfficeProcess start INFO: started process; pid = 19497 Dec 04, 2014 11:10:12 PM org.artofsolving.jodconverter.office.ManagedOfficeProcess$6 attempt WARNING: office process died with exit code 81; restarting it Dec 04, 2014 11:10:12 PM org.artofsolving.jodconverter.office.OfficeProcess start INFO: starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002' Dec 04, 2014 11:10:12 PM org.artofsolving.jodconverter.office.OfficeProcess start INFO: started process; pid = 19525 Dec 04, 2014 11:10:17 PM org.artofsolving.jodconverter.office.OfficeConnection connect INFO: connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' Dec 04, 2014 11:10:20 PM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager stop INFO: stopping Dec 04, 2014 11:10:20 PM org.artofsolving.jodconverter.office.OfficeConnection$1 disposing INFO: disconnected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' Dec 04, 2014 11:10:20 PM org.artofsolving.jodconverter.office.ManagedOfficeProcess doEnsureProcessExited INFO: process exited with code 0 Dec 04, 2014 11:10:20 PM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager stop INFO: stopped On 12/4/2014 9:38 PM, Maxim Solodovnik wrote: > The file is initially being uploaded into uploadtemp and converted > from that folder, then moved to upload (might be redundant and > definitely will be simplified in future versions) > > Actually jodconverter might fail to convert as user "nobody", I saw > this couple of times and was able to fix by setting HOME=/nonexistent > in /etc/init.d/red5 script > > On Fri, Dec 5, 2014 at 9:49 AM, Ian <openmeeti...@zestysoft.com > <mailto:openmeeti...@zestysoft.com>> wrote: > > I just checked the source and I doubt this is a bug now. Simple stuff > -- convert to pdf, create some thumbnails, create the swf, and then > move the file from the uploadtemp folder. > > My only guess is that there is some type of path/environment variable > issue that is stopping java from working the same as when I run the > commands manually. I assume that is what all of those -cp are about > since I didn't need any of them to successfully convert to pdf? > > I'm going to switch to the apache user and run the same command... > maybe > that will shed some light on what is breaking. > > On 12/4/2014 1:02 PM, Ian wrote: > > After uploading a ppt and pptx file, I'm finding that I cannot > open them > > -- I get a DELETED image on the whiteboard instead. > > > > Digging deeper, I see that the file has uploaded, but that no > other part > > of the conversion has occurred. > > > > The logs show the file being uploaded, and the conversion > command executing: > > > > DEBUG 12-04 12:19:21.688 ProcessHelper.java 188867 104 > > org.apache.openmeetings.util.process.ProcessHelper > > [http-nio-0.0.0.0-5080-exec-6] - START doJodConvert > ################# > > DEBUG 12-04 12:19:21.688 ProcessHelper.java 188867 105 > > org.apache.openmeetings.util.process.ProcessHelper > > [http-nio-0.0.0.0-5080-exec-6] - java > > -Doffice.home=/usr/lib64/libreoffice -cp > > /opt/jodconverter-core-3.0-beta-4/lib/commons-io-1.4.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/juh-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/jurt-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/ridl-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/unoil-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/commons-cli-1.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/json-20090211.jar -cp > > > /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar > > -jar > > > /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar > > > > /opt/red5303/webapps/openmeetings/uploadtemp/files/9f36f633d4c43988521833c9265ac935.pptx > > > > /opt/red5303/webapps/openmeetings/upload/files/9f36f633d4c43988521833c9265ac935/9f36f633d4c43988521833c9265ac935.pdf > > DEBUG 12-04 12:19:21.688 ProcessHelper.java 188867 106 > > org.apache.openmeetings.util.process.ProcessHelper > > [http-nio-0.0.0.0-5080-exec-6] - END doJodConvert ################# > > DEBUG 12-04 12:19:21.923 ProcessHelper.java 189102 148 > > org.apache.openmeetings.util.process.ProcessHelper > > [http-nio-0.0.0.0-5080-exec-6] - exitVal: 1 > > > > but note the time fields -- it is exiting milliseconds after > starting. > > > > When I execute that command manually, it states that the input > file is > > missing -- likely because it's looking in the uploadtemp folder > and not > > the final destination of > > > > '/opt/red5303/webapps/openmeetings/upload/files/9f36f633d4c43988521833c9265ac935' > > > > Is this a bug? Should the converter be looking for the source > file at a > > different location? > > > > When I adjust the command to find the source file where it currently > > resides, I eventually get a timeout exception instead, and this > takes a > > LONG time to happen -- not in the milliseconds range. > > > > This is the modified command: > > java -Doffice.home=/usr/lib64/libreoffice -cp > > /opt/jodconverter-core-3.0-beta-4/lib/commons-io-1.4.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/juh-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/jurt-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/ridl-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/unoil-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/commons-cli-1.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/json-20090211.jar -cp > > > /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar > > -jar > > > /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar > > > > /opt/red5303/webapps/openmeetings/upload/files/9f36f633d4c43988521833c9265ac935/9f36f633d4c43988521833c9265ac935.pptx > > > > /opt/red5303/webapps/openmeetings/upload/files/9f36f633d4c43988521833c9265ac935/9f36f633d4c43988521833c9265ac935.pdf > > > > Assuming that the pptx file just isn't convertible with this > system, I > > uploaded a ppt file instead. > > > > Same initial results -- immediate exit from the conversion > program with > > DELETED shown on the whiteboard. > > > > However, when I manually run the command pointing to where the > source > > file is actually located, this time the pdf file is successfully > created: > > java -Doffice.home=/usr/lib64/libreoffice -cp > > /opt/jodconverter-core-3.0-beta-4/lib/commons-io-1.4.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/juh-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/jurt-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/ridl-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/unoil-3.2.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/commons-cli-1.1.jar -cp > > /opt/jodconverter-core-3.0-beta-4/lib/json-20090211.jar -cp > > > /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar > > -jar > > > /opt/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar > > > > /opt/red5303/webapps/openmeetings/upload/files/34c77a6ad9556313215a9368f9320f9e/34c77a6ad9556313215a9368f9320f9e.ppt > > > > /opt/red5303/webapps/openmeetings/upload/files/34c77a6ad9556313215a9368f9320f9e/34c77a6ad9556313215a9368f9320f9e.pdf > > > > Of course, that still doesn't help get it to show up on the > whiteboard, > > because the corresponding swf file wasn't also created. > > > > I should note that uploading pdf files into OM works correctly > -- they > > correctly appear on the whiteboard, so at least that part of the > > workflow is working properly. > > > > > -- > WBR > Maxim aka solomax