element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
11 stars 3 forks source link

Opening the public directory failed #2888

Open matrixbot opened 2 weeks ago

matrixbot commented 2 weeks ago

This issue was originally created by @IngwiePhoenix at https://github.com/matrix-org/dendrite/issues/2888.

Background information

Description

Logs:

time="2022-11-23T04:54:47.841930400Z" level=error msg="failed to get public rooms" func=github.com/matrix-org/dendrite/clientapi/routing.GetPostPublicRooms file="/opt/matrix-dendrite/clientapi/routing/directory_public.go:83" error="contents=[123 34 101 114 114 99 111 100 101 34 58 34 77 95 85 78 65 85 84 72 79 82 73 90 69 68 34 44 34 101 114 114 111 114 34 58 34 70 97 105 108 101 100 32 116 111 32 102 105 110 100 32 97 110 121 32 107 101 121 32 116 111 32 115 97 116 105 115 102 121 58 32 95 70 101 116 99 104 75 101 121 82 101 113 117 101 115 116 40 115 101 114 118 101 114 95 110 97 109 101 61 39 105 110 103 119 105 101 46 109 101 39 44 32 109 105 110 105 109 117 109 95 118 97 108 105 100 95 117 110 116 105 108 95 116 115 61 49 54 54 57 49 55 57 50 56 55 56 50 48 44 32 107 101 121 95 105 100 115 61 91 39 101 100 50 53 53 49 57 58 117 107 56 54 116 70 39 93 41 34 125] msg=Failed to POST JSON (hostname \"matrix.org\" path \"/_matrix/federation/v1/publicRooms\") code=401 wrapped=M_UNAUTHORIZED: Failed to find any key to satisfy: _FetchKeyRequest(server_name='ingwie.me', minimum_valid_until_ts=1669179287820, key_ids=['ed25519:uk86tF'])" req.id=PIzAPDFHztFA req.method=POST req.path=/_matrix/client/r0/publicRooms

Steps to reproduce

I used Synapse before and after switching my servers, decided that I wanted to try Dendrite instead, so I used the documentation to generate my key/cert files with the provided tool - and, they are exactly where they should be, too. The server runs as an unprevileged server and operates behind Caddy.

Thank you and have a nice day! ^.^

matrixbot commented 2 weeks ago

This comment was originally posted by @acheong08 at https://github.com/matrix-org/dendrite/issues/2888#issuecomment-1584828853.

Getting the same issue:

ERRO[2023-06-09T16:07:55.034315970Z] failed to get public rooms                    error="Post \"matrix://gitter.im/_matrix/federation/v1/publicRooms\": context canceled" req.id=97701IMawRpx req.method=POST req.path=/_matrix/client/r0/publicRooms

ERRO[2023-06-09T16:09:03.033859340Z] failed to get public rooms                    error="contents=[123 34 101 114 114 99 111 100 101 34 58 34 77 95 85 78 65 85 84 72 79 82 73 90 69 68 34 44 34 101 114 114 111 114 34 58 34 70 97 105 108 101 100 32 116 111 32 102 105 110 100 32 97 110 121 32 107 101 121 32 116 111 32 115 97 116 105 115 102 121 58 32 95 70 101 116 99 104 75 101 121 82 101 113 117 101 115 116 40 115 101 114 118 101 114 95 110 97 109 101 61 39 109 97 116 114 105 120 46 100 117 116 105 46 109 101 39 44 32 109 105 110 105 109 117 109 95 118 97 108 105 100 95 117 110 116 105 108 95 116 115 61 49 54 56 54 51 50 54 57 51 50 57 52 50 44 32 107 101 121 95 105 100 115 61 91 39 101 100 50 53 53 49 57 58 81 87 80 69 79 81 39 93 41 34 125] msg=Failed to POST JSON (hostname \"matrix.org\" path \"/_matrix/federation/v1/publicRooms\") code=401 wrapped=M_UNAUTHORIZED: Failed to find any key to satisfy: _FetchKeyRequest(server_name='matrix.duti.me', minimum_valid_until_ts=1686326932942, key_ids=['ed25519:QWPEOQ'])" req.id=nX4wBIDkpKXp req.method=POST req.path=/_matrix/client/r0/publicRooms

Additional notes: On Cloudflare and using nginx:

server {
    listen 80;
    listen [::]:80;

    index index.html index.htm index.nginx-debian.html;

    server_name matrix.duti.me;

    location /_matrix {
        proxy_pass http://localhost:8008;
    }
    location /.well-known/matrix/server {
            return 200 '{ "m.server": "matrix.duti.me:443" }';
        }

    location /.well-known/matrix/client {
            # If your sever_name here doesn't match your matrix homeserver URL
            # (e.g. hostname.com as server_name and matrix.hostname.com as homeserver URL)
            # add_header Access-Control-Allow-Origin '*';
            return 200 '{ "m.homeserver": { "base_url": "https://matrix.duti.me" } }';
        }   

}
matrixbot commented 2 weeks ago

This comment was originally posted by @nakal at https://github.com/matrix-org/dendrite/issues/2888#issuecomment-1943197372.

I have the same problem. Similar configuration. It does not depend on the client used.

I left a public room on matrix.org. I wanted to rejoin and it fails while searching in the room list. In the logs the minimum_valid_until_ts increments all the time. I converted the old Synapse key manually, as the manual said a long time ago. Now I noticed, something is wrong with the key(?).