YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 43 forks source link

Synapse 1.94 fails to restore on a fresh installation #423

Closed kr-cr closed 1 week ago

kr-cr commented 8 months ago

Context

Steps to reproduce

The 3 warnings I have in the logs are:

2023-10-21 16:28:45,946: WARNING - setfacl: Option -m: Invalid argument near character 3
2023-10-21 16:28:45,949: WARNING - setfacl: Option -m: Invalid argument near character 5

and I think the one that cause the script to fail:

2023-10-21 16:44:30,463: DEBUG - + pip3 install --upgrade setuptools wheel pip
2023-10-21 16:44:30,465: WARNING - ../settings/scripts/_common.sh: /opt/yunohost/matrix-synapse/bin/pip3: /opt/yunohost/matrix-synapse/bin/python3: bad interpreter: No such file or directory

Logs

Here is the my full log: https://paste.yunohost.org/raw/ofojaduqah

I also posted this on the Yunohost forum to get any help: https://forum.yunohost.org/t/synapse-fails-to-restore-on-a-fresh-installation/26859/

Thank you

kr-cr commented 8 months ago

Update : I seem to have finaly managed to restore it successfully!

I did 2 changes since the last try so I am not sure about which solved it. The 2 modifications are:

  1. I stumbled upon this issue and more specifically this reply from Josue-T, that say that the architecture change needs a modification in the restoration script. I made the change in my backup.

  2. I didn't specified it earlier but my backup was on an external HDD binded to the backup folder of Yunohost. This time I canceled the bind mount and move the backup archive to the card.

The issue can be tagged as resolved, but maybe the changes have to be documented somewhere.

Thank you

rosbeef commented 3 weeks ago

The bug persist on 1.107.0~ynh1

That resolve the bug (related to #242 ) : https://github.com/YunoHost-Apps/synapse_ynh/issues/242#issuecomment-822468973

Maybe this should help too : In https://github.com/YunoHost-Apps/synapse_ynh/blob/master/scripts/_common.sh local pip3="$code_dir"/bin/pip3 should better be local pip3="$code_dir"/bin/python3 -m pip

Situations like this are exactly why running "pip" or "pip3" directly is no longer recommended, in favor of: "python3 -m pip install ..."

source : https://stackoverflow.com/a/51373253

https://snarky.ca/why-you-should-use-python-m-pip/

Josue-T commented 1 week ago

Well closing because there was a lot of changes since this issue was created.

If the issue persist please create a new issue with the full log and details of the new issue.