[SOLVED] Can't restore synapse after failed upgrade

What app is this about, and its version: matrix-synapse, version unknown
What YunoHost version are you running: 12.1.39
What type of hardware are you using: VPS bought online

Describe your issue

Attempted to upgrade matrix-synapse, which failed – seems my /tmp didn’t have enough space. Unfortunately, restore also fails – there appears to be an issue with missing python packages after the restore that prevents synapse from restarting.

Share relevant logs or error messages

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

Hello,

I would be curious to know why the upgrade failed. So could you also share the log of the failed upgrade.

Thanks

https://paste.yunohost.org/raw/virelenero – upgrade failure

https://paste.yunohost.org/raw/efoyolefud – auto-removal after upgrade failure

compile: writing output: write $WORK/b328/_pkg_.a: no space left on device

Seems that you don’t have enough place on your storage.

Yes, I noted that in the original message as being the cause of the original failure to install. The issue is, I can’t restore from the backup, which doesn’t seem to be a space-related issue. Based on the error message from the backup restore, it seems that synapse isn’t successfully starting once restored due to some Python issue, but I’m not well-enough acquainted with Python to troubleshoot further.

Here are what I think are the relevant lines from the restore failure:

2026-03-19 22:09:19,671: DEBUG - + systemctl restart synapse__2.service
2026-03-19 22:09:20,473: WARNING - Job for synapse__2.service failed because the control process exited with error code.
2026-03-19 22:09:20,473: WARNING - See "systemctl status synapse__2.service" and "journalctl -xeu synapse__2.service" for details.
2026-03-19 22:09:20,474: DEBUG - + journalctl --quiet --no-hostname --no-pager --lines=20 --unit=synapse__2.service
2026-03-19 22:09:30,643: WARNING - Mar 19 22:09:20 systemd[1]: Failed to start synapse__2.service - Synapse Matrix homeserver.
2026-03-19 22:09:30,644: WARNING - Mar 19 22:09:23 systemd[1]: synapse__2.service: Scheduled restart job, restart counter is at 1.
2026-03-19 22:09:30,644: WARNING - Mar 19 22:09:23 systemd[1]: Stopped synapse__2.service - Synapse Matrix homeserver.
2026-03-19 22:09:30,645: WARNING - Mar 19 22:09:23 systemd[1]: Starting synapse__2.service - Synapse Matrix homeserver...
2026-03-19 22:09:30,645: WARNING - Mar 19 22:09:24 python[2512981]: Traceback (most recent call last):
2026-03-19 22:09:30,646: WARNING - Mar 19 22:09:24 python[2512981]:   File "<frozen runpy>", line 198, in _run_module_as_main
2026-03-19 22:09:30,647: WARNING - Mar 19 22:09:24 python[2512981]:   File "<frozen runpy>", line 88, in _run_code
2026-03-19 22:09:30,647: WARNING - Mar 19 22:09:24 python[2512981]:   File "/var/www/synapse__2/venv/lib/python3.11/site-packages/synapse/app/homeserver.py", line 32, in <module>
2026-03-19 22:09:30,648: WARNING - Mar 19 22:09:24 python[2512981]:     import synapse.config.logger
2026-03-19 22:09:30,648: WARNING - Mar 19 22:09:24 python[2512981]:   File "/var/www/synapse__2/venv/lib/python3.11/site-packages/synapse/config/__init__.py", line 22, in <module>
2026-03-19 22:09:30,649: WARNING - Mar 19 22:09:24 python[2512981]:     from ._base import ConfigError, find_config_files
2026-03-19 22:09:30,649: WARNING - Mar 19 22:09:24 python[2512981]:   File "/var/www/synapse__2/venv/lib/python3.11/site-packages/synapse/config/_base.py", line 49, in <module>
2026-03-19 22:09:30,650: WARNING - Mar 19 22:09:24 python[2512981]:     import pkg_resources
2026-03-19 22:09:30,650: WARNING - Mar 19 22:09:24 python[2512981]: ModuleNotFoundError: No module named 'pkg_resources'
2026-03-19 22:09:30,651: WARNING - Mar 19 22:09:24 systemd[1]: synapse__2.service: Control process exited, code=exited, status=1/FAILURE
2026-03-19 22:09:30,651: WARNING - Mar 19 22:09:24 systemd[1]: synapse__2.service: Failed with result 'exit-code'.
2026-03-19 22:09:30,652: WARNING - Mar 19 22:09:24 systemd[1]: Failed to start synapse__2.service - Synapse Matrix homeserver.

Hello,

OK I understand more the issue now. So I would suggest to try a restore with the --no-remove-on-failure which will avoid to remove the app if the restore fail. And then I would suggest to do a force upgrade (with -F) which should fix the issue.

Best regards

That sorted it, thanks!

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