Yunohost-portal-api is dead; 502 sur public SSO

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9.1
How are you able to access your server: SSH

Describe your issue

Bonjour, je rencontre le même problème que Erreur 504 via yunohost/sso portalapi (debian Bookworm)

Je viens tout juste d’effectuer ma migration à bookworm, les apps fonctionnent (à part photoprism, pas encore regardé pourquoi), la webadmin aussi mais pas le SSO.

[ERROR] Service yunohost-portal-api is dead :(
  - You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with 'yunohost service restart yunohost-portal-api' and 'yunohost service log yunohost-portal-api').

Je suis obligé de le redémarrer à la main, ça fonctionne jusqu’au prochain reboot. Il à l’air de se planter tout seul au redémarrage:

admin@yunohost-VM:~ $ sudo yunohost service log yunohost-portal-api
journalctl: 
  - Dec 30 10:14:59 systemd[1]: Started yunohost-portal-api.service - YunoHost Portal API.
  - Dec 30 10:50:14 systemd[1]: Stopping yunohost-portal-api.service - YunoHost Portal API...
  - Dec 30 10:50:15 systemd[1]: yunohost-portal-api.service: Deactivated successfully.
  - Dec 30 10:50:15 systemd[1]: Stopped yunohost-portal-api.service - YunoHost Portal API.
  - -- Boot c5d9555258e44bb584919ece4d496fc4 --
  - Dec 30 10:54:03 systemd[1]: Started yunohost-portal-api.service - YunoHost Portal API.
  - Dec 30 10:57:01 systemd[1]: Stopping yunohost-portal-api.service - YunoHost Portal API...
  - Dec 30 10:57:01 systemd[1]: yunohost-portal-api.service: Deactivated successfully.
  - Dec 30 10:57:01 systemd[1]: Stopped yunohost-portal-api.service - YunoHost Portal API.

J’ai tenté de suivre les instructions ici Erreur 504 via yunohost/sso portalapi (debian Bookworm) - #11 by Aleks , voici ce que ça donne:

admin@yunohost-VM:~ $ sudo netstat -tulpn | grep 678
tcp        0      0 127.0.0.1:6787          0.0.0.0:*               LISTEN      602/python3  

puis

