spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.74k stars 1.02k forks source link

ImportError: libicui18n.so.67: cannot open shared object file: No such file or directory for matrix-synapse container #2899

Closed ppkhoa closed 11 months ago

ppkhoa commented 11 months ago

Playbook Configuration:

My vars.yml file looks like this:

---
# The bare domain name which represents your Matrix identity.
# Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
#
# Note: this playbook does not touch the server referenced here.
# Installation happens on another server ("matrix.<matrix-domain>").
#
# If you've deployed using the wrong domain, you'll have to run the Uninstalling step,
# because you can't change the Domain after deployment.
#
# Example value: example.com
matrix_domain: ****************

# The Matrix homeserver software to install.
# See `roles/matrix-base/defaults/main.yml` for valid options.
matrix_homeserver_implementation: synapse

# A secret used as a base, for generating various other secrets.
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
matrix_homeserver_generic_secret_key: '******************************'

# This is something which is provided to Let's Encrypt when retrieving SSL certificates for domains.
#
# In case SSL renewal fails at some point, you'll also get an email notification there.
#
# If you decide to use another method for managing SSL certificates (different than the default Let's Encrypt),
# you won't be required to define this variable (see `docs/configuring-playbook-ssl-certificates.md`).
#
# Example value: someone@example.com
matrix_ssl_lets_encrypt_support_email: '******************'
matrix_playbook_reverse_proxy_type: other-traefik-container
matrix_playbook_reverse_proxyable_services_additional_network: traefik
devture_traefik_certs_dumper_enabled: false
devture_traefik_config_certificatesResolvers_acme_enabled: false

# A Postgres password to use for the superuser Postgres user (called `matrix` by default).
#
# The playbook creates additional Postgres users and databases (one for each enabled service)
# using this superuser account.
matrix_synapse_auto_compressor_enabled: true
devture_postgres_connection_password: 'matrix-postgres@*******************'
matrix_architecture: 'arm64'
matrix_nginx_proxy_base_domain_serving_enabled: true
matrix_nginx_proxy_container_labels_additional_labels: |
  traefik.http.routers.wellknown.rule=Host(`{{ matrix_domain }}`) && PathPrefix(`/.well-known`)
  traefik.http.routers.wellknown.entrypoints=web-secure
  traefik.http.routers.wellknown.tls.certResolver=default
  traefik.http.routers.wellknown.middlewares=nginx
  traefik.http.middlewares.nginx.redirectregex.regex=^https://{{ matrix_domain }}/(.*)
  traefik.http.middlewares.nginx.redirectregex.replacement=https://{{ matrix_server_fqn_matrix }}/$${1}
  traefik.http.routers.wellknown.service=matrix-nginx-proxy-web
matrix_nginx_proxy_hsts_preload_enabled: true

matrix_coturn_turn_external_ip_address: ************
matrix_synapse_container_image_self_build: true
matrix_synapse_container_image_self_build_repo: "https://github.com/matrix-org/synapse.git"
matrix_synapse_admin_enabled: true
matrix_synapse_enable_registration: true
matrix_synapse_enable_registration_captcha: true
matrix_synapse_recaptcha_public_key: '*******************'
matrix_synapse_recaptcha_private_key: '*********************'
matrix_synapse_allow_public_rooms_over_federation: true
matrix_mautrix_gmessages_enabled: false
matrix_mailer_sender_address: "me@***********"
matrix_mailer_relay_use: true
matrix_mailer_relay_host_name: "smtp.sendgrid.net"
matrix_mailer_relay_host_port: 587
matrix_mailer_relay_auth: true
matrix_mailer_relay_auth_username: "apikey"
matrix_mailer_relay_auth_password: "*********************"
matrix_synapse_ext_password_provider_shared_secret_auth_com_devture_shared_secret_auth_support_enabled: true
matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: '************************'
matrix_mautrix_wsproxy_enabled: true
matrix_mautrix_imessage_appservice_token: '***************'
matrix_mautrix_imessage_homeserver_token: '*****************'
matrix_mautrix_androidsms_appservice_token: '****************'
matrix_mautrix_androidsms_homeserver_token: '*************'
matrix_mautrix_wsproxy_syncproxy_shared_secret: '*************'
matrix_mautrix_wsproxy_bind_port: true
matrix_mautrix_imessage_appservice_bot_username: imessage-bot
matrix_mautrix_wsproxy_syncproxy_database_username: '*******'
matrix_mautrix_wsproxy_syncproxy_database_password: '***************'
matrix_mautrix_wsproxy_syncproxy_database_hostname: 'matrix-postgres'
matrix_mautrix_wsproxy_syncproxy_database_port: 5432
matrix_mautrix_wsproxy_syncproxy_database_name: 'matrix_mautrix_wsproxy_syncproxy'

