matrix-org / matrix-federation-tester

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

[HELP REQUIRED] Non-200 response 404 from remote server #130

Closed fax1ty closed 1 year ago

fax1ty commented 1 year ago
  "Version": {
    "error": "contents=[52 48 52 32 112 97 103 101 32 110 111 116 32 102 111 117 110 100 10] msg=Failed to GET JSON (hostname \"mercdev.com\" path \"/_matrix/federation/v1/version\"): 404 page not found\n code=404 wrapped="
  },

Backend: dendrite

Everything is fine for any other request image

reivilibre commented 1 year ago
rei@lithium ~$ curl https://mercdev.com/_matrix/federation/v1/version
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no"><meta name="format-detection" content="telephone=no"><meta name="format-detection" content="address=no"><meta name="google-site-verification" content="DalgaQHp82fRBlA5pbJAFNS0ruLr5c-ymdl66t9PaFI"><meta name="facebook-domain-verification" content="fz3j7gshe2sustjqw6slc2xtfpgrot"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-57x57-f5c8c298a55dabdb1bf9c08044528ecf.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-60x60-cf915f39f63fb33bbed944689f10dd7b.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-72x72-472ab638070526f7e3df1698ade00f1f.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-76x76-0ff788bee5604480fa7e30bda6be5fe9.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-114x114-827f84c95734587e0c1e40175d94d761.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-120x120-64568247e3aa97c0219a15a31a3bbb1e.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-144x144-d16a6a4c13a51abcafdc3f5c38c8b4e9.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-152x152-d2afa0f261f634a786c6800edaf580bb.png"><link rel="apple-touch-icon" href="/assets/files/apple-touch-icon-180x180-8a5ebaf280e370d254edd2b4e7d145ca.png"><link rel="icon" type="image/png" href="/assets/files/favicon-32x32-dc0c9f2f0766c2bd3945a437cc2b7339.png"><link rel="icon" type="image/png" href="/assets/files/favicon-194x194-caa150b3f256e44b28e3c1636fc8a1a8.png"><link rel="icon" type="image/png" href="/assets/files/favicon-96x96-549f5d64a9be537165d1a56dc89b592e.png"><link rel="icon" type="image/png" href="/assets/files/android-chrome-192x192-da8e3929d03476e5eb4f4a7ba9ab757b.png"><link rel="icon" type="image/png" href="/assets/files/favicon-16x16-4a231d2e288e2cab72002bcc3f3a276c.png"><link rel="manifest" href="/assets/files/manifest-353799e35382d9c722b018baf567ebbe.json"><link rel="mask-icon" href="/assets/files/safari-pinned-tab-9e87852648dd3d3f638c5466a2f64acb.svg" color="#545b61"><link rel="shortcut icon" href="/assets/files/favicon-a28586cd339635a7d8340bfdfcd41144.ico"><meta name="apple-mobile-web-app-title" content="Mercdev.com"><meta name="application-name" content="Mercdev.com"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/assets/files/mstile-144x144-25a49d30d250c47b34504d9048b992b1.png"><meta name="theme-color" content="#ffffff"><link rel="stylesheet" type="text/css" href="https://cloud.typography.com/6502596/6622992/css/fonts.css"><title>iOS, Android &amp; Windows Phone Mobile Solutions | App Development Since 1999</title><link rel="stylesheet" href="/assets/css/404-bdc6e3a38aca172125c8.css"><script type="text/javascript" src="//www.googleadservices.com/pagead/conversion_async.js" charset="utf-8" async></script><script src="//cdn.optimizely.com/js/1001744691.js" async></script><script>window['optimizely'] = window['optimizely'] || [];
</script><script>var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-35875791-1']);
        _gaq.push(['_trackPageview']);
</script><script>(function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-35875791-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
/* Accurate bounce rate by time */
if (!document.referrer || document.referrer.split('/')[2].indexOf(location.hostname) != 0)
setTimeout(function(){
// var ga = document.createElement('script');
ga('send', 'event', 'bounce_rate', 'bounce_rate_action', location.pathname);
}, 15000);
</script><!-- Facebook Pixel Code--><script>!function (f, b, e, v, n, t, s) {
        if (f.fbq) return;
        n = f.fbq = function () {
                n.callMethod ?
                        n.callMethod.apply(n, arguments) : n.queue.push(arguments)

I think you have a problem :-)

reivilibre commented 1 year ago

(might be useful to give some clues as to what your setup is so some advice could be given.)

fax1ty commented 1 year ago

@reivilibre We have an SRV record _matrix._tcp.mercdev.com. 86400 IN SRV 0 5 5060 matrix.mercdev.com. The check did not work with the well-known file at all

reivilibre commented 1 year ago

As a note, I'd really advise against using both SRV and well-known at the same time. They are very much not equivalent, so having them both is confusing and a liability. I'll have a look.

reivilibre commented 1 year ago

.well-known seems OK — but I'd remove the SRV record since that is probably not doing what you expect

rei@lithium ~$ curl https://matrix.mercdev.com/_matrix/federation/v1/version
404 page not found

Are you using a reverse proxy? Are you passing this path through?

fax1ty commented 1 year ago

@reivilibre Requests go through nginx. But all the other endpoints are working as expected. https://meta.mercdev.com/ Auth details: test3;testpass123

reivilibre commented 1 year ago

What does your nginx config look like?

fax1ty commented 1 year ago

@reivilibre image

reivilibre commented 1 year ago

Looks OK; what happens if you curl http://localhost:8008/_matrix/federation/v1/version? At this point it's probably a configuration problem with your Dendrite installation; I'd suggest asking in the Dendrite room. I'm a Synapse developer and don't know how to configure Dendrite :)

fax1ty commented 1 year ago

@reivilibre image Same exact error

fax1ty commented 1 year ago

Resolution: https://github.com/matrix-org/dendrite/issues/2868#issuecomment-1305808005