Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service always dies immidiately #84

Open
Delegator9176 opened this issue Aug 17, 2023 · 7 comments
Open

Service always dies immidiately #84

Delegator9176 opened this issue Aug 17, 2023 · 7 comments

Comments

@Delegator9176
Copy link

Describe the bug

After the last update to version 0.4.3 mautrix-signal stopped working the service is always crashing. The log shows there is an issue with the signal-bot system user and his keys

here are the logs from the mautrix-signal-service
https://paste.yunohost.org/yigapolote

Thanks in advance

@TiberiusRegenschein
Copy link

TiberiusRegenschein commented Aug 18, 2023

I can confirm this behavior. A solution can be found here: https://forum.yunohost.org/t/mautrix-signal-hs-suite-a-mise-a-jour/25991/5

Will this be fixed permanently? Thanks for keeping the bridge alive.

@CodeShakingSheep
Copy link
Member

I have the same behavior. See my logs here: https://paste.yunohost.org/anohexibor

@Delegator9176
Copy link
Author

I can confirm this behavior. A solution can be found here: https://forum.yunohost.org/t/mautrix-signal-hs-suite-a-mise-a-jour/25991/5

  1. Edit the file: nano /etc/yunohost/apps/mautrix_signal/settings.yml
  2. retrieve the value of psqlpwd then copy this value
  3. Goto the file: nano /opt/yunohost/mautrix_signal/config.yaml
  4. Find the line containing database: postgres://mautrix_signal@localhost:5432/mautrix_signal
  5. and modify it so that it contains your password in front of the @ with a leading : -> database: postgres://mautrix_signal:TRUCSECRETCOPIERAVANT@localhost:5432/mautrix_signal
  6. Restart service and all is OK: systemctl restart mautrix_signal

@Gredin67
Copy link
Collaborator

Is this really solved by any PR ? Or you just proposed a workaround ? Did you have a look @nathanael-h ?

@Gredin67 Gredin67 reopened this Aug 25, 2023
@nathanael-h
Copy link
Contributor

Hello, I did not had a look yet. Thanks for the ping. I don't really understand why we have this issue here on mautrix_signal_ynh which is the same as we had on mautrix_whatsapp_ynh, as the latestet upgrade of the app just changed the sources and the config.yaml files

I see in the upgrade script that the db_pwd variable is initialised two times:

db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)

db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)

It seems that at the time of chaging the key to store the db password value, from db_pwd to psqlpwd we forgot to handle this switch in the upgrade process. What do you think about this? I could send a PR.

@Gredin67
Copy link
Collaborator

@MayeulC
Copy link
Collaborator

MayeulC commented Aug 28, 2023

I agree it's annoying, I dug into it some time ago, and didn't really understand how the configuration was handled. There seems to be a lot of "dark magic" stuff that gets automatically handled by yunohost implicitly, which makes understanding everything complicated.

A big refactor is needed, possibly with packaging v2. I would also like to keep migration operations grouped together in the code. Unfortunately, the changes were not really documented, so we'd have to go over the code history and write down configuration changes. There is definitely a need to clean up unused variables as per #67, and better handle version bumps.

It doesn't help that upstream is being rewritten, and as a result the packaging will have to be completely overhauled at some point.

Finally, I am not sure why I keep missing github notifications. Probably because I have so many of these? I apologize for missing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants