Skip to content

matrix federation bridge does not start after update to 7.2.1 #34984

Closed

Description

@individual-it

Description:

After updating from 7.1.0 to 7.2.0 the matrix federation stopped working and the matrix federation verification says that the bridge is not started yet.

Steps to reproduce:

  1. setup matrix federation with 7.1.0
  2. update to 7.2.1
  3. go to matrix federation settings (admin/settings/Federation) and click the Verify button

Expected behavior:

verification should work

Actual behavior:

verification says the bridge is not running

Server Setup Information:

  • Version of Rocket.Chat Server: 7.2.1
  • License Type: Starter
  • Number of Users:
  • Operating System: Ubuntu
  • Deployment Method: docker
  • Number of Running Instances: 1
  • NodeJS Version:
  • MongoDB Version:

docker file:

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:7.2.1
      #image: rocket.chat:latest
    restart: unless-stopped
    volumes:
      - ./uploads:/app/uploads
      - ./data/synapse/registration.yaml:/app/matrix-federation-config/registration.yaml
    environment:
      - PORT=3000
      - ROOT_URL=http://chat.jankari.tech
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=smtp://smtp.email
    depends_on:
      - mongo
    ports:
      - 3000:3000
      - 3300:3300

  mongo:
    image: mongo:6.0
    restart: unless-stopped
    volumes:
      - ./data/db:/data/db
      - ./data/dump:/dump
    command: >
      env
      bash -c
        "while [ ! -f /data/db/WiredTiger ]; do
          echo \"wiredTiger migration hasn't started yet. Waiting 30 secs...\";
          sleep 30;
        done;
        docker-entrypoint.sh mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger;"
    depends_on:
      - migrator
    labels:
      - "traefik.enable=false"

  migrator:
    build: ./docker/
    volumes:
      - ./data/db:/data/db

    synapse:
    restart: always
    image: matrixdotorg/synapse:v1.121.1
    environment:
      SYNAPSE_CONFIG_DIR: "/data"
      SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml"
    depends_on:
      - rocketchat
    ports:
      - 8008:8008
    volumes:
      - ./data/synapse:/data

  autoheal:
    restart: always
    image: willfarrell/autoheal
    environment:
      - AUTOHEAL_CONTAINER_LABEL=all
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

homeserver.yaml

# Configuration file for Synapse.
#
# This is a YAML file: see [1] for a quick introduction. Note in particular
# that *indentation is important*: all the elements of a list or dictionary
# should have the same indentation.
#
# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
#
# For more information on how to configure Synapse, including a complete accounting of
# each option, go to docs/usage/configuration/config_documentation.md or
# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
server_name: "chat.jankari.tech"
pid_file: /data/homeserver.pid
listeners:
  - port: 8008
    tls: false
    type: http
    x_forwarded: true
    resources:
      - names: [client, federation]
        compress: false
database:
  name: sqlite3
  args:
    database: /data/homeserver.db
log_config: "/data/chat.jankari.tech.log.config"
media_store_path: /data/media_store
registration_shared_secret: "xxxxxxxxxxxxxxxxxxxx"
report_stats: true
macaroon_secret_key: "xxxxxxxxxxxxxxxxx"
form_secret: "xxxxxxxxxxxxxxxxx"
signing_key_path: "/data/chat.jankari.tech.signing.key"
trusted_key_servers:
  - server_name: "matrix.org"

app_service_config_files:
  - /data/registration.yaml
auto_accept_invites:
    enabled: true
use_appservice_legacy_authorization: true 

registration.yaml

id: rocketchat_xxxxx
hs_token: xxxxxxxxxxxx
as_token: xxxxxxxxxxxx
url: http://rocketchat:3300
sender_localpart: rocket.cat
namespaces:
  users:
    - exclusive: false
      regex: .*
  rooms:
    - exclusive: false
      regex: .*
  aliases:
    - exclusive: false
      regex: .*
de.sorunome.msc2409.push_ephemeral: false
use_appservice_legacy_authorization: true
rocketchat:
  homeserver_url: https://matrix.jankari.tech
  homeserver_domain: chat.jankari.tech

This configuration works fine with 7.1.1 but not with 7.2.1

Activity

  1. reetp commented on Jan 21, 2025

    @reetp
    Collaborator

    You have provided no logs at all so it is hard to see what is going right/wrong.

    All we can see is a bunch of configs and 'it isn't working'.

    (Please don't paste long ones here - either attach as files or use pastebin etc.)

    https://github.com/RocketChat/Rocket.Chat/issues/new?template=bug_report.md

    Relevant logs:

    Logs from both SERVER and BROWSER
    For more information about collecting logs please see: https://rocket.chat/docs/contributing/reporting-issues#gathering-logs

    ( https://developer.rocket.chat/docs/contribute-through-bug-reporting )

    We need to see what your containers are telling you.

  2. reetp commented on Jan 21, 2025

    @reetp
    Collaborator

    Also what happened to your previous issue ??

    You have upgraded so I presume you fixed it? You must tell us these things.

    #33240

  3. individual-it commented on Jan 22, 2025

    @individual-it
    Author

    You have provided no logs at all so it is hard to see what is going right/wrong.

    I am sorry for that but I don't think there were any relevant logs, at least none that helped me to pin down the issue. I might be wrong with that. This happens on our production system so my first priority was to get it running again and then I thought I would open the issue in the hope that it still would be helpful.
    I will try to reproduce the issue and see if I can find any logs.

    Also what happened to your previous issue ??
    You have upgraded so I presume you fixed it? You must tell us these things.

    Sorry if it wasn't clear enough, but I thought that I (and other) told what the work-around was in the issue. I've wrote a longer post about my reasoning and closed the issue.

  4. reetp commented on Jan 22, 2025

    @reetp
    Collaborator

    I am sorry for that but I don't think there were any relevant logs, at least none that helped me to pin down the issue. I might be wrong with that.

    If you don't have any logs and can't see an issue I'm not sure anyone else will be able to either!!

    Check the log levels. There must be something somewhere either in Rocket or Matrix or the general server itself.

  5. individual-it commented on Jan 28, 2025

    @individual-it
    Author

    What I've tried now is:

    1. having a running and working instance of version 7.1.1 (configuration see above)
    2. change only the docker container version to 7.2.1 and start again. (At that point the configuration status of matrix bridge is set to Valid, because it was valid and working in 7.1.1)
    3. try sending messages both ways in a room that worked with 7.1.1 and is hosted / created in RocketChat
    4. at the end click the Verify configuration button in the Matrix Bridge settings

    rocketchat running logs:

    rocketchat-1  | +--------------------------------------------------+
    rocketchat-1  | |                  SERVER RUNNING                  |
    rocketchat-1  | +--------------------------------------------------+
    rocketchat-1  | |                                                  |
    rocketchat-1  | |  Rocket.Chat Version: 7.2.1                      |
    rocketchat-1  | |       NodeJS Version: 20.18.0 - x64              |
    rocketchat-1  | |      MongoDB Version: 6.0.20                     |
    rocketchat-1  | |       MongoDB Engine: wiredTiger                 |
    rocketchat-1  | |             Platform: linux                      |
    rocketchat-1  | |         Process Port: 3000                       |
    rocketchat-1  | |             Site URL: https://chat.jankari.tech  |
    rocketchat-1  | |     ReplicaSet OpLog: Enabled                    |
    rocketchat-1  | |          Commit Hash: ae24712588                 |
    rocketchat-1  | |        Commit Branch: HEAD                       |
    rocketchat-1  | |                                                  |
    rocketchat-1  | +--------------------------------------------------+
    

    sending message from matrix to RC in a multi user room first time: logs1.txt

    trying to send a message from matrix to RC in the same room again: logs2.txt

    sending a message in the same room from RC to matrix: logs3.txt

    verify the configuration: logs4.txt

    I do use the Rocket.Chat desktop client. If you think logs from the browser would be helpful I can retry with a browser session.

    BTW: the gathering logs link seems to be invalid

  6. individual-it commented on Jun 2, 2025

    @individual-it
    Author

    I got it running with RC 7.6.1 and synapse v1.130.0
    I don't know if this bug was fixed along the way between 7.2 and 7.6 but as it works now I will close this.
    If anyone comes across this issue and wants to see my config. I am happy to share that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions