unoconv 0.3 doesn't know how to work with libreoffice ("Unable to start listener")

Bug #759184 reported by PeterPall
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
unoconv (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: unoconv

On my System (Natty/Libreoffice) unoconf tries to start soffice.bin from loads of directories. But my system only contains a soffice folder without ".bin".

The naive approach of doing a
sudo ln -s /usr/bin/soffice /usr/bin/soffice.bin

results in an error message telling that soffice.bin.bin cannot be found. But this error message seems to be issued by the script /usr/bin/soffice

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unoconv 0.3-6
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
NonfreeKernelModules: wl
Architecture: i386
Date: Tue Apr 12 22:55:25 2011
PackageArchitecture: all
SourcePackage: unoconv
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
PeterPall (peterpall) wrote :
Revision history for this message
PeterPall (peterpall) wrote :

Seems like the program unoconv should be searching for was /usr/lib/libreoffice/program/soffice.bin.

Revision history for this message
dag (dag-wieers) wrote : Re: [Bug 759184] Re: unoconv fails: "Unable to start listener"

On Tue, 12 Apr 2011, PeterPall wrote:

> Seems like the program unoconv should be searching for was
> /usr/lib/libreoffice/program/soffice.bin.

Yes, in fact I have been changing how unoconv is looking for binaries and
also at a clever way to kickstart into a LibreOffice-provided python
interpreter (if any).

Can you tell me what unoconv version you are using ?

--
-- dag wieers, <email address hidden>, http://dag.wieers.com/
-- dagit linux solutions, <email address hidden>, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

Revision history for this message
PeterPall (peterpall) wrote : Re: unoconv fails: "Unable to start listener"

Natty at this time seems to contain the following version:

gunter@book:~$ unoconv --version
unoconv 0.3
Written by Dag Wieers <email address hidden>
Homepage at http://dag.wieers.com/home-made/unoconv/

platform posix/linux2
python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2]

build revision $Rev$
gunter@book:~$

Revision history for this message
dag (dag-wieers) wrote : Re: [Bug 759184] Re: unoconv fails: "Unable to start listener"

On Wed, 13 Apr 2011, PeterPall wrote:

> Natty at this time seems to contain the following version:
>
> gunter@book:~$ unoconv --version
> unoconv 0.3
> Written by Dag Wieers <email address hidden>
> Homepage at http://dag.wieers.com/home-made/unoconv/
>
> platform posix/linux2
> python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
> [GCC 4.5.2]
>
> build revision $Rev$
> gunter@book:~$

Please try unoconv 0.4 first. If that fails I am interested to try my new
experimental code.

--
-- dag wieers, <email address hidden>, http://dag.wieers.com/
-- dagit linux solutions, <email address hidden>, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

Revision history for this message
PeterPall (peterpall) wrote : Re: unoconv fails: "Unable to start listener"

Works like magic ;-)

When will it be included in Ubuntu 11.04 (The first ubuntu version that uses libreoffice and thus needs the new version)?

And - seems like it still uses a "normal" makefile - do you want me to write automake/autoconf/autoheader/autosomething- scripts for the next version of the tool?

Revision history for this message
dag (dag-wieers) wrote : Re: [Bug 759184] Re: unoconv fails: "Unable to start listener"

On Thu, 14 Apr 2011, PeterPall wrote:

> Works like magic ;-)

What version did you try now ? The 0.4 release of the trunk ?

> When will it be included in Ubuntu 11.04 (The first ubuntu version that
> uses libreoffice and thus needs the new version)?

I don't know, I do not decide what gets included in Ubuntu. I was under
the impression that unoconv 0.4 was already part of Ubuntu.

> And - seems like it still uses a "normal" makefile - do you want me to
> write automake/autoconf/autoheader/autosomething- scripts for the next
> version of the tool?

Is there any benefit ? unoconv is written in python and is supposed to
adapt to the environment at runtime. The only reason for including a
Makefile is so the 'make install' does something useful.

I am open to suggestion, but tend to be very pragmatic and like to keep
things simple :-)

