Alfresco: Handling „LibreOffice not responding“

indiana-jones-swordsman

Alfresco Community uses LibreOffice for various content transformations. From time to time, certain transformations screw the Office server process. It stops responding to requests. There are most likely various triggers (type of transformation, actual document) for this misbehavior (endless loop, stuck, death, whatnot) of the process. There are alternatives preventing some of the issues, but it seems pretty hopeless to track everything down to the root cause and fix it.

The Community Edition uses the OODirect subsystem which also manages the lifecycle of the process. However, there is nothing in place to recover from a screwed/terminated process. The drop-in extension below provides this functionality. I have only tried it with Alfresco 5.1, but I think it should also work starting at 4.2.

To use it, drop it in webapps/alfresco/WEB-INF/lib or modules/platform. It won’t do anything unless you set a cron expression in alfresco-global.properties like shown below.

The timeoutSeconds parameter says how long you are willing to wait before you consider the process screwed, kill will only work on a Unix system for now. The extension keeps track of the process, so it won’t work if you start/restart the Office process manually.

Enjoy! ;)

Download Alfresco Office Watchdog

Über Andreas Steffan

Complexity is ugly. I love it straight, fast, simple and open. I believe in true Open Source, the Open Web and Linux. I freelance in the JVM- and Content-Management spaces. My preferences are Clojure, Groovy, JavaScript, Java, Alfresco and WordPress. Emacs is my religion.

5 Antworten auf Alfresco: Handling „LibreOffice not responding“

  1. Hallo Andreas,

    thanks for sharing! Yet another approach but looks straight forward instead of putting the jodconverter code back which has been removed in 4.2.
    Would you mind to put the OfficeWatchDog code on github to see what happens and to be able to fix things in case?

    What’s the license you share?

    Regards
    Heiko

  2. Hi Heiko,

    in fact, I suggested putting it on github under the banner of „Order of the Bee“ – aiming to push for a joint Alfresco fix effort. It seems nobody is interested, so I keep fixing and tweaking things for us and our customers. That’s most likely what you and other companies like Loftux do as well. From time to time, I’ll give away stuff for free.

    Lets face it: Collaboration on code does not work well in Alfresco land.

    Regarding the license, I am giving it away for free (Download link on the page) – without any warranty.

  3. Hi Andreas,
    OOTB or not. You may put it on your deas github account?

    Concerning joint Alfresco fix efforts: We put our patches modules also on our github account and should combine our work with Loftux …

  4. Honestly, I don’t want to create another orphaned project on github. In fact, I am about to purge my repos.

  5. Ivan sagt:

    Why do you say that the jodconverter code was removed?
    Isn’t this still part of the Enterprise solution?

Kommentar verfassen