Plesk is not accessible: Can't open or create shared memory by shm.name

Created:

2017-06-08 10:15:22 UTC

Modified:

2017-08-16 16:15:53 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk is not accessible: Can't open or create shared memory by shm.name

Applicable to:

  • Plesk Onyx for Linux

Symptoms

  1. Plesk is not accessible. Browser shows the following error:

    [LockManagerException] Can't open or create shared memory by shm.name: "/run/lock/lmlib/SharedLockManagerStorage0.2.3"; shm.start_size: "8388608"; error "Permission denied"
    
  2. The following can be found in /var/log/plesk/panel.log :

    ERR [panel] Lock Manager error: '[LockManagerException] Can't open or create shared memory by shm.name: "/run/lock/lmlib/SharedLockManagerStorage0.2.3"; shm.start_size: "8388608"; error "Permission denied"'.:
    0: /usr/local/psa/admin/plib/Lock/Manager/Hierarchical.php:126
    Plesk\Lock\Manager_Hierarchical->_getClient()
    1: /usr/local/psa/admin/plib/Lock/Manager/Hierarchical.php:198
    Plesk\Lock\Manager_Hierarchical->_applyLock(string '', object of type Plesk\Lock\Resource)
    2: /usr/local/psa/admin/plib/Lock/Manager/Hierarchical.php:158
    Plesk\Lock\Manager_Hierarchical->lock(object of type Plesk\Lock\Resource, string '')
    3: /usr/local/psa/admin/plib/Lock/Manager.php:84
    Plesk\Lock\Manager->lock(integer '2', array, string '')
    4: /usr/local/psa/admin/plib/Lock.php:21
    Plesk\Lock::read(object of type Plesk\Lock\Object_SessionService)
    5: /usr/local/psa/admin/plib/Application/Web.php:198
    Plesk\Application_Web->startSession()
    6: /usr/local/psa/admin/plib/Application/Web.php:273
    Plesk\Application_Web->registerSession(string 'admin', NULL null)
    7: /usr/local/psa/admin/htdocs/login_up.php:83
    ERR [1] Lock Manager error: '[LockManagerException] Can't open or create shared memory by shm.name: "/run/lock/lmlib/SharedLockManagerStorage0.2.3"; shm.start_size: "8388608"; error "Permission denied"'.
  3. File /run/lock/lmlib has ownership different from:

    # stat /run/lock/lmlib
    .....
    Access: (0770/drwxrwx---) Uid: ( 0/ root) Gid: ( 0/ lock-manager)
  4. Ownership changes back to incorrect after server reboot.

Cause

Bug in OpenVZ kernel: https://bugs.openvz.org/browse/OVZ-6384

Resolution

As a workaround create a cron job like as follows:

# crontab -l
@reboot                    chown root:lock-manager /run/lock/lmlib

This job will change permissions back to correct right after server reboot.

Have more questions? Submit a request
Please sign in to leave a comment.