admin@yunohost-VM:~ $ curl -v http://127.0.0.1:6787/public
*   Trying 127.0.0.1:6787...
* Connected to 127.0.0.1 (127.0.0.1) port 6787 (#0)
> GET /public HTTP/1.1
> Host: 127.0.0.1:6787
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 405 Method Not Allowed
< Allow: OPTIONS
< Content-Length: 739
< Content-Type: text/html; charset=UTF-8
< Date: Mon, 30 Dec 2024 10:33:31 GMT
< 

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
        <head>
            <title>Error: 405 Method Not Allowed</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans;}
              body {background-color: #fff; border: 1px solid #ddd;
                    padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            </style>
        </head>
        <body>
            <h1>Error: 405 Method Not Allowed</h1>
            <p>Sorry, the requested URL <tt>&#039;http://127.0.0.1:6787/public&#039;</tt>
               caused an error:</p>
            <pre>Method not allowed.</pre>
        </body>
    </html>
* Connection #0 to host 127.0.0.1 left intact

Je ne comprends pas trop le pourquoi du comment de cette erreur 405 ici, mais je sors de ma zone de compétence.

Si quelqu’un a une piste je suis preneur.
Merci!

Share relevant logs or error messages

https://paste.yunohost.org/raw/uyibiruxix

Let’s try to look at sudo journalctl -u yunohost-portal-api -n 100 --no-pager --no-hostname, and also sudo tail -n 100 /var/log/yunohost-portalapi.log

admin@yunohost-VM:~ $ sudo journalctl -u yunohost-portal-api -n 100 --no-pager --no-hostname
Dec 30 10:14:59 systemd[1]: Started yunohost-portal-api.service - YunoHost Portal API.
Dec 30 10:50:14 systemd[1]: Stopping yunohost-portal-api.service - YunoHost Portal API...
Dec 30 10:50:15 systemd[1]: yunohost-portal-api.service: Deactivated successfully.
Dec 30 10:50:15 systemd[1]: Stopped yunohost-portal-api.service - YunoHost Portal API.
-- Boot c5d9555258e44bb584919ece4d496fc4 --
Dec 30 10:54:03 systemd[1]: Started yunohost-portal-api.service - YunoHost Portal API.
Dec 30 10:57:01 systemd[1]: Stopping yunohost-portal-api.service - YunoHost Portal API...
Dec 30 10:57:01 systemd[1]: yunohost-portal-api.service: Deactivated successfully.
Dec 30 10:57:01 systemd[1]: Stopped yunohost-portal-api.service - YunoHost Portal API.
-- Boot 0390a5bf2245410d824e26a8eda66bd0 --
Dec 30 11:38:46 systemd[1]: Started yunohost-portal-api.service - YunoHost Portal API.
Dec 30 13:47:56 systemd[1]: Stopping yunohost-portal-api.service - YunoHost Portal API...
Dec 30 13:47:56 systemd[1]: yunohost-portal-api.service: Deactivated successfully.
Dec 30 13:47:56 systemd[1]: Stopped yunohost-portal-api.service - YunoHost Portal API.

sudo tail -n 100 /var/log/yunohost-portalapi.log

2024-12-30 10:54:34,757 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 10:54:34,759 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 10:54:34,761 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 10:54:34] "GET /public HTTP/1.1" 200 805 0.006145
2024-12-30 10:54:35,140 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 10:54:35,140 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 10:54:35,143 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 10:54:35,143 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 10:54:35,146 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 10:54:35,148 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 10:54:35] "GET /me HTTP/1.1" 200 2946 0.007942
2024-12-30 11:38:46,985 DEBUG    moulinette.actionsmap.generate_cache - generating cache for actions map
2024-12-30 11:38:46,993 DEBUG    moulinette.interface.api.run - starting the server instance in localhost:6788
2024-12-30 11:38:51,854 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:38:51,854 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:38:51,985 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.130s
2024-12-30 11:38:51,985 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 11:38:51,987 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 11:38:51,988 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:38:51] "GET /public HTTP/1.1" 200 308 0.134605
2024-12-30 11:38:57,703 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:38:57,703 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:38:57,703 DEBUG    geventwebsocket.handler.upgrade_websocket - Can only upgrade connection if using GET method.
2024-12-30 11:38:57,717 DEBUG    yunohost.utils.ldap.__init__ - initializing anonymous ldap interface
2024-12-30 11:38:57,797 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:38:57] "POST /login HTTP/1.1" 200 621 0.093909
2024-12-30 11:38:57,953 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:38:57,954 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:38:57,957 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:38:57,957 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 11:38:57,961 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 11:38:57,964 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:38:57] "GET /me HTTP/1.1" 200 2946 0.010270
2024-12-30 11:38:58,191 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:38:58,192 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:38:58,193 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:38:58,193 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 11:38:58,195 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 11:38:58,198 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:38:58] "GET /public HTTP/1.1" 200 805 0.006584
2024-12-30 11:38:58,282 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:38:58,282 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:38:58,285 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:38:58,285 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 11:38:58,288 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 11:38:58,291 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:38:58] "GET /me HTTP/1.1" 200 2946 0.008785
2024-12-30 11:39:22,443 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:39:22,443 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:39:22,444 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:39:22,444 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 11:39:22,447 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 11:39:22,449 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:39:22] "GET /public HTTP/1.1" 200 805 0.006413
2024-12-30 11:39:22,512 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:39:22,513 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:39:22,515 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:39:22,515 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 11:39:22,519 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 11:39:22,521 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:39:22] "GET /me HTTP/1.1" 200 2946 0.008787
2024-12-30 11:39:52,102 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:39:52,103 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:39:52,104 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:39:52,104 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 11:39:52,110 DEBUG    moulinette.actionsmap.process - action executed in 0.006s
2024-12-30 11:39:52,113 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:39:52] "GET /public HTTP/1.1" 200 805 0.010262
2024-12-30 11:39:52,256 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:39:52,256 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:39:52,258 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:39:52,258 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 11:39:52,260 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 11:39:52,261 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:39:52] "GET /me HTTP/1.1" 200 2946 0.005502
2024-12-30 11:39:56,865 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:39:56,865 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:39:56,866 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:39:56,866 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 11:39:56,868 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 11:39:56,870 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:39:56] "GET /public HTTP/1.1" 200 805 0.005721
2024-12-30 11:39:57,024 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:39:57,024 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:39:57,026 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:39:57,027 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 11:39:57,030 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 11:39:57,032 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:39:57] "GET /me HTTP/1.1" 200 2946 0.008570
2024-12-30 11:50:16,988 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:50:16,988 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:50:16,989 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:50:16,989 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 11:50:16,992 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 11:50:16,994 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:50:16] "GET /public HTTP/1.1" 200 805 0.006586
2024-12-30 11:50:17,220 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 11:50:17,220 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 11:50:17,223 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 11:50:17,223 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 11:50:17,226 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 11:50:17,228 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 11:50:17] "GET /me HTTP/1.1" 200 2946 0.008091
2024-12-30 12:45:30,828 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 12:45:30,828 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 12:45:30,829 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 12:45:30,829 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.public'
2024-12-30 12:45:30,831 DEBUG    moulinette.actionsmap.process - action executed in 0.002s
2024-12-30 12:45:30,834 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 12:45:30] "GET /public HTTP/1.1" 200 805 0.005910
2024-12-30 12:45:30,914 DEBUG    geventwebsocket.handler.run_application - Initializing WebSocket
2024-12-30 12:45:30,914 DEBUG    geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-12-30 12:45:30,917 DEBUG    moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-12-30 12:45:30,917 DEBUG    moulinette.actionsmap.process - processing action 'yunohost.portal.me'
2024-12-30 12:45:30,920 DEBUG    moulinette.actionsmap.process - action executed in 0.003s
2024-12-30 12:45:30,923 INFO     geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-12-30 12:45:30] "GET /me HTTP/1.1" 200 2946 0.008832

HTTP 200 everywhere.

un petit up? personne n’a d’idée? :cry: