matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

Dendrite won't allow invitation rejections unless federation is turned on. #1873

Closed gleachkr closed 3 years ago

gleachkr commented 3 years ago

Background information

Description

Dendrite won't allow invitation rejections unless federation is turned on.

Steps to reproduce

The server then throws a 400 bad request, and the SDK gives the error "failed to leave room ... through 1 server(s)".

The following error appears in the systemd log:

Jun 12 16:41:24 dendrite-1 dendrite-monolith-server[465449]: time="2021-06-12T16:41:24.375703525Z" level=warning msg="r.federation.MakeLeave failed" func="PerformLeave\n\t" file=" [github.com/matrix-org/dendrite/federationsender/internal/perform.go:463]" error="Get \"matrix://populus.open-tower.com/_matrix/federation/v1/make_leave/ ETC
Jun 12 16:42:04 dendrite-1 dendrite-monolith-server[465449]: time="2021-06-12T16:42:04.752656729Z" level=warning msg="Outgoing request failed" func="DoHTTPRequest\n\t" file=" [github.com/matrix-org/gomatrixserverlib@v0.0.0-20210216163908-bab1f2be20d0/client.go:495]" error="Get \"matrix://populus.open-tower.com/_matrix/federation/v1/make_leave/ ETC

Switching disable_federation to false appears to resolve the problem. The problem only seems to arise when rejecting an invitation, not when leaving a room that has been joined, but it was completely reproducible under those conditions.

kegsay commented 3 years ago

Possibly related: https://github.com/matrix-org/dendrite/issues/1743

kegsay commented 3 years ago

@gleachkr please can you try this again on e80098e18630df4ff148c16f741dd72f33e2b1c8 - it should be fixed now.

gleachkr commented 3 years ago

Yes, seems to be fixed. Thanks!