-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Not whitelisting federation with self breaks federation #4857
Comments
If you've got logs from both sides demonstrating the problem, that would help. |
I've spent some time reproducing this. Server setupI've set up two servers (one.matrix.mydomain.com and two.matrix.mydomain.com). Synapse's Each server hosts a I'm creating a single user (called Server installationI'm setting up the servers using matrix-docker-ansible-deploy, with configuration like this:
matrix_domain: "one.matrix.mydomain.com"
matrix_server_fqn_matrix: "{{ matrix_domain }}"
matrix_riot_web_enabled: false
matrix_coturn_enabled: false
matrix_mailer_enabled: false
matrix_mxisd_enabled: false
matrix_ssl_lets_encrypt_support_email: MY_EMAIL_ADDRESS_HERE
matrix_synapse_macaroon_secret_key: "something"
matrix_synapse_federation_domain_whitelist:
- 'two.matrix.mydomain.com'
matrix_domain: "two.matrix.mydomain.com"
matrix_server_fqn_matrix: "{{ matrix_domain }}"
matrix_riot_web_enabled: false
matrix_coturn_enabled: false
matrix_mailer_enabled: false
matrix_mxisd_enabled: false
matrix_ssl_lets_encrypt_support_email: MY_EMAIL_ADDRESS_HERE
matrix_synapse_macaroon_secret_key: "something"
matrix_synapse_federation_domain_whitelist:
- 'one.matrix.mydomain.com' The server set up is done with The resulting ....
federation_domain_whitelist: ["two.matrix.mydomain.com"]
... The user is created on each server using: TestingI'm then logging in via riot-web (https://riot.im/app/) to each servers. From
LogsI'm attaching the full logs from both servers: Related problemsThe following problems are observed on the remote / 2nd server ( On the 2nd server ( Clicking Accept says:
Clicking Decline changes the middle section of riot-web to white. Looking at the network tab, I can see that this However, the following error is generated on the server:
As a result, the invite lingers on forever (until deleting it manually from the |
Can say that I have the same problem. The setup is a bit different. But logs and results are almost the same. The only difference is that it doesn't try to connect to matrix.org This is intended as a standalone chat setup without any federation to other servers. Clients connect via a reverse proxy. Federation is directly connected. IP addesses and URL's etc are changed. Setup: Server1: server1.subdomain.domain.net, 192.168.100.11 federation_domain_whitelist: is set to allow the other server. federation and client ports are separated. TLS is active. No trusted id servers. perspectives: is also configured for the other server. Can provide logs etc if needed. |
Did you manage to solve the problem? |
I think this would be solved by fixing #4024 |
For the past few days, I've been trying to set up federation between two synapse instances and failed spectacularly due to weird bugs where I could join rooms on the respectively other server via room directory but was unable to invite users from the other server to a room. This would fail with an opaque riot-web error (which does not matter for this issue) but send a broken invitation to the other home server anyway. This invitation can neither be accepted nor declined. Accepting instead resulted in riot telling me that I "have not been invited to this room", which was under the hood triggered by the original HS returning a This was solved by whitelisting federation with self for both home servers (and resending the invitations), something that I only tried because I found this issue after hours of debugging. So for the time being could we maybe add a line or two to the configuration file or the docs regarding this behavior so future users will not run into this while this issue is still open? |
sure, a PR would be welcome. |
Description
This is somewhat of a continuation of #4856.
I've got 2 servers with federation enabled. Each server only whitelists the other in
federation_domain_whitelist
. I'm only expecting them to federate with one another.When I make a room and invite a user from the other server (inviting by matrix id), Synapse would first try retrieving some signature keys.
As described in #4856, it first attempts to do so using perspectives. This will fail if federation with matrix.org is not enabled.
The server then attempts to federate with itself for some reason.
If our own domain is not listed in
federation_domain_whitelist
, we'll get aFederationDeniedError
error and federation will effectively not work. The invite reaches the other server, but in a broken state - it can neither be accepted, nor rejected. The only solution to fix that up on the other server - deleting it fromlocal_invites
and restarting Synapse (maybe this is some other bug that should be reported and worked on?).I'm not sure what the reason is for needing to federate with self.
If there is a valid reason for doing so, perhaps:
server_name
should automatically (implicitly) get added tofederation_domain_whitelist
(unlessfederation_domain_whitelist
isNone
, that is)federation_domain_whitelist
should be adjusted to indicate such a needVersion information
Version: 0.99.2
Install method: Docker
The text was updated successfully, but these errors were encountered: