after reboot 502 Bad Gateway and php7.4-fpm.service not running, /run/php missing

  • Greetings everyone.



    Although for years i considered myself a happy and meanwhile even not quite inexperienced OMV profiteer i have recently found myself to be in a position where it seems that no thread is able to provide the necessary information to solve my problem. Therefore i kindly ask forgiveness if i may have overseen the solution.


    The problem:


    After reboot i can access the webgui but i cannot login. It gives me a 502 Bad gateway. Further investigation let me find out that the service php7.4-fpm has not started at all. The reason therefore was the missing socket which i can fix manually by using the following commands:


    Code
    mkdir --mode=07500 /run/php
    chown www-data:www-data /run/php
    
    omv-salt deploy run phpfpm


    The first two lines i got from the starting procedure of the php7.4-fpm service


    Code
    nano /etc/init.d/php7.4-fpm


    Now, as i understand it, the init of php7.4-fpm should be happening automatically on startup. When i do it manually php is running and i am able to login to the webgui just fine.


    I have not tested to just use

    Code
    service php7.4-fpm start
    
    omv-salt deploy run phpfpm

    But my guess is that it would also work.


    The question remains, why is it not starting automatically anymore?


    I'm running OMV6 on a QNAP, installed with the debian operating system variant found here: https://docs.openmediavault.or…stallation/on_debian.html

    Everything is up to date.

    I'm also running docker with some websites but those don't seem to be the cause of my problem. Maybe another container i tried out is responsible: cups airprint. I tried two different of them but in the end i destroyed them both.


    Any hint is appreciated! :):thumbup:

  • crashtest

    Hat das Thema freigeschaltet.

  • Another interesting fact: the QNAP's own display shows that the system is still "booting" although its up and running since 9 hours and 4 minutes !


    The unauthorized login is because i made a mistake with my password once.

  • The content of /usr/lib/tmpfiles.d/php7.4-fpm.conf:

    Code
    #Type Path                  Mode UID      GID      Age Argument
        d /run/php              0755 www-data www-data -   -


    Zitat

    Your hardware incl. the LED display is proprietary, so it can only be accessed and controlled via Qnap software.

    That makes sense.

  • That last thing made my curious. Found out: To control the LCD you just have to

    Thanks to paulvanleest from https://forum.qnap.com/viewtopic.php?t=19180

  • I just tried do start the service php7.4-fpm after reboot with no success:

    Code
    root@nas:~# service php7.4-fpm start
    Job for php7.4-fpm.service failed because the control process exited with error code.
    See "systemctl status php7.4-fpm.service" and "journalctl -xe" for details.

    systemctl:

    journalctl (too big to post it here, therefore i share it this way. One version even has syntax highlighting! :)

    journalctl
    KliefertCloud
    cloud.kliefert.net


    (If not available my nas is probably rebooting or down for maintenance - i will add some RAM soon)


    but with

    everything went back to normal again...

  • I put this in my crontab:

    Code
    @reboot sleep 120 && mkdir --mode=07500 /run/php && chown www-data:www-data /run/php && omv-salt deploy run phpfpm

    and now i do not even notice this unusual bug anymore 8)

  • I have experienced this issue when upgrading from OMV4 to OMV6.


    The issue is that the PHP package now puts its openmediavault socket in the wrong place.


    Open up the OpenMediaVault-specific PHP configuration:


    sudo vi /etc/php/7.4/fpm/pool.d/openmediavault-webgui.conf


    Edit the (4th) line (that starts with "listen ="):


    listen = /run/php/php7.4-fpm-openmediavault-webgui.sock


    (Originally, it said something along the lines of "/var/run/..." for me without mentioning the PHP version number. That was wrong.)


    Then restart PHP-fpm:


    sudo systemctl restart php7.4-fpm


    This works on OpenMediaVault 6.3.1.


    Most probably, the underlying issue is that during the "openmediavault" package installation the job running the salt/omv/deploy/phpfpm/10webgui.sls function is failing or something. I didn't look at the installation logs.

  • Unfortunately this solution doesnt fit here, because the mentioned file

    /etc/php/7.4/fpm/pool.d/openmediavault-webgui.conf

    already looks like this:

    listen = /run/php/php7.4-fpm-openmediavault-webgui.sock

  • That's unfortunate. Apparently, you have a different bug. (I should've read through your post in more detail.)


    I wonder what the new 6.3.7 version's "Improve Salt configuration." brought to the table...

  • @author


    were you able to fix yours the "official way" or still using your crontab fix? I'm have the same exact issue. I thought mine started after two power outages in a span of 15 minutes but no because after failing to fix my issue I started from scratch and after everything setup, I tried to reboot then the issue again. Now I suspect a recent update with something like lib***, I forgot, there were 7 of them.


    I already uninstalled flashmemory plugin and tried all other "fixes" I found in this forum but still the issue remains. I am now using the crontab fix but this at most a dirty fix.


    systemctl status php7.4-fpm

    I don't know what else to provide, please help. Also a question, how important is the GUI anyway, after you setup everything, the mounts, the services? Will PHP being down affect any service aside from WEB-GUI?


    Edit: NVM, fixed mine. It was an outside process messing up OMV installation

Jetzt mitmachen!

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