Many services cannot start

Created:

2016-11-16 13:15:19 UTC

Modified:

2017-04-24 11:30:47 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Many services cannot start

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Many services cannot start.

Plesk installed in Parallels Virtuozzo Container.

Plesk login screen shows:

id: error while loading shared libraries: libselinux.so.1: cannot open shared object file: Error 23
uname: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
-bash: [: =: unary operator expected
ls: error while loading shared libraries: libselinux.so.1: cannot open shared object file: Error 23
tty: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
/sbin/consoletype: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
/usr/bin/id: error while loading shared libraries: libselinux.so.1: cannot open shared object file: Error 23
-bash: [: : integer expression expected

And the same error while trying to start any service:

-bash-4.1# /etc/init.d/httpd status
/sbin/consoletype: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
httpd is stopped
-bash-4.1# /etc/init.d/httpd start
/sbin/consoletype: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
Starting httpd: /bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: Error 23
[FAILED]

[root@SVP10217 ~]# /usr/local/psa/bin/admin --show-password
/usr/bin/sw-engine: error while loading shared libraries: /lib/libpam.so.0: cannot apply additional memory protection after relocation: Cannot allocate memory

-bash-4.1# /etc/init.d/psa start
cat: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
Starting psa... /bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: Error 23
failed
Starting xinetd service... done
Starting sw-cp-server service... failed
Starting mysqld service... failed
Starting named service... failed
Starting postgresql service... not installed
Starting spamassassin service... failed
Plesk: Starting Mail Server... /etc/init.d/psa: line 617: /usr/local/psa/admin/sbin/mailmng-service: Too many open files in system
/etc/init.d/psa: line 617: /usr/bin/wc: Too many open files in system
/etc/init.d/psa: pipe error: Too many open files in system
/etc/init.d/psa: line 620: [: -eq: unary operator expected
failed
/etc/init.d/psa: line 364: /usr/local/psa/admin/sbin/apache_control_adapter: Too many open files in system
/etc/init.d/psa: line 371: /usr/local/psa/admin/sbin/apache_control_adapter: Too many open files in system
/etc/init.d/psa: line 416: /bin/sleep: Too many open files in system
/etc/init.d/psa: line 210: /bin/rm: Too many open files in system
Starting psa... /etc/init.d/psa: /etc/init.d/sw-engine: /bin/sh: bad interpreter: Too many open files in system
failed
/etc/init.d/psa: line 419: /bin/sleep: Too many open files in system
-bash-4.1#

The same error is shown when logging to container from the hardware node:

[root@vp184010 ~]# vzctl enter 102172
entered into Container 102172
-bash: /usr/bin/id: Too many open files in system
uname: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 23
-bash: [: =: unary operator expected
ls: error while loading shared libraries: libselinux.so.1: cannot open shared object file: Error 23
-bash: /sbin/consoletype: Too many open files in system
-bash: /usr/bin/id: Too many open files in system
-bash: [: : integer expression expected
-bash-4.1#

Cause

The root cause is in Parallels Virtoozzo parameters for container with Plesk:
Not enough memory (kmemsize) and numfiles:

Check the latest column vhere the value is not 0.

From the Hardware Node:

    [root@vp184010 ~]# cat /proc/bc/102172/resources
kmemsize 20385706 20545303 22111846 22754099 1708
lockedpages 0 0 512 512 0
privvmpages 183066 183222 231072 239264 0
shmpages 568 568 43008 43008 0
numproc 192 194 480 480 0
physpages 45574 45634 0 2147483647 0
vmguarpages 0 0 67584 2147483647 0
oomguarpages 45574 45634 131072 2147483647 0
numtcpsock 64 66 720 720 0
numflock 128 128 376 412 0
numpty 0 0 32 32 0
numsiginfo 0 1 512 512 0
tcpsndbuf 408144 430504 3440640 5406720 0
tcprcvbuf 467632 471916 3440640 5406720 0
othersockbuf 500184 510664 2097152 4194304 0
dgramrcvbuf 0 8380 524288 524288 0
numothersock 381 386 720 720 0
dcachesize 0 0 7151616 7223855 0
numfile 10800 10860 16386 50000 2480
numiptent 14 14 256 256 0
swappages 0 0 2147483647 2147483647 0

From the container:

    [root@vp184010 ~]# cat /proc/user_beancounters
kmemsize 20385706 20545303 22111846 22754099 1708
lockedpages 0 0 512 512 0
privvmpages 183066 183222 231072 239264 0
shmpages 568 568 43008 43008 0
numproc 192 194 480 480 0
physpages 45574 45634 0 2147483647 0
vmguarpages 0 0 67584 2147483647 0
oomguarpages 45574 45634 131072 2147483647 0
numtcpsock 64 66 720 720 0
numflock 128 128 376 412 0
numpty 0 0 32 32 0
numsiginfo 0 1 512 512 0
tcpsndbuf 408144 430504 3440640 5406720 0
tcprcvbuf 467632 471916 3440640 5406720 0
othersockbuf 500184 510664 2097152 4194304 0
dgramrcvbuf 0 8380 524288 524288 0
numothersock 381 386 720 720 0
dcachesize 0 0 7151616 7223855 0
numfile 10800 10860 16386 50000 2480
numiptent 14 14 256 256 0
swappages 0 0 2147483647 2147483647 0

Resolution

Increase available system resources:

# vzctl set 102172 --save --kmemsize 134217728:164217728
# vzctl set 102172 --save -n 16386:50000
Have more questions? Submit a request
Please sign in to leave a comment.