Nginx failed start

  • How are you running these commands? Via PuTTY?

    And I don't see your prompt! So I need to ask if you're running this on the HOST and not on HA or something different.

  • JUSTINW

    Let's recapitulate:

    Something has taken over the nginx folder which is preventing OMV to re-populate it with the proper files via omv-salt deploy run nginx && OR omv install script


    The errors that occur are about the missing files that are needed for OMV Webgui.

    The nginx folder is holding 2x files for services that should never be there:

    Code
    -rw-r--r-- 1 root root 1031 Jan 9 12:31 nginx.service
    -rw-r--r-- 1 root root 523 Jan 9 12:32 php7.4-fpm.service


    Funny as it may be, I managed to bork a VM (explanation below so dev can figure out what's not right) with the same issue you're experiencing:

    nginx folder doesn't populate with the needed folders/files when running either of the above commands (salt or install script)


    I'm trying different things to see what works but, honestly, I didn't managed to fix it with "normal" commands.


    What worked was to grab a copy of ALL files under /etc/nginx of a running instance with OMV6 and paste them on the borked one.

    After that, running the salt command and restarting nginx, the GUI came alive and everything is as it should.


    I'll attach the nginx folder, if you want to use it.

    DISCLAIMER Don't held me responsible for any issue, lost DATA, or problem that you may have on your server by using this.

    This is a vanilla/untouched folder for OMV6 nginx but what you do on your SERVER is your responsability alone.

    Unzip the nginx folder and copy all files/folders recursively inside it to /etc/nginx/

    nginx.zip


    run as root:

    omv-salt deploy run nginx No errors should occur.

    systemctl status nginx.service


    omv-firstaid Select "2" and change the OMV port to something other than 80 since you have your NPM running on that port and will conflict with OMV.


    If all is OK, try a reboot and see if ALL is as it should.



    votdev

    I tried to help him the best I could and the above were the conclusions so far.


    As for how I borked an install:

    deleted all files under /etc/nginx/*

    rebooted and systemctl status nginx.service == failed

    tried omv-salt deploy run nginx == failed to re-populate the nginx folder

    tried apt install --reinstall openmediavault nginx == failed

    tried apt remove nginx == uninstalled openmediavault and components

    applied apt purge nginx == systemctl still failed with nginx loaded && failed

    applied systemctl disable nginx.service && reboot == service still loaded && failed

    applied systemctl mask nginx.service && reboot == service not loaded anymore

    copied back files from working nginx OMV6 to borked one

    ran omv-salt deploy run nginx == errored about masked service

    ran systemctl unmask nginx.service && systemctl enable

    ran omv-salt deploy run nginx == No errors and GUI came back alive


    Hope this helps in anyway to prevent future issues like this.

  • I am happy.

    :thumbup:


    Edit the initial post and mark the thread as resolved, ;)

  • votdev

    Added the Label resolved

Participate now!

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