Problème mise à jour Mobilizon 2.1.0 avec Yunohost

Bonjour,
j’ai eu un soucis avec une mise à jour de notre instance Mobilizon sur mon serveur Yunohost, est-ce que à tout hasard vous auriez une piste ?
Après la mise à jour il m’étais impossible de me connecter…

J’ai eu ce genre de logs

2022/06/19 19:59:50 [error] 13740#13740: *1193146 connect() failed (111: Connection refused) while connecting to upstream, client: XX.XX.XX.XXX, server: domain.domainname.tld, request: "POST /api HTTP/2.0", upstream: "http://[::1]:8095/api", host: "domain.domainname.tld", referrer: "https://domain.domainname.tld/"
2022/06/19 20:00:01 [error] 13740#13740: *1193146 connect() failed (111: Connection refused) while connecting to upstream, client: XX.XX.XX.XXX, server: domain.domainname.tld, request: "GET /fonts/materialdesignicons-webfont.f5b84261.ttf HTTP/2.0", upstream: "http://[::1]:8095/fonts/materialdesignicons-webfont.f5b84261.ttf", host: "domain.domainname.tld", referrer: "https://domain.domainname.tld/service-worker.js"
2022/06/19 20:00:32 [error] 13740#13740: *1193175 connect() failed (111: Connection refused) while connecting to upstream, client: XXXX:XXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX, server: domain.domainname.tld, request: "GET /.well-known/host-meta HTTP/2.0", upstream: "http://[::1]:8095/.well-known/host-meta", host: "domain.domainname.tld"
2022/06/19 20:01:47 [error] 13740#13740: *1193183 connect() failed (111: Connection refused) while connecting to upstream, client: XXXX:XXXX:X:X::XXX, server: domain.domainname.tld, request: "GET /.well-known/nodeinfo/2.1 HTTP/2.0", upstream: "http://[::1]:8095/.well-known/nodeinfo/2.1", host: "domain.domainname.tld"
2022/06/19 20:02:20 [error] 13740#13740: *1193188 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XXX.XXX.XX, server: domain.domainname.tld, request: "GET /.well-known/nodeinfo/2.1 HTTP/2.0", upstream: "http://[::1]:8095/.well-known/nodeinfo/2.1", host: "domain.domainname.tld"
2022/06/19 20:04:28 [error] 13740#13740: *1193207 connect() failed (111: Connection refused) while connecting to upstream, client: XX.XXX.XXX.XX, server: domain.domainname.tld, request: "GET /.well-known/nodeinfo/2.1 HTTP/1.1", upstream: "http://[::1]:8095/.well-known/nodeinfo/2.1", host: "domain.domainname.tld"
2022/06/19 20:12:25 [error] 13740#13740: *1193260 connect() failed (111: Connection refused) while connecting to upstream, client: XXXX:XXXX:X:XX::XXXX:XXXX, server: domain.domainname.tld, request: "HEAD /nodeinfo/2.1.json HTTP/1.1", upstream: "http://[::1]:8095/nodeinfo/2.1.json", host: "domain.domainname.tld"
2022/06/19 20:12:38 [error] 13740#13740: *1193291 connect() failed (111: Connection refused) while connecting to upstream, client: XXXX:XXXX:X:XX::XXXX:XXXX, server: domain.domainname.tld, request: "HEAD /nodeinfo/2.0.json HTTP/1.1", upstream: "http://[::1]:8095/nodeinfo/2.0.json", host: "domain.domainname.tld"
2022/06/19 20:12:51 [error] 13740#13740: *1193318 connect() failed (111: Connection refused) while connecting to upstream, client: XXXX:XXXX:X:XX::XXXX:XXXX, server: domain.domainname.tld, request: "GET /api/v1/instance/nodeinfo/2.0 HTTP/1.1", upstream: "http://[::1]:8095/api/v1/instance/nodeinfo/2.0", host: "domain.domainname.tld"

J’ai ouvert l’issue sur le dépôt github de l’app mobilizon_ynh ici Can't login after upgrade to 2.1.0~ynh1 · Issue #135 · YunoHost-Apps/mobilizon_ynh · GitHub

Est-ce que vous auriez une piste sur ce bug ??

Un développeur de Yunohost évoque peut-être cette piste:

In 2.1.0 change log : « Add Überauth CAS Strategy »
May be it’s a regression due to this new feature ?

Bonjour,

Hélas il ne s’agit là que de logs du serveur web nginx. J’aurais besoin des logs du service Mobilizon lui-même. S’il y a des logs de la mise à jour cela peut aider aussi.

Bonjour,
les logs sont un peu spécifiques à Yunohost, après un autre essai, j’ai eu ces logs

