matrix-org / matrix-federation-tester

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

Unhelpful output when .well-known lacks an m.server field #44

Closed thegcat closed 5 years ago

thegcat commented 5 years ago

We have a Matrix server running on matrix.fachschaften.org:8449 (for the server port) with SRV and .well-known entries on fachschaften.org (the domain used for Matrix). This doesn't seem to be properly recognised, checking fachschaften.org or matrix.fachschaften.org yields:

{
  "WellKnownResult": {
    "m.server": ""
  },
  "DNSResult": {
    "SRVCName": "",
    "SRVRecords": null,
    "SRVError": {
      "Message": "lookup _matrix._tcp. on 1.1.1.1:53: no such host"
    },
    "Hosts": {
      "": {
        "CName": "",
        "Addrs": null,
        "Error": {
          "Message": "lookup : no such host"
        }
      }
    },
    "Addrs": null
  },
  "ConnectionReports": {},
  "ConnectionErrors": {}
}

Using nslookup agains 1.1.1.1 though seems to resolve our SRV entry just fine:

Non-authoritative answer:
_matrix._tcp.fachschaften.org   service = 10 0 8449 matrix.fachschaften.org.

Checking against the s2s Port of our installation yields a cert error:

"MatchingServerName": false,

I'm guessing this is because the query is done with a port and the cert has no port? Can this be ignored?

Thanks.

(Oh, and so far our Homeserver has worked well with another one we are administering, as well as other servers, matrix.org being one of which).

richvdh commented 5 years ago

the problem here is that your .well-known is invalid:

{
  "m.homeserver": "matrix.fachschaften.org:8449"
}

it should be m.server, not m.homeserver.

thegcat commented 5 years ago

D'oh, things I did not recheck, sorry :-( Now I can also imagine why lookup _matrix._tcp. didn't have a host or domain name.

I can confirm that this fixes the issue for me, thanks!

anoadragon453 commented 5 years ago

Hm, would've thought the JSON deserializer would've complained that it couldn't find an m.server field...