matrix-org / matrix-federation-tester

Tester for matrix federation written in golang.
77 stars 17 forks source link

DNS SRV record present but version is still fetched from main domain #115

Closed soupdiver closed 3 years ago

soupdiver commented 3 years ago

I have setup a SRV DNS record but when testing my domain federationtester reports 404. I checked the JSON log and can see that the record was detected properly but federationtester still tries to fetch the version from the main domain? Is this expected or am I holding it wrong?

I thought the whole point of delegation is to delegate everything to the subdomain. I also checked https://github.com/matrix-org/synapse/blob/master/docs/delegate.md#delegation-faq but couldn't find something specific to my issue.

log:

{
  "WellKnownResult": {
    "m.server": "",
    "result": "No .well-known found",
    "CacheExpiresAt": 0
  },
  "DNSResult": {
    "SRVCName": "_matrix._tcp.mydomain.com.",
    "SRVRecords": [
      {
        "Target": "matrix.mydomain.com.",
        "Port": 8448,
        "Priority": 0,
        "Weight": 0
      }
    ],
    "SRVError": null,
    "Hosts": {
      "matrix.mydomain.com.": {
        "CName": "matrix.mydomain.com.",
        "Addrs": [
          "1.2.3.4"
        ],
        "Error": null
      }
    },
    "Addrs": [
      "1.2.3.4:8448"
    ]
  },
  "ConnectionReports": {},
  "ConnectionErrors": {
    "1.2.3.4:8448": {
      "Message": "Non-200 response 404 from remote server"
    }
  },
  "Version": {
    "error": "Get \"matrix://mydomain.com/_matrix/federation/v1/version\": x509: certificate is valid for 346244aea5a371f68e89a491b7f76f7c.1c9e7d2811a6bdda48e2852e4e4bb604.traefik.default, not mydomain.com"
  },
  "FederationOK": false
}
richvdh commented 3 years ago

sounds like a dup of #99 ?

soupdiver commented 3 years ago

Fixed it by using .well-know Seem I did not understand how that SRV record is supposed to work