/var/log/yunohost/categories/operation/20220627-152339-app_upgrade-mobilizon.log
logs: 
  - 2022-06-27 17:24:20,015: DEBUG - + ynh_handle_getopts_args --file=/tmp/tmp.HKUEGBNvMF
  - 2022-06-27 17:24:20,015: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,025: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,039: DEBUG - + ynh_script_progression '--message=Reloading NGINX web server...'
  - 2022-06-27 17:24:20,039: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,082: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,096: DEBUG - + echo '! Helper used in legacy mode !'
  - 2022-06-27 17:24:20,097: DEBUG - + set +x
  - 2022-06-27 17:24:20,099: DEBUG - + echo '[###############+....] > Reloading NGINX web server...'
  - 2022-06-27 17:24:20,099: INFO - [###############+....] > Reloading NGINX web server...
  - 2022-06-27 17:24:20,099: DEBUG - + set -o xtrace
  - 2022-06-27 17:24:20,099: DEBUG - + ynh_systemd_action --service_name=nginx --action=reload
  - 2022-06-27 17:24:20,100: DEBUG - + local legacy_args=nalpte
  - 2022-06-27 17:24:20,100: DEBUG - + args_array=([n]=service_name= [a]=action= [l]=line_match= [p]=log_path= [t]=timeout= [e]=length=)
  - 2022-06-27 17:24:20,100: DEBUG - + local -A args_array
  - 2022-06-27 17:24:20,100: DEBUG - + local service_name
  - 2022-06-27 17:24:20,100: DEBUG - + local action
  - 2022-06-27 17:24:20,100: DEBUG - + local line_match
  - 2022-06-27 17:24:20,100: DEBUG - + local length
  - 2022-06-27 17:24:20,101: DEBUG - + local log_path
  - 2022-06-27 17:24:20,101: DEBUG - + local timeout
  - 2022-06-27 17:24:20,101: DEBUG - + ynh_handle_getopts_args --service_name=nginx --action=reload
  - 2022-06-27 17:24:20,101: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,213: DEBUG - + service_name=nginx
  - 2022-06-27 17:24:20,213: DEBUG - + action=reload
  - 2022-06-27 17:24:20,213: DEBUG - + line_match=
  - 2022-06-27 17:24:20,214: DEBUG - + length=20
  - 2022-06-27 17:24:20,214: DEBUG - + log_path=/var/log/nginx/nginx.log
  - 2022-06-27 17:24:20,214: DEBUG - + timeout=300
  - 2022-06-27 17:24:20,215: DEBUG - + '[' reload == stop ']'
  - 2022-06-27 17:24:20,215: DEBUG - + [[ -n '' ]]
  - 2022-06-27 17:24:20,215: DEBUG - + '[' reload == reload ']'
  - 2022-06-27 17:24:20,215: DEBUG - + action=reload-or-restart
  - 2022-06-27 17:24:20,215: DEBUG - + systemctl reload-or-restart nginx
  - 2022-06-27 17:24:20,306: DEBUG - + [[ -n '' ]]
  - 2022-06-27 17:24:20,306: DEBUG - + ynh_script_progression '--message=Upgrade of mobilizon completed'
  - 2022-06-27 17:24:20,307: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,334: DEBUG - + set +o xtrace
  - 2022-06-27 17:24:20,342: DEBUG - + echo '! Helper used in legacy mode !'
  - 2022-06-27 17:24:20,343: DEBUG - + set +x
  - 2022-06-27 17:24:20,344: DEBUG - + echo '[################+...] > Upgrade of mobilizon completed'
  - 2022-06-27 17:24:20,344: DEBUG - + set -o xtrace
  - 2022-06-27 17:24:20,344: INFO - [################+...] > Upgrade of mobilizon completed
  - 2022-06-27 17:24:20,344: DEBUG - + ynh_exit_properly
  - 2022-06-27 17:24:20,344: DEBUG - + local exit_code=0
  - 2022-06-27 17:24:20,345: DEBUG - + rm -rf /var/cache/yunohost/download/
  - 2022-06-27 17:24:20,345: DEBUG - + '[' 0 -eq 0 ']'
  - 2022-06-27 17:24:20,345: DEBUG - + exit 0
  - 2022-06-27 17:24:21,346: DEBUG - Checking that required services are up and running...
  - 2022-06-27 17:24:22,061: SUCCESS - mobilizon upgraded
metadata: 
  ended_at: 2022-06-27 17:24:22
  env: 
    BASH_XTRACEFD: 7
    NO_BACKUP_UPGRADE: 0
    YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_h59_k7sd
    YNH_APP_CURRENT_VERSION: 2.0.2~ynh2
    YNH_APP_ID: mobilizon
    YNH_APP_INSTANCE_NAME: mobilizon
    YNH_APP_INSTANCE_NUMBER: 1
    YNH_APP_MANIFEST_VERSION: 2.1.0~ynh1
    YNH_APP_UPGRADE_TYPE: UPGRADE_FULL
    YNH_ARCH: amd64
    YNH_CWD: /var/cache/yunohost/app_tmp_work_dirs/app_h59_k7sd/scripts
    YNH_INTERFACE: cli
    YNH_STDRETURN: /tmp/tmprh732l64/stdreturn
  error: None
  interface: cli
  operation: app_upgrade
  parent: None
  related_to: 
    - app
    - mobilizon
  started_at: 2022-06-27 17:23:39
  success: True
  yunohost_version: 4.3.6.3
metadata_path: /var/log/yunohost/categories/operation/20220627-152339-app_upgrade-mobilizon.yml
name: 20220627-152339-app_upgrade-mobilizon

on ne vois pas grand chose…
ou cela

~$ sudo yunohost app upgrade mobilizon
Info: Now upgrading mobilizon...
Info: [+...................] > Loading installation settings...
Info: [#+..................] > Checking version...
Info: [##+.................] > Backing up the app before upgrading (may take a while)...
Info: [###+................] > Stopping a systemd service...
Info: The service mobilizon has correctly executed the action stop.
Info: [####+...............] > Ensuring downward compatibility...
Info: '/var/www/mobilizon/mobilizon/priv/data/GeoLite2-City.mmdb' wasn't deleted because it doesn't exist.
Info: '/usr/share/GeoIP' wasn't deleted because it doesn't exist.
Info: [#####+..............] > Making sure dedicated system user exists...
Info: [######+.............] > Upgrading source files...
Info: [#######+............] > Upgrading NGINX web server configuration...
Info: [########+...........] > Upgrading dependencies...
Info: [#########+..........] > Create datadir folder...
Warning: md5sum: /var/www/mobilizon/live/config/runtime.exs: No such file or directory
Info: [##########+.........] > Making setup...
Info: [###########+........] > Updating a configuration file...
Info: [############+.......] > Upgrading systemd configuration...
Info: [#############+......] > Integrating service in YunoHost...
Info: [##############+.....] > Starting a systemd service...
Info: The service mobilizon has correctly executed the action start.
Info: [###############+....] > Reloading NGINX web server...
Info: [################+...] > Upgrade of mobilizon completed
Success! mobilizon upgraded
Success! Upgrade complete

Si ce n’est que le dossier /var/www/mobilizon/live/config/runtime.exs n’existe pas !
Je n’ai que ces dossiers présents dans /var/www/mobilizon/live/:

~# ls /var/www/mobilizon/live/
bin  erts-12.1.5  lib  priv  releases  support

Par contre j’ai bien un fichier /etc/mobilizon/config.exs
Je cherche encore des logs, dans /var/log/syslog/

Jun 27 17:24:17 linux07 systemd[1]: Configuration file /etc/systemd/system/mobilizon.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jun 27 17:24:17 linux07 systemd[1]: Reloading.
....
Jun 27 17:24:19 linux07 mobilizon[10081]: 17:24:19.571 [info] Source for database :city not found: "/var/lib/mobilizon/geo/GeoLite2-City.mmdb"
Jun 27 17:24:19 linux07 mobilizon[10081]: 17:24:19.588 [info] Running Mobilizon.Web.Endpoint with cowboy 2.9.0 at 127.0.0.1:8095 (http)
Jun 27 17:24:19 linux07 mobilizon[10081]: 17:24:19.589 [info] Access Mobilizon.Web.Endpoint at https://mobilizon.linux07.fr
Jun 27 17:24:20 linux07 systemd[1]: Reloading A high performance web server and a reverse proxy server.
Jun 27 17:24:20 linux07 systemd[1]: Reloaded A high performance web server and a reverse proxy server.
.....
Jun 27 17:24:51 linux07 mobilizon[10081]: 17:24:51.077 request_id=FvyDoSO1qrNhfuwAAAEG [info] GET /
Jun 27 17:24:51 linux07 mobilizon[10081]: 17:24:51.083 request_id=FvyDoSO1qrNhfuwAAAEG [info] Sent 200 in 5ms
Jun 27 17:24:54 linux07 mobilizon[10081]: 17:24:54.844 request_id=FvyDogQ9PjGKqs8AAAEm [info] POST /api
Jun 27 17:24:54 linux07 mobilizon[10081]: 17:24:54.866 request_id=FvyDogQ9PjGKqs8AAAEm [info] Sent 200 in 21ms
Jun 27 17:24:54 linux07 mobilizon[10081]: 17:24:54.916 request_id=FvyDogiAkmU62LUAAAGm [info] POST /api
Jun 27 17:24:55 linux07 mobilizon[10081]: 17:24:55.021 request_id=FvyDogiAkmU62LUAAAGm [info] Sent 200 in 104ms
Jun 27 17:25:00 linux07 mobilizon[10081]: 17:25:00.203 [info] REFUSED CONNECTION TO Mobilizon.Web.GraphQLSocket in 75µs
Jun 27 17:25:00 linux07 mobilizon[10081]:   Transport: :websocket
Jun 27 17:25:00 linux07 mobilizon[10081]:   Serializer: Phoenix.Socket.V2.JSONSerializer
Jun 27 17:25:00 linux07 mobilizon[10081]:   Parameters: %{"vsn" => "2.0.0"}

Il semble que le soucis vient de la connexion avec l’utilisateur LDAP configuré lors de l’installation avec Yunohost…

Une issue à ce sujet est ouverte sur le dépôt framagit: 2.1.0 ldap authentication issue (#1130) · Issues · Framasoft / Mobilizon · GitLab