I'm pulling my hair out over file conversions. I have the following installed:

fileframework 6.x-1.0-alpha2
bitcache 6.x-1.0-alpha2
RDF 6.x-1.x-dev

All of the additional bits (arc, flowplayer, jodconverter, etc) are installed.

When going to the Converters>Mime Converters page it shows that everything is present and enabled. None of the 'scripts' for calling the various converters has been modified in any way.

I have openoffice3 installed and happily running as headless with user www-data (the debian apache user).

I can convert documents with jodconverter from the command line, calling jodconverter as user www-data.

However, when I upload a msword file it is only getting converted to .txt. Other conversions fail with errors like:

File zama.doc, uri=bitcache://ae79367a9cb154c9e16d9f35ed1b88919b2e28c6 was not converted by executing a pipeline {localhost:8100}cd "[tmpdir]"; {mv} "[in_file]" "[in_file].doc"; {java} -jar {{/opt/jodconverter/lib/jodconverter-cli-2.2.1.jar}} -f odt "[in_file].doc"; {mv} "[in_file].doc" "[in_file]"; {mv} "[in_file].odt" "[out_file]". Converted file was empty.

Checking my webserver logs, I see:

INFO: disconnected                                                              
Exception in thread "main" java.lang.IllegalArgumentException: inputFile doesn't
 exist: sites/all/files/tmp/zama.doc.doc                                        
        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOffice
DocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:90)          
        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOffice
DocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:74)          
        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOffice
DocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:70)          
        at com.artofsolving.jodconverter.cli.ConvertDocument.convertOne(ConvertD
ocument.java:134)                                                               
        at com.artofsolving.jodconverter.cli.ConvertDocument.main(ConvertDocumen
t.java:119)                                                                     
mv: cannot stat `sites/all/files/tmp/zama.doc.doc': No such file or directory   
mv: cannot stat `sites/all/files/tmp/zama.doc.odt': No such file or directory   
mv: cannot stat `sites/all/files/tmp/zama.doc': No such file or directory       
gzip: *: No such file or directory                                              
touch: cannot touch `sites/all/files/tmp/zama.doc': No such file or directory

there is write permission to all of the directories in the sites/all/files path.

If I look in my /sites/all/files/tmp directory I find a series of directories that are the uploaded file name with .tmp appended, but the directories are empty.

I'd really appreciate any help that people could provide as to where I'm falling down.

Quick, before all my hair is gone (and I didn't have much when I started)

Thanks

Comments

justin.hopkins’s picture

I suspect that openoffice is not running as the web user (www, www-data, apache, etc). I encountered the same issue and the solve under Ubuntu(where apache runs as www-data) to start openoffice like this:

sudo -u www-data /opt/openoffice.org3/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp" -nofirststartwizard &

I wrote a blog about it just in case others might find some answers. You'll find a start-up script that you might be able to use or modify. Please comment on it if it's helpful or you have anything to add.

http://justin-hopkins.com/blog/2008/12/02/how-to-setting-up-drupal-file-...

gmak’s picture

Justin,

Actually I am using your script (thanks for a great How-to, by the way!).

If I call ps -Af, I see that openoffice is running as the apache user (www-data), so I don't think this is the issue.

It did work for a while, but then seemed to die on me. I've restarted the openoffice service and the web server, but still no joy.

justin.hopkins’s picture

Why not use /tmp or /var/tmp for a tempdir? Installing this again on FreeBSD, I've had issues with the tmpdir in general. Is this running on your own system/VPS, or shared hosting?

justin.hopkins’s picture

What is the output of lsof -i | grep 8100 ?

gmak’s picture

lsof -i | grep 8100 responds with:

soffice.b 2560 www-data 19u IPv4 706473 TCP localhost.localdomain: 8100 (LISTEN)

gmak’s picture

The system is on a dedicated server.

I originally had problems with /tmp as the tempdir, so I changed it to a directory in the Drupal path. I'll try it somewhere else and see what happens.

justin.hopkins’s picture

Since we use sudo -u www-data to get the server started, it would be running as www-data, but...

I've used this to resolve uncertainty about what's in "drupal's path", where exactly it's looking when it says "tempdir", and so on. I'm sure you're familiar with phpinfo(), but maybe you haven't looked there yet.

I'd suggest, if you have the devel module installed, look at devel/phpinfo - or install/enable the php input filter and create a page with

phpinfo();

I had problems at some point because the openoffice server was started up by root, and root's shell variables were exported to the environment. I looked at phpinfo and found that the tempdir variable was /root/tmp - the path variables were roots paths, /root/bin, etc... LOL

gmak’s picture

Status: Active » Fixed

OK. Got this one solved. For some reason, using anything other than /tmp for the temporary directory (as set in drupal's filesystem settings) causes problems with fileframework (for me, at least).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

brianatl’s picture

You need to install the openoffice.org package as well as the openoffice.org-headless and openoffice.org-java-common . This one caught me for a while too.

lexpetrov11’s picture

We want to announce a new Internet site that provides services of converting odt-files to other formats (doc and pdf).

odt online converter will do everything correctly and quickly. By the way, a significant benefit is presented in an online mode: you simply do not need to pass the registration, but only specify the correct path to your file.

Please note that the site was created on the funds from your donations, so we appeal to anyone who wants to see other similar services in future: Make a donation! Your little contribution to our “piggy bank” is truly a big help and support on this path.

Site Administration