Nodes can normally get locked for several reasons: content is being published, a backup is being performed, new area is being created (parent node gets blocked not area itself)... This locks are removed after the action succeeds but there are other scenarios where the lock could remain active: trying to publish some content at a second level but cannot publish it on the first level, trying to publish to one public instance but cannot publish it to a second public instance, invalid parent/child references, residual content regarding the node is present on mgnlSystem  workspace...

On those cases, you won't be able to work with the blocked node and any action you try on them will just fail with a frustrating "Node is locked" message. Tho there is no such a single solution for this issue, we have been able of solving it through several ways. 

Keep in mind that it also depends on which Magnolia version are you working with. This issue was very common under Magnolia 5.X where the locking mechanism wasn't polished at all. Magnolia 6.2.9 introduced new Publishing module 1.2.6 which uses path-based locking as default locking mechanism (instead of previous node lock). Magnolia 6.2.12 introduced a new mechanism for controlling locks (a waitTime for automatically stop trying to acquire a lock if another thread is still owing the lock, so chance of internal deadlocks is highly decreased).

When facing locking issue, and before attempting any of this solutions, check carefully your server logs for trying to get the full picture. Sometimes you will get a detailed message which will give you enough information for figuring out why is the locked issue being produced (e.g, if you are experiencing this problem while publishing, put to DEBUG info.magnolia.publishing  package. Having this said, let's move to the known solutions for this locked nodes issue:

  • Use publishing toolto clean mgnlSystem on public instance(s)
  • Remove locked nodes on public instance and then re publish
  • Restart the server
  • Add -Dorg.apache.jackrabbit.version.recovery=true to JVM param on authors (sometimes, they have invalid references to parent/child and this produces the node locking)
  • Re index (stop Magnolia, delete index folder of affected workspace and restart)
  • Run consistenciesfix and check (index and workspace)
  • Run Groovy script for unlocking the node (root or whatever)

    import info.magnolia.context.MgnlContext;
    import javax.jcr.Node;
    import javax.jcr.Session;
    import javax.jcr.Node;
    import javax.jcr.Property;
    import javax.jcr.PropertyIterator;
    import javax.jcr.PropertyType;
    def session = MgnlContext.getJCRSession('magnolia-mgnlSystem');
    def rootNode = session.getRootNode();
    Node r = rootNode.get('website-rootLock');
    println r.isLocked();
    if(r.isLocked()) {
    println r.isLocked(); 
  • Clean mgnlSystem  manually by following the steps:
    1. Activation freeze, make sure there are no activation requests until all the steps are done

    2. Stop the public instance which is failing the activation

    3. In the underlying DB drop the {{mgnlsystem}} tables:


    4. Remove the mgnlSystem folder from your repository

    5. Start the instance again. The purpose of those tables is to support the activation process so you are not losing any data and the tables will be recreated upon startup

    6. Try to activate any content

    7. If you still face any issues repeat the process for the author instance and the second public instance

    8. Cancel the activation freeze

If none of this solutions works for you, do not hesitate on creating a ticketfor getting SUPPORT

  • No labels