500 - Internal Server Error when making changes in Storage/File Systems

  • Hi, since this morning I'm not able to save changes in the Storage/File Systems page.


    The only thing that changed before encountering the problem is a package (updated containerd.io from the updates page). Later in the morning i unmounted a filesystem that I needed to resize, and when I tried to remount it I noticed that the dropdown menu showed to file system available to be mounted with the same size.


    I rebooted the system, it now showed only one file system as it should be, mounted it and when I tried to apply the changes started to encounter this error. I tried to unmount every filesystem except the two that have references and cannot be unmounted and still get the error when trying to apply changes.


    The error seems to be related to encoding and happens during the call to the salt stack function mount.mounted:



    I get the same error when trying to run omv-salt deploy run fstab, I also tried to run sudo salt-call -l debug --local --retcode-passthrough state.apply omv.deploy.fstab hoping I would get more informations but it showed the same thing.


    I thought it might be something corrupted in openmediavault or the salt installation and tried to reinstall them with apt install --reinstall openmediavault salt-common salt-minion but the error remained.


    Thinking it could be a config file which had the wrong encoding I tried to track a bit the salt code on github, but it seems like mount.mounted function just calls mount -l and parse the output of that.


    I checked the mntent part of the openmediavault/config.xml file and can't see anything out of order. At this point I dunno what else to try.


    Edit: Forgot to say that I also checked localeand tried to even restore it with dpkg-reconfigure locales



    Anybody have any idea of something I could try to fix it without reinstalling everything?


    Thanks in advance

  • KM0201

    Approved the thread.
  • It took me a while, but i've been able to solve it.


    Apparently /etc/shells got corrupted.


    I was tracking backward through the traceback and got to the code in cmdmod.py where it checks if the file /etc/shells exists, opens it and start reading the lines to find out which shells are available in the system.



    So I checked the /etc/shells file on my system and found it contained random symbols making no sense. I checked if the first character was 0x80 as in the error I've posted in the first message (UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte), and sure it was:


    Code
    hexdump -C shells
    00000000  80 15 aa dc d1 9d c1 dc  11 da 5d 1e 81 6d 0f b9  |..........]..m..|

    So I moved the file somewhere else so that it would not be found, and OMV is again able to apply changes.

  • Nubbest

    Added the Label resolved
  • Nubbest

    Added the Label OMV 7.x

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!