Fatal Error Unable to create lock file: Bad file descriptor (9)

Discussion in 'General' started by David "Fires" Stein, Aug 19, 2019.

  1. David "Fires" Stein

    David "Fires" Stein New Member

    Hi, I'm totally out of opinions.

    Our webserver works with no problem for long time. We do not made any updates or upgrades. But today all websites got 500 error even ISPConfig itself. I track error as far s I can only problem is at:
    /var/log/apache2/error.log
    Code:
    [Mon Aug 19 11:13:56.236024 2019] [mpm_prefork:notice] [pid 2859] AH00163: Apache/2.4.25 (Debian) mod_fcgid/2.3.9 Phusion_Passenger/5.0.30 mod_python/3.3.1 Python/2.7.13 OpenSSL/1.0.2l configured -- resuming normal operations
    [Mon Aug 19 11:13:56.236046 2019] [core:notice] [pid 2859] AH00094: Command line: '/usr/sbin/apache2'
    [Mon Aug 19 11:39:58.150277 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 2933
    [Mon Aug 19 11:45:10.842220 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8622
    [Mon Aug 19 11:45:58.430061 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8676
    [Mon Aug 19 11:49:59.763557 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8746
    [Mon Aug 19 11:55:04.579363 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8831
    [Mon Aug 19 12:00:01.757430 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8907
    [Mon Aug 19 12:01:13.810081 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 4654
    [Mon Aug 19 12:01:13.810140 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8893
    [Mon Aug 19 12:01:13.810175 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8712
    [Mon Aug 19 12:01:13.810205 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 2902
    [Mon Aug 19 12:01:13.810233 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 5589
    [Mon Aug 19 12:01:13.810260 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 8801
    [Mon Aug 19 12:01:13.810289 2019] [fcgid:warn] [pid 2861] mod_fcgid: cleanup zombie process 2917
    Mon Aug 19 12:01:52 2019 (12549): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:01:53 2019 (12550): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:01:54 2019 (12656): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:03:06 2019 (14739): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:03:09 2019 (14820): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:03:12 2019 (14946): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:03:46 2019 (15651): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:03:48 2019 (15652): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:03:50 2019 (15775): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:04:15 2019 (16270): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:04:21 2019 (16401): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:04:21 2019 (16402): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:04:22 2019 (16405): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:04:37 2019 (16620): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:04:49 2019 (16985): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:05:11 2019 (17323): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:05:31 2019 (17647): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:05:33 2019 (17648): Fatal Error Unable to create lock file: Bad file descriptor (9)
    Mon Aug 19 12:05:36 2019 (17833): Fatal Error Unable to create lock file: Bad file descriptor (9)
    
    Also cron job what proceed change queue not works.

    If I restart server all is working for 50 minutes.. I check everything:
    1) permission to /tmp/
    2) config of apache
    3) space on disk
    4) update ispconfig to latest stable version
    5) spend almost 4 hours and read almost every thread here on forum

    Any suggestions?
     
  2. Chinmoy

    Chinmoy New Member

    Hello @David "Fires" Stein ,
    Did you find any solution. I also faced a situation like yours. If you have any solution / fix or any information / experience , please do share with me. My server is in bad situation. It tries to restart eventually can't. Thanks in advance .
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Chinmoy likes this.
  4. David "Fires" Stein

    David "Fires" Stein New Member

    Hello, unfortunately, I do not remember how I solved it :( our main problem in the past was:
    1) no empty space on the disk
    2) wrong ownership of files
    3) virus that was running in crontab
    4) wrong configured default PHP after update
    Sorry, I can't help more :(
     
    ahrasis likes this.
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    Well "Bad file descriptor (9)" is quiet frustrating to debug, as the log does not state the file or directory where the issue occures.
    You can debug this with strace however and see what the issue is.

    Assuming this is fast-cgi as in OPs post follow these steps:
    • Login as root with sudo su
    • cd ~
    • with strace we follow the proccess and all forks of it and redirect the output to a file like so:
      strace -f -o strace.log sudo -u ispconfig /usr/bin/php-cgi -v
    • Search this log for any ERRNO number, most likly you are looking for EACCES or EPERM, if there is a line with this error it contains a path or file, make sure to check the permissions and access afterwards
    The full list of ERRNO Codes can be found here: https://www2.hs-fulda.de/~klingebiel/c-stdlib/sys.errno.h.htm

    Good Luck!
     

Share This Page