Skip to content

Conversation

@MadLittleMods
Copy link
Collaborator

Spawning from running Complement on some self-hosted GitHub runners and seeing Connection was refused by other side: 111: Connection refused. -> Failed to find any key to satisfy errors, see https://github.com/element-hq/synapse-rust-apps/pull/360#discussion_r2600880014

More details
❌ TestCannotSendNonLeaveViaSendLeaveV1 (2.85s)
      client.go:845: [CSAPI] POST hs1/_matrix/client/v3/register => 200 OK (50.972126ms)
      client.go:845: [CSAPI] POST hs1/_matrix/client/v3/createRoom => 200 OK (217.606178ms)
      federation_room_join_test.go:409: MustJoinRoom: make_join failed: contents=[123 34 101 114 114 99 111 100 101 34 58 34 77 95 85 78 65 85 84 72 79 82 73 90 69 68 34 44 34 101 114 114 111 114 34 58 34 70 97 105 108 101 100 32 116 111 32 102 105 110 100 32 97 110 121 32 107 101 121 32 116 111 32 115 97 116 105 115 102 121 58 32 95 70 101 116 99 104 75 101 121 82 101 113 117 101 115 116 40 115 101 114 118 101 114 95 110 97 109 101 61 39 104 111 115 116 46 100 111 99 107 101 114 46 105 110 116 101 114 110 97 108 58 51 53 55 53 51 39 44 32 109 105 110 105 109 117 109 95 118 97 108 105 100 95 117 110 116 105 108 95 116 115 61 49 55 54 53 50 51 51 54 54 52 56 49 54 44 32 107 101 121 95 105 100 115 61 91 39 101 100 50 53 53 49 57 58 99 111 109 112 108 101 109 101 110 116 95 56 56 51 53 50 97 99 101 57 57 48 97 52 102 100 99 53 52 49 51 102 52 50 49 99 99 56 100 98 102 52 98 100 101 57 55 97 100 53 101 54 56 98 99 100 52 99 50 54 49 97 99 51 54 50 102 48 100 99 57 54 57 101 48 39 93 41 34 125] msg=Failed to GE
  T JSON (hostname "hs1" path "/_matrix/federation/v1/make_join/!VwKnLpIePTcDPBFKjC:hs1/@charlie:host.docker.internal:35753") code=401 wrapped=M_UNAUTHORIZED: Failed to find any key to satisfy: _FetchKeyRequest(server_name='host.docker.internal:35753', minimum_valid_until_ts=1765233664816, key_ids=['ed25519:complement_88352ace990a4fdc5413f421cc8dbf4bde97ad5e68bcd4c261ac362f0dc969e0'])
  2025/12/08 22:41:05 ============================================

Synapse logs:

  federation_reader1 | 2025-12-09 00:03:06,442 - synapse.http.federation.matrix_federation_agent - 402 - INFO - ServerKeyFetcher-0 - Failed to connect to host.docker.internal:36945: Connection was refused by other side: 111: Connection refused.
  federation_reader1 | 2025-12-09 00:03:06,443 - synapse.http.matrixfederationclient - 837 - INFO - ServerKeyFetcher-0 - {GET-O-1} [host.docker.internal:36945] Request failed: GET matrix-federation://host.docker.internal:36945/_matrix/key/v2/server: ConnectionRefusedError('Connection refused')
  federation_reader1 | 2025-12-09 00:03:06,443 - synapse.crypto.keyring - 922 - WARNING - ServerKeyFetcher-0 - Error looking up keys from host.docker.internal:36945: Failed to send request: ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
  federation_reader1 | 2025-12-09 00:03:06,443 - synapse.federation.transport.server._base - 323 - WARNING - GET-0 - authenticate_request failed: 401: Failed to find any key to satisfy: _FetchKeyRequest(server_name='host.docker.internal:36945', minimum_valid_until_ts=1765238586136, key_ids=['ed25519:complement_b438de74b80648222539ee40eac6aa7d62523d0b06496247d0b7ba70315146a9'])
  federation_reader1 | 2025-12-09 00:03:06,443 - synapse.http.server - 131 - INFO - GET-0 - <SynapseRequest at 0x7fd2fa972cf0 method='GET' uri='/_matrix/federation/v1/make_join/%21hlIsXzIhBzeUAYfNkh:hs1/@charlie2:host.docker.internal:36945?ver=1&ver=2&ver=9&ver=11&ver=org.matrix.msc4014&ver=org.matrix.msc3667&ver=3&ver=5&ver=6&ver=12&ver=org.matrix.msc3787&ver=4&ver=7&ver=8&ver=10&ver=org.matrix.hydra.11' clientproto='HTTP/1.0' site='18016'> SynapseError: 401 - Failed to find any key to satisfy: _FetchKeyRequest(server_name='host.docker.internal:36945', minimum_valid_until_ts=1765238586136, key_ids=['ed25519:complement_b438de74b80648222539ee40eac6aa7d62523d0b06496247d0b7ba70315146a9'])
  federation_reader1 | 2025-12-09 00:03:06,444 - synapse.access.http.18016 - 521 - INFO - GET-0 - ::ffff:127.0.0.1 - 18016 - {None} Processed request: 0.307sec/0.001sec (0.001sec, 0.000sec) (0.000sec/0.000sec/0) 267B 401 "GET /_matrix/federation/v1/make_join/%21hlIsXzIhBzeUAYfNkh:hs1/@charlie2:host.docker.internal:36945?ver=1&ver=2&ver=9&ver=11&ver=org.matrix.msc4014&ver=org.matrix.msc3667&ver=3&ver=5&ver=6&ver=12&ver=org.matrix.msc3787&ver=4&ver=7&ver=8&ver=10&ver=org.matrix.hydra.11 HTTP/1.0" "Go-http-client/1.1" [0 dbevts]
  nginx | 172.19.0.1 - - [09/Dec/2025:00:03:06 +0000] "GET /_matrix/federation/v1/make_join/%21hlIsXzIhBzeUAYfNkh:hs1/@charlie2:host.docker.internal:36945?ver=1&ver=2&ver=9&ver=11&ver=org.matrix.msc4014&ver=org.matrix.msc3667&ver=3&ver=5&ver=6&ver=12&ver=org.matrix.msc3787&ver=4&ver=7&ver=8&ver=10&ver=org.matrix.hydra.11 HTTP/1.1" 401 279 "-" "Go-http-client/1.1"

Just wanting to sanity check that the fake homeserver from Complement is listening and responding (at-least from the host perspective) to eliminate that variable.

Dev notes

OFFLINE_MODE=1 COMPLEMENT_REF=madlittlemods/test-fake-homeserver-connectability COMPLEMENT_TEST_PACKAGES="./tests/main_test.go ./tests/federation_room_join_test.go" ./scripts-dev/complement.sh -run TestBannedUserCannotSendJoin

Pull Request Checklist

> Perhaps the fake homeserver that Complement is mocking isn't running
> properly. As a sanity check, we could send a request on the host-side to
> the fake server that's also on the host-side that we expect to be
> responding.
Comment on lines +302 to +304
func VersionRequestHandler(s *federation.Server, w http.ResponseWriter, req *http.Request) {
// Send it
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants