Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

SRV request logging #9305

Merged
merged 8 commits into from
Feb 3, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
debug log SRV lookups
SRV lookup failures are hard to debug currently as any failures just get
accounted to the federation request failing.
While this doesn't solve this fundamental problem adding these logs
actually helped me figure out a DNS resolution problem.

Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
  • Loading branch information
Bubu committed Feb 2, 2021
commit f5d0b6ce868d64b6febaa51a4976805b4311bca7
3 changes: 3 additions & 0 deletions synapse/http/federation/matrix_federation_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,15 @@ async def _resolve_server(self) -> List[Server]:
if port or _is_ip_literal(host):
return [Server(host, port or 8448)]

logger.debug("Looking up SRV record for %s", host)
server_list = await self._srv_resolver.resolve_service(b"_matrix._tcp." + host)

if server_list:
logger.debug("Got %s from SRV lookup for %s", ', '.join(map(str, server_list)), host)
return server_list

# No SRV records, so we fallback to host and 8448
logger.debug("No SRV records for %s", host)
return [Server(host, 8448)]


Expand Down