Mastodon update from 4.2.8~ynh1 to 4.2.10~ynh1 failed

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.2.20.2
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If your request is related to an app, specify its name and version: Mastodon 4.2.8~ynh1 update to 4.2.10~ynh1

Description of my issue

The update form Mastodon 4.2.8~ynh1 to 4.2.10~ynh1 failed.
Possibly a similar problem to this one: https://forum.yunohost.org/t/mastodon-4-2-8-update-fails-because-of-missing-db/29886

Some extracts form the Log:

2024-07-14 09:18:51,837: DEBUG - + database=
2024-07-14 09:18:51,837: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD=********** psql ''
2024-07-14 09:18:51,967: WARNING - NOTICE:  database "mastodon" does not exist, skipping
2024-07-14 09:18:51,968: DEBUG - DROP DATABASE
2024-07-14 09:18:51,968: DEBUG - + ynh_psql_execute_as_root '--sql=ALTER DATABASE mastodon_production RENAME TO mastodon;'
2024-07-14 09:18:51,986: DEBUG - + database=
2024-07-14 09:36:11,290: WARNING - Variable $redis_namespace wasn't initialized when trying to replace __REDIS_NAMESPACE__ in /var/www/mastodon/live/.env.production
2024-07-14 09:36:12,800: ERROR - Could not upgrade mastodon: An error occurred inside the app upgrade script

Complete Log

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

Thanks for helping
Papillon

I have exactly the same problem with a vps. the update does not work via the yunohost webadmin, as well as via ssh with screen:

Variable $redis_namespace wasn’t initialized when trying to replace REDIS_NAMESPACE in /var/www/mastodon/live/.env.production.

It probably has something to do with the “redis namespace”.

Super hacky solution to test (make a full backup first!):

sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/orhtej2-patch-1
1 Like

Thanks for helping. Upgrade was successful (with some warnings: https://paste.yunohost.org/raw/duxudoleyo).

1 Like

That worked for me too. Thank you :slightly_smiling_face:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.