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.9k stars 1.04k forks source link

Matrix Dimension service fails to start after update #2376

Closed praet0ri4n closed 1 year ago

praet0ri4n commented 1 year ago

Describe the bug Matrix Dimension service fails to start after update today. I did ansible-playbook -i inventory/hosts setup.yml --tags=stop and ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start after updating my vars.yml file

The start results in failed: [xxx.eu] (item=matrix-dimension) => {"ansible_loop_var": "item", "changed": false, "item": "matrix-dimension", "msg": "matrix-dimension was not detected to be running. It's possible that there's a configuration problem or another service on your server interferes with it (uses the same ports, etc.). Try running `systemctl status matrix-dimension` and `journalctl -fu matrix-dimension` on the server to investigate."}

systemctl status matrix-dimension

● matrix-dimension.service - Matrix Dimension
   Loaded: loaded (/etc/systemd/system/matrix-dimension.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2023-01-04 15:58:21 CET; 7s ago
  Process: 3229 ExecStart=/usr/bin/env docker run --rm --name matrix-dimension --log-driver=none --user=1000:1000 --cap-drop=ALL --network=matrix -p 127.0.0.1:8184:8184 -v /matrix/dimension:/d
  Process: 3228 ExecStartPre=/usr/bin/env chown 1000:1000 /matrix/dimension/dimension.db (code=exited, status=0/SUCCESS)
  Process: 3221 ExecStartPre=/usr/bin/env docker rm matrix-dimension (code=exited, status=1/FAILURE)
  Process: 3199 ExecStartPre=/usr/bin/env docker kill matrix-dimension (code=exited, status=1/FAILURE)
 Main PID: 3229 (code=exited, status=132)

Jan 04 15:58:21 master systemd[1]: matrix-dimension.service: Main process exited, code=exited, status=132/n/a
Jan 04 15:58:21 master systemd[1]: matrix-dimension.service: Failed with result 'exit-code'.

journalctl -fu matrix-dimension

Jan 04 16:21:16 master matrix-dimension[21985]: Starting matrix-dimension
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [INFO] [index] Starting dimension v1.0.0
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [INFO] [DimensionStore] Updating schema...
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE PRIMARY KEY);
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): PRAGMA INDEX_LIST(`SequelizeMeta`)
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_SequelizeMeta_1`)
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Jan 04 16:21:19 master matrix-dimension[21985]: Wed, 04 Jan 2023 15:21:19 GMT [INFO] [DimensionStore] Applied schemas:  []
Jan 04 16:21:20 master systemd[1]: matrix-dimension.service: Main process exited, code=exited, status=132/n/a
Jan 04 16:21:20 master systemd[1]: matrix-dimension.service: Failed with result 'exit-code'.

To Reproduce My vars.yml file looks like this:

matrix_domain: "xxx.eu"

matrix_ssl_retrieval_method: none

matrix_ssl_lets_encrypt_support_email: "admin@xxx.eu"

matrix_ssl_domains_to_obtain_certificates_for:
  - '{{ matrix_server_fqn_dimension }}'
  - '{{ matrix_server_fqn_matrix }}'
  - '{{ matrix_server_fqn_riot }}'
  - '{{ matrix_domain }}'
  - 'mail.{{ matrix_domain }}'
  - 'meet.{{ matrix_domain }}'

matrix_coturn_turn_static_auth_secret: "xxx"

matrix_synapse_macaroon_secret_key: "xxx"

matrix_mailer_sender_address: "matrix@xxx.eu"
matrix_mailer_relay_use: true
matrix_mailer_relay_host_name: "mail.xxx.eu"
matrix_mailer_relay_host_port: 587
matrix_mailer_relay_auth: true
matrix_mailer_relay_auth_username: "matrix@xxx.eu"
matrix_mailer_relay_auth_password: "xxx"

matrix_nginx_proxy_enabled: false
matrix_nginx_proxy_base_domain_serving_enabled: false

matrix_nginx_proxy_ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3"

matrix_coturn_enabled: true

matrix_dimension_enabled: true
matrix_dimension_admins: ['@xxxx:p1p0.eu','@xxx:p1p0.eu']
matrix_dimension_access_token: "xxx"

matrix_synapse_federation_enabled: false

matrix_riot_e2ee_default: false

matrix_synapse_admin_enabled: true

matrix_synapse_max_upload_size_mb: 500

Expected behavior ansible-playbook -i inventory/hosts setup.yml --tags=start should start dimension service

Matrix Server:

Additional context Add any other context about the problem here.

praet0ri4n commented 1 year ago

Bit more investigation.. Running the docker run --rm --name matrix-dimension --log-driver=none --user=1000:1000 --cap-drop=ALL --network=matrix -p 127.0.0.1:8184:8184 -v /matrix/dimension:/data:rw turt2live/matrix-dimension:latest with --interactive --tty --entrypoint /bin/sh and running the /docker-entrypoint.sh manually gave the same output

Starting matrix-dimension
Thu, 05 Jan 2023 20:02:12 GMT [INFO] [index] Starting dimension v1.0.0
Thu, 05 Jan 2023 20:02:12 GMT [INFO] [DimensionStore] Updating schema...
Thu, 05 Jan 2023 20:02:12 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE PRIMARY KEY);
Thu, 05 Jan 2023 20:02:12 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): PRAGMA INDEX_LIST(`SequelizeMeta`)
Thu, 05 Jan 2023 20:02:12 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_SequelizeMeta_1`)
Thu, 05 Jan 2023 20:02:12 GMT [DEBUG] [DimensionStore [SQL]] Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Thu, 05 Jan 2023 20:02:12 GMT [INFO] [DimensionStore] Applied schemas:  []

plus this one Illegal instruction (core dumped)

Quick search for similar errors connected to docker link to problems with older CPUs and missing AVX or AVX2 instructions. My home server is running on

more /proc/cpuinfo | grep flags
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti tpr_shadow dtherm
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti tpr_shadow dtherm

I tried building custom images for matrix-dimension with older commits from 12th dec 2021, but issue is still the same. So the question stays open, if and which of the changes to the matrix-dimension started to use some newer instructions and fail on my cpu. But as the matrix-dimension is discontinued and last I have no real need for it, I turned it off for my matrix homeserver.