pdf conversion in Apache/WSGI -> ErrorCodeIOException

Asked by Christian Jauvin

Hi,

First of all thank you for the fantastic appy.pod module, I find it's a great idea!

I have two Ubuntu boxes: one running 10.04 + OO 3.2, the other 12.04 + LO 3.5 (both OO/LO are running in headless mode).

On both machines, when I use appy.pod in a simple script to produce a pdf document, it runs fine.

However, when I run the same code inside Apache (as a WSGI app), it fails with a "com.sun.star.task.ErrorCodeIOException".

I googled extensively for it, and I'm aware that this is probably permission-related, but no matter how I try to chmod/chown the implied directories, I can never get it to work.

Any hint would be very appreciated.. thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Appy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Christian Jauvin (cjauvin) said :
#1

Ahh I think I found a solution, which is two-fold:

(1) The Apache user (www-data on Ubuntu) has to have write access to its home directory:

$ sudo chmod g+w /var/www

Note that I'm not sure if this is the best/safest way to do it.

(2) OO/LO has to be run as the Apache user. On my 10.04 + OO 3.2 box:

$ sudo su www-data -c 'soffice -headless "-accept=socket,host=localhost,port=2002;urp;" &'

On my 12.04 + LO 3.5 box:

$ sudo su www-data -c 'soffice --headless "--accept=socket,host=localhost,port=2002;urp;" &'

Notice the "-" vs. "--" in the command-line arguments.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Gaëtan Delannay (gaetan-delannay) said :
#3

Hi Christian,
You problem may be tied to this one, which is currently under discussion:
https://answers.launchpad.net/appy/+question/216630
Thanks for your feedback,
Gaetan

Revision history for this message
Gaëtan Delannay (gaetan-delannay) said :
#4

Solved.