matrix_synapse_federation_enabled: true
matrix_synapse_federation_domain_whitelist:
- matrix.org
- vector.im
#- gitter.im
matrix_mautrix_whatsapp_enabled: true
matrix_synapse_configuration_extension_yaml: |
  experimental_features:
    msc2716_enabled: true
matrix_mautrix_whatsapp_configuration_extension_yaml:
  bridge:
    encryption:
      allow: true
      default: true
    history_sync:
      backfill: true
    permissions:
      '@khoa:*************': admin
matrix_mautrix_telegram_enabled: true
matrix_mautrix_telegram_configuration_extension_yaml:
  bridge:
    encryption:
      allow: true
      default: true
    history_sync:
      backfill: true
    permissions:
      '@khoa:**************': admin
matrix_mautrix_telegram_api_id: *******************
matrix_mautrix_telegram_api_hash: *************************
matrix_mautrix_facebook_enabled: true
matrix_mautrix_facebook_configuration_extension_yaml: |
  bridge:
    encryption:
      allow: true
      default: true
    history_sync:
      backfill: true
    permissions:
      '@khoa:*******': admin

# (optional but recommended) a room id to a default room
#matrix_sms_bridge_default_room: ""

matrix_mautrix_discord_enabled: true
matrix_ma1sd_enabled: true
matrix_ma1sd_matrixorg_forwarding_enabled: true
matrix_ma1sd_configuration_extension_yaml: |
forward:
  servers:
    - 'matrix-org'
  threepid:
    medium:
      msisdn:
        connectors:
          twilio:
            account_sid: '**************************'
            auth_token: '***************************'
            number: '+1*******************'
matrix_dimension_enabled: true
matrix_dimension_admins: ['@khoa:********', '@dimension:*****']
matrix_dimension_access_token: "****************************"
matrix_bot_matrix_reminder_bot_enabled: true

# Adjust this to whatever password you chose when registering the bot user
matrix_bot_matrix_reminder_bot_matrix_user_password: *************
matrix_bot_matrix_reminder_bot_matrix_user_id_localpart: bot.reminder
# Adjust this to your timezone
matrix_bot_matrix_reminder_bot_reminders_timezone: Asia/Bangkok
matrix_mautrix_signal_enabled: true
matrix_mautrix_signal_configuration_extension_yaml: |
  bridge:
    permissions:
      '@khoa:*********': admin
matrix_bot_chatgpt_enabled: false

# Matrix access token (from bot user above)
# see: https://webapps.stackexchange.com/questions/131056/how-to-get-an-access-token-for-element-riot-matrix
matrix_bot_chatgpt_matrix_access_token: '*********************************'
matrix_client_cinny_enabled: true

Matrix Server:

Problem description:

After updating the playbook to the latest version, running just setup-all errored out at the end regarding matrix-synapse not started. Checking journal, journalctl -xeu matrix-synapse.service, I got this error:

Sep 20 01:04:34 instance-eu-frankfurt systemd[1]: Starting Synapse server...
Sep 20 01:04:34 instance-eu-frankfurt matrix-synapse[109290]: 43c398ada0e098fc14f77eaf8f4378179de2ec5f2bc767bec9c0e7fbb775902f
Sep 20 01:04:34 instance-eu-frankfurt systemd[1]: Started Synapse server.
Sep 20 01:04:35 instance-eu-frankfurt matrix-synapse[109300]: Starting synapse with args -m synapse.app.homeserver -c /data/homeserver.yaml
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]: Traceback (most recent call last):
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "<frozen runpy>", line 198, in _run_module_as_main
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "<frozen runpy>", line 88, in _run_code
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 37, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from synapse.app import _base
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/app/_base.py", line 68, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from synapse.handlers.auth import load_legacy_password_auth_providers
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/handlers/auth.py", line 56, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from synapse.api.ratelimiting import Ratelimiter
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/api/ratelimiting.py", line 21, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from synapse.storage.databases.main import DataStore
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/storage/__init__.py", line 34, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from synapse.storage.databases import Databases
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/__init__.py", line 20, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from synapse.storage.databases.main.events import PersistEventsStore
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/__init__.py", line 76, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from .user_directory import UserDirectoryStore
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/user_directory.py", line 35, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     import icu
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:   File "/usr/local/lib/python3.11/site-packages/icu/__init__.py", line 37, in <module>
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]:     from ._icu_ import *
Sep 20 01:04:36 instance-eu-frankfurt matrix-synapse[109300]: ImportError: libicui18n.so.67: cannot open shared object file: No such file or directory
Sep 20 01:04:37 instance-eu-frankfurt systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE
Sep 20 01:04:37 instance-eu-frankfurt systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.

Additional context Add any other context about the problem here.

spantaleev commented 11 months ago

Try simplifying your Synapse configuration to ensure it's not one of your customizations that are causing the problem.

We're using the official Synapse container image. Consider reporting this issue upstream.

ppkhoa commented 11 months ago

OK, I disabled the self-build option for synapse, official/pre-built image works:

matrix_synapse_container_image_self_build: false