Error 502 OK on login attempt

  • Hello, first time Linux user with an annoying issue.


    I have set up OMV and so far it has been running great. I had podman and portainer both running with photoprism and syncthing docker containers. I was reconfiguring photoprism and switching to the docker version from the plugin and suddenly I was booted out with error code 500, and when I went to login again I got an error code "502 OK."


    So far, I suspect something is wrong with PHP 8.2 but unlike raulfg3's problem, I don't have any second uppercase dpkg flags. I tried a bunch of CLI things including apt get reinstall as root and still nothing.


    I can still use the NAS for now but reinstalling is a royal pain.


    Any magic solutions from the esteemed Linux wizards here?


    Much appreciated.

    Einmal editiert, zuletzt von MudaFisha () aus folgendem Grund: Grammar error

  • ryecoaaron

    Hat das Thema freigeschaltet.
  • For some extra debugging context:

    Code
    ls -al /etc/php/

    returns


    Code
    total 12
    drwxr-xr-x  3 mustafa users 4096 Apr 25 22:20 .
    drwxr-xr-x 99 mustafa users 4096 Apr 29 12:59 ..
    drwxr-xr-x  7 mustafa users 4096 Apr 29 12:59 8.2


    and the output of

    Code
    dpkg -l | grep php-fpm

    returns

    Code
    ii  php-fpm                         2:8.2+93                             all          server-side, HTML-embedded scripting language (FPM-CGI binary) (default)



    Furthermore, the output of

    Code
    ls -alh /etc/php/8.2/

    returns

    Code
    total 28K
    drwxr-xr-x 7 mustafa users 4.0K Apr 29 12:59 .
    drwxr-xr-x 3 mustafa users 4.0K Apr 25 22:20 ..
    drwxr-xr-x 3 root    root  4.0K Apr 29 12:59 apache2
    drwxr-xr-x 3 mustafa users 4.0K Apr 25 22:20 cgi
    drwxr-xr-x 3 mustafa users 4.0K Apr 25 22:20 cli
    drwxr-xr-x 4 mustafa users 4.0K Apr 29 12:55 fpm
    drwxr-xr-x 2 mustafa users 4.0K Apr 25 22:20 mods-available


    and the output of

    Code
    ls -alh /etc/php/8.2/fpm/

    returns

    Code
    total 100K
    drwxr-xr-x 4 mustafa users 4.0K Apr 29 12:55 .
    drwxr-xr-x 7 mustafa users 4.0K Apr 29 12:59 ..
    drwxr-xr-x 2 mustafa users 4.0K Apr 25 22:20 conf.d
    -rw-r--r-- 1 mustafa users 5.4K Jun 10  2023 php-fpm.conf
    -rw-r--r-- 1 mustafa users  73K Apr 25 23:56 php.ini
    drwxr-xr-x 2 mustafa users 4.0K Apr 29 12:55 pool.d
  • Code
    systemctl status php

    returns

  • ERROR: unable to bind listening socket for address '/run/php/php8.2-fpm-openmediavault-webgui.sock': No such file or directory


    ls -al /run/php/


    omv-salt deploy nginx phpfpm

  • Code
    systemctl start php8.2-fpm

    returns

    Code
    Job for php8.2-fpm.service failed because the control process exited with error code.
    See "systemctl status php8.2-fpm.service" and "journalctl -xeu php8.2-fpm.service" for details.

    and

    Code
    journalctl -xeu php8.2-fpm.service

    returns

  • ls -al /run/php/


    omv-salt deploy nginx phpfpm


    First of all, thank you for the help 🙏.


    running the first command returns:

    Code
    ls: cannot access '/run/php/': No such file or directory


    and the second command returns:

    Code
    Try 'omv-salt deploy --help' for help.
    
    Error: No such command 'nginx'.
  • Try 'omv-salt deploy --help' for help.


    Error: No such command 'nginx'.

    My bad.


    It's

    omv-salt deploy run nginx phpfpm

  • That returns:

  • I am logged in as root using weTTY right now,

    Since I don't use it, I don't know but it's better to be via SSH.


    Try again

    omv-salt deploy run phpfpm



    Check again if the folder is created:

    ls -al /run/php/


    If it is:

    systemctl restart php8.2-fpm



    If it's not

    mkdir -p /run/php/

    chown www-data:www-data /run/php/

    chmod 755 /run/php/


    omv-salt deploy run phpfpm


    No errors should be shown.

  • Ok, SSHed and this is what happens:



  • checking for the folder again:

    Code
    ls: cannot access '/run/php/': No such file or directory


    So I ran the three commands in suggestion, and the final command returns:

  • You mad genius. . .


    I logged in and it worked again!!!

    Post the ls command again.

  • Okay, here it is:


    Code
    total 4
    drwxr-xr-x  2 www-data www-data  120 Apr 29 21:42 .
    drwxr-xr-x 33 root     root     1100 Apr 29 21:46 ..
    srw-------  1 www-data www-data    0 Apr 29 21:42 php8.2-fpm-openmediavault-webgui.sock
    -rw-r--r--  1 root     root        5 Apr 29 21:42 php8.2-fpm.pid
    srw-rw----  1 www-data www-data    0 Apr 29 21:42 php8.2-fpm.sock
    lrwxrwxrwx  1 root     root       30 Apr 29 21:42 php-fpm.sock -> /etc/alternatives/php-fpm.sock
  • Okay, here it is:

    Now you need to try a reboot to see if the folder is recreated.

    I recall a very old issue about this (on OMV5, IIRC) that the folder wasn't being launched on boot time.


    Hopefully, everything will be OK.

  • Ok, I rebooted via the GUI, SSHed back in, and re-entered the "ls -al /run/php/" command:

    So, no GUI access?


    ryecoaaron

    Maybe you have some thoughts on this:

    /run/php/ folder isn't being recreated on reboot.


    I recall this happening on OMV5 a long time ago.


    Any idea on what is the issue?

Jetzt mitmachen!

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