--
-- dag wieers, <email address hidden>, http://dag.wieers.com/
-- dagit linux solutions, <email address hidden>, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

Revision history for this message
PeterPall (peterpall) wrote : Re: unoconv fails: "Unable to start listener"

Did try both the trunk and v0.4. They both work fine;
The question about the advantages of using autoconf for a python project is a good one which is the reason I asked before doing anything: The makefile included with the project does what it is expected to do. And any autoconf beast consists of about 5 files that have to be updated every time autoconf changes. In return for that Configure would complain about missing packages even before the makefile is run.

summary: - unoconv fails: "Unable to start listener"
+ unoconv 0.3 doesn't know how to work with libreoffice ("Unable to start
+ listener")
Changed in unoconv (Ubuntu):
status: New → Confirmed
Revision history for this message
dag (dag-wieers) wrote :

Can we resolve this bug by updating the release to either 0.4 or a checkout from Github (prefered !).

I'd like to release the current version in Github, but without some widespread testing it's impossible to know whether this makes it worse, or not. (I doubt it makes it worse, but there could be some regressions)

Thanks !

Revision history for this message
PeterPall (peterpall) wrote : Re: [Bug 759184] Re: unoconv 0.3 doesn't know how to work with libreoffice ("Unable to start listener")

On 07.02.2012 14:31, dag wrote:
> Can we resolve this bug by updating the release to either 0.4 or a
> checkout from Github (prefered !).
>
> I'd like to release the current version in Github, but without some
> widespread testing it's impossible to know whether this makes it worse,
> or not. (I doubt it makes it worse, but there could be some regressions)
>
> Thanks !
>
On my system the github version does succeed in all cases I used the one
packaged with ubuntu for. Did test extracting text from .fodt files
including non-breakable spaces and ellipsis - and to extract drawings
from .fodg files.
Tomorrow I will try to reproduce the "can't create own listener" error.

Revision history for this message
PeterPall (peterpall) wrote :

Modified my Makefile to no more use a fallback if unoconf failed and did
the following:
  - Open a lengthy .fodt file with libreoffice writer
  - pressed on the save buttom and waited till the save finishes
  - started unoconv:
unoconv --stdout -f txt Censored.fodt | tail -c +4>Censored.tex
Error: Unable to connect or start own listener. Aborting.

As always starting unoconv again directly after a failed attempt always
results in a working text file.
Would it be possible to make unoconf try to start the listener a second
time if the first attempt fails?

Revision history for this message
dag (dag-wieers) wrote :

The problem I have here, is that it is unclear to me _why_ the connect failed, and I prefer to find that out rather than work around any LibreOffice issues.

Because there are two cases to consider:

 - LibreOffice is not already running
 - LibreOffice is already running

In the first case it's easy, we start our own listener. In the second, we have to instruct the existing LibreOffice to start listening. It would be interesting to know whether you already have LibreOffice running, or not. Then see what exactly happens and how we can improve this. It's possible that the initial attempt to start a listener did work,but the listener is not completely ready, yet accepting connections.

Whatever is the case, I prefer not to work around it like e.g. cloudooo is doing. They actively monitor the process and kill it if it is a runaway or memory-leaking process. They also kill the process when it does not finish within a certain timeframe and then try again. This all looks very useful, but it's working around the problem, while my aim is to get LibreOffice fixed so we can depend on it better. If we mask the problem like cloudooo is doing, we are making the situation worse IMO.

(Not that I understand why cloudooo is doing it and why it makes perfect sense to them !)

Revision history for this message
alex.kostrukov (alex-kostrukov) wrote :

The problem with running a script unoconv Event incrond

unoconv and run as if you manually run the script.

If the script runs incrond - unoconv it does not work.

how to solve the problem?

p.s.
"unoconv - listener" running and events incron performed by the same person.

Revision history for this message
alex.kostrukov (alex-kostrukov) wrote :

sorry,
unoconv runs and start proccess soffice.bin
but not convert file

can i see logs unoconv??

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.