• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Problem with /var/lock after upgrade

Mister Lone

New Pleskian
Hi community,

I've got a problem after upgrade to Onyx when I try a fs repair :
"$ plesk repair fs -y -v

Checking Linux system files

There are incorrect permissions on some items: /var/lock .......... [ERROR]
- Incorrect type of /var/lock. Expected: symlink. Actual:
directory
Repairing incorrect permissions ................................. [2016-12-13 11:45:15] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/fsmng' '--set-ac' '/var/lock'] with exit code [1]

fsmng failed: ERROR:Cannot fix %s: file exists and it is not a symlink"

Can someone help me ? :)
 
Hi Mister Lone,

Pls. DELETE the file "/var/lock" with the SSH - command ( logged in as user "root" ) "rm /var/lock", and re-run your plesk repair - command.
 
Hi again UFHH01,

It seems that deleting the folder corrupted the system... I've got new errors now :
"PHP Fatal error: Uncaught exception 'PleskMultipleException' with message 'Error during xxx.xxxx.pro updateZone: dnsmng failed: dnsmng: Unable to open file "/var/lock/files/26d9d96d428d491b87bd77bbeae57bcf": No such file or directory.
System error 2: No such file or directory
dnsmng: Error occurred while locking the file /var/named/run-root/etc/named.conf"

"Error during xxxx.com updateZone: dnsmng failed: dnsmng: Unable to open file "/var/lock/files/26d9d96d428d491b87bd77bbeae57bcf": No such file or directory.
System error 2: No such file or directory
dnsmng: Error occurred while locking the file /var/named/run-root/etc/named.conf"

"
- httpdmng failed: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: [2016-12-13 23:57:25] ERR [panel]
[LockManagerException] Can't open or create shared memory by
shm.name: "/var/lock/lmlib/SharedLockManagerStorage0.2.3";
shm.start_size: "8388608"; error "No such file or directory"
Lock Manager error: '[LockManagerException] Can't open or
create shared memory by shm.name:
"/var/lock/lmlib/SharedLockManagerStorage0.2.3";
shm.start_size: "8388608"; error "No such file or directory"'.

Checking the usage of PHP handlers[2016-12-13 23:57:25] ERR [panel] [LockManagerException] Can't open or create shared memory by shm.name: "/var/lock/lmlib/SharedLockManagerStorage0.2.3"; shm.start_size: "8388608"; error "No such file or directory"

Lock Manager error: '[LockManagerException] Can't open or create shared memory by shm.name: "/var/lock/lmlib/SharedLockManagerStorage0.2.3"; shm.start_size: "8388608"; error "No such file or directory"'."
 
Hi Mister Lone,

pls. note, that the file "/var/lock" is a SYMLINK to the folder "/run/lock", while "/run" is a SYMLINK to the folder "/var/run" which should normally being repaired/re-created, when running the Plesk repair with the option "fs". If, for what ever reason, this symlink was not re-created by the Plesk repair utility, pls. consider to check

Code:
stat /var/lock

AND

stat /var/run


Pls. check as well your mount - settings:
Code:
mount | grep shm
 
There should be following structure:

# ll /var/lock
lrwxrwxrwx 1 root root 11 Jul 25 11:05 /var/lock -> ../run/lock

# stat /var/lock
File: '/var/lock' -> '../run/lock'
Size: 11 Blocks: 0 IO Block: 4096 symbolic link
Device: 1dh/29d Inode: 8258559 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)

# stat /var/run/lock
File: '/var/run/lock'
Size: 160 Blocks: 0 IO Block: 4096 directory
Device: 58h/88d Inode: 52887782 Links: 8
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

# ll /var/run/lock
total 0
drwxrwxrwx 2 root root 1240 Dec 14 04:53 files
drwxrwx--- 3 root lock-manager 200 Dec 14 04:45 lmlib
drwxrwxr-x 2 root lock 40 Dec 14 04:30 lockdev
drwxrwxr-x 2 root mailman 80 Dec 14 09:45 mailman
drwxr-xr-x 2 root root 40 Dec 14 09:10 plesk
drwxr-xr-x 2 root root 60 Dec 14 04:30 subsys

You can just re-create it manually if it is broken.
 
Hi UFHH01,

root@prod:~# mount | grep shm
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run/shm type tmpfs (rw,relatime)

root@prod:~# mount | grep tmpfs
udev on /dev type devtmpfs (rw,relatime,size=4082828k,nr_inodes=1020707,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=817024k,mode=755)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)
tmpfs on /run/shm type tmpfs (rw,relatime)

root@prod:~# stat /dev/shm
File: ‘/dev/shm’ -> ‘/run/shm’
Size: 8 Blocks: 0 IO Block: 4096 symbolic link
Device: 5h/5d Inode: 2258 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-12-13 23:41:05.370634897 +0100
Modify: 2016-12-12 10:45:55.836511029 +0100
Change: 2016-12-12 10:45:55.836511029 +0100
Birth: -

root@prod:~# stat /run/shm
File: ‘/run/shm’
Size: 40 Blocks: 0 IO Block: 4096 directory
Device: 1eh/30d Inode: 998829 Links: 2
Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-12-13 23:41:05.370634897 +0100
Modify: 2016-12-13 23:41:05.370634897 +0100
Change: 2016-12-13 23:41:08.958635110 +0100
Birth: -
 
Hi Mister Lone,

pls add to "/etc/fstab":
Code:
tmpfs   /dev/shm    tmpfs   defaults    0 0

followed by:
Code:
mount tmpfs

Consider as well a complete reboot, to see that all mounts work as expected.
 
Hi Mister Lone,

pls. note, that it really would help, if you create a SEPARATE thread for ( additional ) issues/errors/problems/questions not related to the current thread title.
Just keep in mind, that searching forum - users and as well users using search-engines, will be pretty much irritated, to get search- results, which have absolute nothing to do with the initial issue. ;)
 
Back
Top