Mastodon services not starting after migration to Buster

After the migration to Debian Buster, services mastodon-web and mastodon-sidekiq have been failing to start. I’m running on a dedicated amd64 machine.

Log for mastodon-web: https://paste.yunohost.org/adagijofef
Log for mastodon-sidekiq: https://paste.yunohost.org/vucerimaze

Both logs seem to mention libprotobuf.so.10 …

I noticed some similar threads recommended running apt install --dry-run libpq-dev libxml2-dev libxslt1-dev libprotobuf-dev protobuf-compiler libssl-dev libyaml-dev libreadline6-dev libncurses5-dev libffi-dev libgdbm-dev postgresql libidn11-dev libicu-dev libjemalloc-dev

Here’s my output for that:

NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
libgdbm-dev is already the newest version (1.18.1-4).
libgdbm-dev set to manually installed.
libjemalloc-dev is already the newest version (5.1.0-3).
libjemalloc-dev set to manually installed.
libffi-dev is already the newest version (3.2.1-9).
libffi-dev set to manually installed.
libidn11-dev is already the newest version (1.33-2.2).
libidn11-dev set to manually installed.
libxslt1-dev is already the newest version (1.1.32-2.2~deb10u1).
libxslt1-dev set to manually installed.
libyaml-dev is already the newest version (0.2.1-1).
libyaml-dev set to manually installed.
libncurses5-dev is already the newest version (6.1+20181013-2+deb10u2).
libncurses5-dev set to manually installed.
libssl-dev is already the newest version (1.1.1d-0+deb10u3).
libssl-dev set to manually installed.
libpq-dev is already the newest version (11.9-0+deb10u1).
libpq-dev set to manually installed.
postgresql is already the newest version (11+200+deb10u4).
postgresql set to manually installed.
libprotobuf-dev is already the newest version (3.6.1.3-2).
libprotobuf-dev set to manually installed.
protobuf-compiler is already the newest version (3.6.1.3-2).
protobuf-compiler set to manually installed.
libreadline-dev is already the newest version (7.0-5).
libreadline-dev set to manually installed.
libicu-dev is already the newest version (65.1-1+0~20200223.8+debian10~1.gbp519cf3).
libicu-dev set to manually installed.
libxml2-dev is already the newest version (2.9.9+dfsg-1+0~20200226.5+debian10~1.gbp3b6674).
libxml2-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.```

That’s only a dry-run (a.k.a. simulation) so that doesn’t really do anything … but anyway it sounds like it’s not going to do anything anyway because all the packages are already installed.

I’m mostly wondering about simply trying to upgrade the apps which may solve the issue ? (Or force an upgrade if the app is reported as already up to date)

How would you force an upgrade? I’m not seeing anything about that in the --help text.

Yes indeed, that’s kind of a hidden option (though if I remember correctly we’ll have something new for this in 4.1) :

This should do the trick ? :

YNH_FORCE_UPGRADE=1 yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh
1 Like

So, it’s been a week, and a lot of stuff has happened since then.

I tried forcing an upgrade, but after running for a couple days, it seemed to get stuck on some error messages, so I CTRL-Ced it out. This uninstalled Mastodon.
Upgrade log: https://paste.yunohost.org/wijocaboni
Uninstall log: https://paste.yunohost.org/zesizayele

Fortunately, the backup seems to have succeed, leaving me with a 600 gig backup file.
However, when I try to restore it, I run into some issues:

$ sudo yunohost backup restore mastodon-pre-upgrade1
Warning: YunoHost is already installed
Do you really want to restore an already installed system? [y/N]: n
Error: Could not restore system

Not sure why, but it looks like it’s trying to restore yunohost along with Mastodon with this backup. With how rocky this has gone so far, I’m hesitant to do anything rash, so I’d like to double check that I’m doing this right.

What’s my best course of action now? At this point, I’d be happy to just manually get the list of my follows from the backup and re-install mastodon fresh.

Eh yeah that message about “already installed system” is a bit scary but it fact it wont really erase any system part if your backup only contains an app … which is the case since it’s a pre-upgrade backup (thats kind of a UX issue we should fix)

This should be a bit better :

sudo yunohost backup restore mastodon-pre-upgrade1 --apps mastodon

Thanks for that tip. Unfortunately, the fun doesn’t end there!

$ sudo yunohost backup restore mastodon-pre-upgrade1 --apps mastodon
Info: Preparing archive for restoration...
Info: Restoring mastodon...
Error: Could not restore mastodon
Info: The operation 'Restore 'mastodon' from a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20201019-161718-backup_restore_app-mastodon --share' to get help
Error: The following critical error happened during restoration: [Errno 12] Cannot allocate memory

This machine has 32 gigs of ram and 1 gig of swap, both of which were full during the hours it was running.

Maybe there’s a way to increase swap for this?

Use --debug option and show the restore log.

sudo yunohost backup restore mastodon-pre-upgrade1 --apps mastodon --debug

Full log: https://paste.yunohost.org/raw/bekemaqeka

600 GB? My God, I did not paid attention to that. Logs says it all.

OSError: [Errno 12] Cannot allocate memory
You are running out of memory. Try increasing your swap memory or RAM. Or maybe there is another solution to extract the .tar.gz and then run the backup with only the extracted folder.

After adding an extra 5 gigs to swap, I tried restoring again, but it failed once more, for a different reason this time.
Here’s the log: https://paste.yunohost.org/raw/zobariyuno

This sound like an issue similar to Restauration Mastodon impossible suite à une migration (restoring a backup from stretch to buster ?)

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