Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The solution is to increase the system-wide limit on the number of open files. The exact procedure, however, varies from one OS to the next, see Too many open files.

Expand
titleUbuntu Linux
  1. Find the current maximum number of open files per user in a single session: 
    ulimit -n
    By default the number is 1024 which is too small.
  2. Edit the limits.conf file: 
    sudo gedit /etc/security/limits.conf
  3. Add the following lines to the file: 
    * soft nofile 10000
    * hard nofile 50000
    This sets for all users a soft limit of 10000 open files and a hard limit of 50000. These are just example numbers. Set them according to your system needs. Note that the wildcard option applies only to regular users, not to superuser. If you run Magnolia as superuser replace the asterisk with root.
  4. Save the file.
  5. Edit the configuration file for session-related modules: 
    sudo gedit /etc/pam.d/common-session
  6. Add the following line to the file: 
    session required pam_limits.so

    Info

    On *ubuntu 17.04 you'll probably also have to add the following line

    DefaultLimitNOFILE=65535

    to /etc/systemd/system.conf

    and to /etc/systemd/user.conf .

    See Cannot Increase open file limit past 4096 (Ubuntu).

  7. Save the file.
  8. Restart Ubuntu.
  9. Verify the new maximum number of open files: 
    ulimit -n
    The command should now return 10000.


...

Info

If you want to run two different Tomcats simultaneously you need to change other ports too. This is useful if you want to run different versions of Magnolia at the same time. In <CATALINA_HOME>/conf/server.xml, change the port numbers for the shutdown and AJP sections and any custom sections you have enabled.

Cannot publish content with path-based locking

After upgrading to Magnolia 5.7.9, it is not possible to publish content locally. The following errors can be found in the logs:

Log of the Author instance

Code Block
ERROR info.magnolia.publishing.command.PublicationCommand 08.06.2021 09:42:18 – Receiver: magnoliaPublic8080, error: Unable to contact receiver, HTTP response code: 500.

Log of the Public instance

Code Block
ERROR info.magnolia.publishing.receiver.operation.jcr.AbstractJcrReceiveOperation 08.06.2021 09:41:52 – UNC path is missing sharename: /\website\/
java.nio.file.InvalidPathException: UNC path is missing sharename: /\website\/

As a temporary workaround, switch the locking mode to compatibility (JCR-based) locking in the configuration of the publishing-core module:

/modules/publishing-core/config@lockManagerMode=compatibility

Windows Firewall is blocking Java

...