YunoHost-Apps / mattermost_ynh

Mattermost package for YunoHost
http://www.mattermost.org
GNU General Public License v3.0
33 stars 19 forks source link

[help needed] update 6.2.1~ynh1 to 6.3.1~ynh1 is failing, deleting the app, and can't restore from backup #334

Closed isAAAc closed 2 years ago

isAAAc commented 2 years ago

Describe the bug

update 6.2.1~ynh1 to 6.3.1~ynh1 is failing, deleting the app, and can't restore from backup

Context

Logs

Jaxom99 commented 2 years ago

:fearful: !! But strange, since I upgraded without trouble yesterday... and I did check, I'm in 6.3.1-ynh1. EDIT : my yuno version is 4.3.5only.

isAAAc commented 2 years ago

yep, i tried to reinstall mattermost, then restore from backup, failing because app exists, remove mattermost, and ran again a restore from backup , but it doesn't work, help needed to get back app + datas from backup please

isAAAc commented 2 years ago
2022-02-01 17:04:09,774: DEBUG - + mountpoint --quiet /home/yunohost.backup/tmp/mattermost-pre-upgrade2
2022-02-01 17:04:09,779: DEBUG - + mv /home/yunohost.backup/tmp/mattermost-pre-upgrade2/apps/mattermost/backup/etc/systemd/system/mattermost.service /etc/systemd/system/mattermost.service
2022-02-01 17:04:09,784: DEBUG - + systemctl enable mattermost.service --quiet
2022-02-01 17:04:10,302: DEBUG - + yunohost service add mattermost '--description=Collaboration platform built for developers' --log=/var/log/mattermost/mattermost.log
2022-02-01 17:04:10,971: DEBUG - The service 'mattermost' was added
2022-02-01 17:04:11,253: INFO - [###############++...] > Starting a systemd service...
2022-02-01 17:04:11,255: DEBUG - + ynh_systemd_action --service_name=mattermost --action=start --log_path=systemd '--line_match=Started Mattermost'
2022-02-01 17:04:11,728: DEBUG - + service_name=mattermost
2022-02-01 17:04:11,729: DEBUG - + action=start
2022-02-01 17:04:11,729: DEBUG - + line_match='Started Mattermost'
2022-02-01 17:04:11,730: DEBUG - + length=20
2022-02-01 17:04:11,730: DEBUG - + log_path=systemd
2022-02-01 17:04:11,730: DEBUG - + timeout=300
2022-02-01 17:04:11,731: DEBUG - + '[' start == stop ']'
2022-02-01 17:04:11,732: DEBUG - + [[ -n Started Mattermost ]]
2022-02-01 17:04:11,732: DEBUG - ++ mktemp
2022-02-01 17:04:11,733: DEBUG - + local templog=/tmp/tmp.IOPE79fHV3
2022-02-01 17:04:11,734: DEBUG - + '[' systemd == systemd ']'
2022-02-01 17:04:11,734: DEBUG - + local pid_tail=1295
2022-02-01 17:04:11,735: DEBUG - + journalctl --unit=mattermost --follow --since=-0 --quiet
2022-02-01 17:04:11,735: DEBUG - + '[' start == reload ']'
2022-02-01 17:04:11,736: DEBUG - + systemctl start mattermost
2022-02-01 17:04:32,774: WARNING - Job for mattermost.service failed because the control process exited with error code.
2022-02-01 17:04:32,775: WARNING - See "systemctl status mattermost.service" and "journalctl -xe" for details.
2022-02-01 17:04:32,776: DEBUG - + ynh_exec_err journalctl --quiet --no-hostname --no-pager --lines=20 --unit=mattermost
2022-02-01 17:04:32,777: DEBUG - + [[ 6 -eq 1 ]]
2022-02-01 17:04:32,780: DEBUG - ++ journalctl --quiet --no-hostname --no-pager --lines=20 --unit=mattermost
2022-02-01 17:04:32,804: DEBUG - + ynh_print_err 'Feb 01 17:04:32 mattermost[1298]: Error: Une erreur s'\''est produite lors du démarrage du serveur, err : listen tcp 127.0.0.1:8065: bind: address already in use: listen tcp 127.0.0.1:8065: bind: address already in use

that's strage, because before restoration, and after the fail:

# netstat -laput |grep mattermost
# netstat -laput |grep 8065

so the port is free before and after, but not when the restore script try to launch the restored app ... oO

kemenaran commented 2 years ago

I looked at the restore scripts, and have no idea why the port would be occupied during the restore script.

I also looked at the possibility of leaving the failed restore attempt in-place, but it seems yunohost backup restore doesn't support a --keep-on-failure option.

At this stage I guess the only option would be to try to restore a backup manually. For this you could do a fresh install of mattermost, then restore manually the mysql dump (db.sql) in the backup.

isAAAc commented 2 years ago

hey @kemenaran o/

@Jaxom99 tried to restore on a testing server on his side, (with my backup file), and it works for him, so , something is wrong on my server, but why and where .... :man_shrugging:

Jaxom99 commented 2 years ago

No, I did upgrade/restore for a clean install of MM, and it worked (in both 6.2 and 6.3 Teams). However with your file, I got the same error as you.

kemenaran commented 2 years ago

@isAAAc I think there might be an issue with the command used to launch Mattermost not being correct. Could you extract the systemd.service file from the backup you made, and copy-paste it here?

isAAAc commented 2 years ago

ho hello @kemenaran , i forgot this issue, sorry, i reinstalled a new mattermost, we can close this issue sorry