Synapse / Matrix Container cannot create database

Hi Folks,

after installation of Matrix / Synapse App from App center I see the container always rebooting.

Container Logs show that the container seem to create database with the following error:

2020-08-25 09:02:07,677 - twisted - 192 - ERROR - None - ********************************************************
2020-08-25 09:02:07,678 - twisted - 192 - ERROR - None -  Database is incorrectly configured:
2020-08-25 09:02:07,678 - twisted - 192 - ERROR - None -
2020-08-25 09:02:07,678 - twisted - 192 - ERROR - None -      - 'COLLATE' is set to 'en_US.UTF-8'. Should be 'C'
2020-08-25 09:02:07,678 - twisted - 192 - ERROR - None -      - 'CTYPE' is set to 'en_US.UTF-8'. Should be 'C'
2020-08-25 09:02:07,678 - twisted - 192 - ERROR - None -
2020-08-25 09:02:07,679 - twisted - 192 - ERROR - None -  See docs/postgres.md for more information.
2020-08-25 09:02:07,679 - twisted - 192 - ERROR - None - ********************************************************

could someonw please help how to fix / solve this issue?

best,

Mat

Help yourself, then the community will help you

Things to fix this:

  1. deinstall synapse from UCS - this will leave the postgres db on the server (also a bug?)
  2. DROP synapse db from postgresql server
  3. create new empty synapse db following https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md
  4. install synapse App from UCS app store.

enjoy

Still this should be fixed, do you know where we can file an issue for this? or maybe even send a pull-request?

First of all,

  1. if you are installed synapse and came here for solution then first uninstall it and reboot ucs.
  2. after rebooted go to UCS cli and login as root.
  3. type “apt install libpq5”
  4. after that installation complete then type “su - postgres”
  5. type “dropdb synapse”
  6. and then type "createuser --pwprompt synapse_user (you can have any name other than “synapse_user”)
  7. then type “createdb --encoding=UTF8 --locale=C --template=template0 --owner=synapse_user synapse”
  8. you are done.
  9. now install synapse again from ucs appstore.
  10. go to element interface and use UCS domain name as your matrix home server address in element windows app or element.io or element in ucs.

Thanks!!

1 Like
Mastodon