Federation request fails behind proxy without retry and subsequent requests blocked #1756

Open
opened 2026-05-11 08:38:16 +00:00 by Judyczx · 5 comments

When a federation request fails due to a timeout while connecting via a proxy (192.168.1.1:8080), the system does not retry the request and fails to send any subsequent federation requests to the same destination.

Log excerpt:

2026-05-10T11:12:16.226962Z DEBUG fed{dest="example.com"}: conduwuit_service::federation::execute: Sending request method=PUT url=https://matrix.example.com/_matrix/federation/v1/send/foaYk_z0PVm7nJGsCAEKFGGC7UMrX31oc6R0_lg5udw
2026-05-10T11:12:16.227217Z DEBUG fed{dest="example.com"}: hyper_util::client::legacy::connect::http: connecting to 192.168.1.1:8080
2026-05-10T11:12:26.228711Z DEBUG fed{dest="example.com"}: conduwuit_service::federation::execute: reqwest::Error { kind: Request, source: hyper_util::client::legacy::Error(Connect, ConnectFailed(ConnectError("tcp connect error", 192.168.1.1:8080, Custom { kind: TimedOut, error: Elapsed(()) }))) }
2026-05-10T11:12:26.228780Z DEBUG response: conduwuit_service::sending::sender: tunnel error: failed to create underlying connection: tcp connect error dest=Federation("example.com")
When a federation request fails due to a timeout while connecting via a proxy (`192.168.1.1:8080`), the system does not retry the request and fails to send any subsequent federation requests to the same destination. **Log excerpt:** ``` 2026-05-10T11:12:16.226962Z DEBUG fed{dest="example.com"}: conduwuit_service::federation::execute: Sending request method=PUT url=https://matrix.example.com/_matrix/federation/v1/send/foaYk_z0PVm7nJGsCAEKFGGC7UMrX31oc6R0_lg5udw 2026-05-10T11:12:16.227217Z DEBUG fed{dest="example.com"}: hyper_util::client::legacy::connect::http: connecting to 192.168.1.1:8080 2026-05-10T11:12:26.228711Z DEBUG fed{dest="example.com"}: conduwuit_service::federation::execute: reqwest::Error { kind: Request, source: hyper_util::client::legacy::Error(Connect, ConnectFailed(ConnectError("tcp connect error", 192.168.1.1:8080, Custom { kind: TimedOut, error: Elapsed(()) }))) } 2026-05-10T11:12:26.228780Z DEBUG response: conduwuit_service::sending::sender: tunnel error: failed to create underlying connection: tcp connect error dest=Federation("example.com") ```
Member

Sounds like a dupe of #1755.

Sounds like a dupe of #1755.
Author

@Henry-Hiles wrote in #1756 (comment):

Sounds like a dupe of #1755.

In my case, ./well-known resolves correctly to matrix.example.com:443, so it's different from #1755

@Henry-Hiles wrote in https://forgejo.ellis.link/continuwuation/continuwuity/issues/1756#issuecomment-29107: > Sounds like a dupe of #1755. In my case, `./well-known` resolves correctly to `matrix.example.com:443`, so it's different from https://forgejo.ellis.link/continuwuation/continuwuity/issues/1755
Member

Ah, okay.

Ah, okay.
Contributor

@Judyczx Does !admin debug ping example.com work? And !admin query resolver overrides-cache example.com + !admin query resolver destinations-cache example.com show correct addresses/destinations?

Does !admin server clear-caches allow c10y to kickstart federation with example.com again?

It could be Continuwuity implementing federation backoff, which wouldn't bode well if the initial connections to the example server are temporarily offline due to your proxy timeout.

@Judyczx Does `!admin debug ping example.com` work? And `!admin query resolver overrides-cache example.com` + `!admin query resolver destinations-cache example.com` show correct addresses/destinations? Does `!admin server clear-caches` allow c10y to kickstart federation with `example.com` again? It could be Continuwuity implementing federation backoff, which wouldn't bode well if the initial connections to the example server are temporarily offline due to your proxy timeout.
Author

@stratself wrote in #1756 (comment):

@Judyczx Does !admin debug ping example.com work, and !admin query resolver overrides-cache example.com show correct addresses?

Does !admin server clear-caches allow c10y to kickstart federation with example.com again?

It could be Continuwuity implementing federation backoff, which wouldn't bode well if the initial connections to the example server are temporarily offline due to your proxy timeout.

Yes, !admin debug ping example.com does work, and !admin query resolver destinations-cache example.com shows the correct destination. !admin query resolver overrides-cache example.com shows no result, which is also the same as under normal conditions.

!admin server clear-caches does resolve the issue and allows federation to to work again after the timeout.

@stratself wrote in https://forgejo.ellis.link/continuwuation/continuwuity/issues/1756#issuecomment-29114: > @Judyczx Does `!admin debug ping example.com` work, and `!admin query resolver overrides-cache example.com` show correct addresses? > > Does `!admin server clear-caches` allow c10y to kickstart federation with `example.com` again? > > It could be Continuwuity implementing federation backoff, which wouldn't bode well if the initial connections to the example server are temporarily offline due to your proxy timeout. Yes, `!admin debug ping example.com` does work, and `!admin query resolver destinations-cache example.com` shows the correct destination. `!admin query resolver overrides-cache example.com` shows no result, which is also the same as under normal conditions. `!admin server clear-caches` does resolve the issue and allows federation to to work again after the timeout.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity#1756
No description provided.