/usr/sbin/php5-fpm: error while loading shared libraries: /usr/lib/X86_64-linux-gnu/libxxxxxxxxxxxx: invalid ELF header

  • Hi,


    So this morning I had a nasty surprise with my one month old Openmediavault. I saw a few errors while the system was booting and instead of the web GUI I got:


    "502 Bad Gateway" =O


    same on the second interface.


    First I had to know what was going on, so I executed the following steps:


    1. Log as root in the console
    2. Try to start the SSH server: FAILED
    3. ifconfig to check if something was wrong, no the interfaces are correctly configured
    4. ping the default gateway: OK
    5. Try to start nginx: FAILED with some php5-fpm errors
    6. tail -f /var/log/syslog to see what happened in the last lines


    Starting The PHP FastCGI Process Manager...
    /usr/sbin/php5-fpm: error while loading shared libraries: /usr/lib/X86_64-linux-gnu/libkrb5support.so.0: invalid ELF header
    Failed to start The PHP FastCGI Process Manager.
    Unit php5-fpm.service entered failed state.


    ....and a lot of other errors as services were failing in cascade :cursing:


    7. ldconfig


    /sbin/ldconfig.real: /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 is not an ELF file - it has the wrong magic bytes at the start


    and a few others with the same error message


    8. googled to see if I find an answer on the openmediavault forums to see if this could be hardware related. Nope, nothing
    9. googgled to find any built-in openmediavault that would repair this for me. Nope, nothing
    10. are my volumes still intact. Yes everything is here, it's just that a few services have not started because of those libraries errors
    11. Is the filesystem corrupt and Openmediavault didn't bothered to fsck the USB booting device? I booted with a Knoppix live cd and executed "fsck.ext4" on the USB device partition. No file system errors, the volume is clean.


    At that point I knew something went wrong with the files themselves, not the filesystem, not the storage device.


    OK, let's solve the problem


    1. apt-get install debsums


    (among other options debsums can compute MD5 hashes and find corrupted files)


    2. debsums


    the output will show files with OK or FAILED next to them (very verbose)


    3. debsums -s


    (silent mode to list only failed files)


    4. dpkg --search /usr/lib/x86_64-linux-gnu/libxxxxxxx


    I did that for each file that was listed by "debsums -s". Only two packages seemed like having problems. For the "/usr/lib/X86_64-linux-gnu/libkrb5support.so.0" file the package name was: libkrb5support0:amd64


    5. to repair the faulty packages


    apt-get --reinstall install libkrb5support0:amd64
    apt-get --reinstall install libicu52:amd64


    6. debsums -s


    once again to make sure there's nothing left. The output was empty, debsums found nothing. Good.


    7. Reboot, success everything is back online, web-gui, shares. Problem solved! 8)


    Yet I still don't know the source of the problem.


    Remarks: I would be great to have in omv-firstaid an option like "Run automatic integrity check on system files" that would script debsums and offer the user to reinstall them.


    Hope this will help someone else experiencing the same issues.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!