On 22/04/2022 15:38, Dave Howorth wrote: ....
What investigation have you done? Why do you think the problem is with LO rather than with mojolicious or somewhere in between? Also, what is runcmd()?
Sorry, should have said it's a wrapper for perl's open3() (itself a wrapper for system() ) which runs the given command. But see below.
.
Steps I would be thinking of trying: (1) add debugging prints to the mojolicious code so you can see exactly what arguments are passed on each occasion (2) for some case where the problem occurs run LO directly from the command line with the same arguments and see if the problem occurs
Thanks for the reply. I've been banging my head against a wall, because all of mojolicious, perl's IPC and LO are to varying degrees unfamiliar. I certainly mis-understood what I was seeing, processes running LO and with the web network port listening: it's actually correct and harmless.
The problem is now resolved, and at the root was related to running the program detached as a daemon. I had a web server running LO internally, which ran correctly from a terminal; ran correctly when detached with magic using () and shell redirects; but which failed when run "properly" with freebsd's 'daemon' command.
Obvious in hindsight, the issue was that the daemon, running as user www, didn't have access to a writeable home directory, so LO couldn't run because it needs a rather large file tree there. That was compounded with my misunderstanding of perl's open3() error handling.
I'm now using the -env:UserInstallation=XXXXXX option to give LO a temporary place to put its bits and bobs, and all - finally - seems to function. At least, LO runs and does the conversions. I do wonder why there's an oosplash process started when I'm using --nologo and --headless though! It also creates more soffice.bin processes than I'd expect, but they seem to tidy themselves away eventually.
I'm not sure why I had so much trouble here, compared to a couple of years ago, when I was running LO from apache/php without particular bother.
All's well that end's well, I guess. Mojolicious has a steep learning curve, but is much easier and cleaner to use than php for this job. LO works, albeit slowly -- ~20 seconds to do the .odt->.doc conversion on a pi4.
Again, thanks. -- Mike Scott Harlow, Essex, England -- Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk) Harlow Essex England "The only way is Brexit" -- anon. -- To unsubscribe e-mail to: [email protected] Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
