kamax-matrix / mxisd

Federated Matrix Identity Server
GNU Affero General Public License v3.0
224 stars 115 forks source link

Cant validate #153

Closed procopsamuraev closed 5 years ago

procopsamuraev commented 5 years ago

fresh local installation on centos 7 mxisd and synapse, On validation step im having error: synapse log:

2019-04-08 16:42:13,399 - synapse.storage.TIME - 301 - INFO -  - Total database time: 0.000% {set_destination_retry_timings(1): 0.000%, store_state_group(1): 0.000%, get_max_depth_of(1): 0.000%} {}
2019-04-08 16:42:14,676 - synapse.http.matrixfederationclient - 380 - INFO - GET-91 - Failed to send request: [<twisted.python.failure.Failure twisted.internet.defer.CancelledError: >]
2019-04-08 16:42:14,677 - synapse.http.matrixfederationclient - 437 - WARNING - GET-91 - {GET-O-6} [kamax.io] Request failed: GET matrix://kamax.io/_matrix/federation/v1/query/profile?user_id=%40mxisd-lookup-test%3Akamax.io&field=displayname: ResponseNeverReceived:[CancelledError()]
2019-04-08 16:42:14,677 - synapse.util.retryutils - 193 - INFO - GET-91 - Connection to kamax.io was unsuccessful (<class 'synapse.api.errors.RequestSendFailed'>(Failed to send request: ResponseNeverReceived: [<twisted.python.failure.Failure twisted.internet.defer.CancelledError: >])); backoff now 3000000
2019-04-08 16:42:14,678 - synapse.http.server - 112 - ERROR - GET-91 - Failed handle request via 'ProfileRestServlet': <XForwardedForRequest at 0x7f8546ada940 method='GET' uri='/_matrix/client/r0/profile/@mxisd-lookup-test:kamax.io' clientproto='HTTP/1.0' site=8008>
Traceback (most recent call last):
  File "/opt/matrix/synapse/lib/python3.6/site-packages/synapse/http/matrixfederationclient.py", line 376, in _send_request
    response = yield request_deferred
twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure twisted.internet.defer.CancelledError: >]

mxisd log:

[XNIO-1 task-9] INFO io.kamax.mxisd.http.undertow.handler.identity.v1.SingleLookupHandler - Got single lookup request from 172.16.1.163 with client Synapse/0.99.3 - Is recursive? false
[XNIO-1 task-9] INFO io.kamax.mxisd.lookup.strategy.RecursivePriorityLookupStrategy - Host 172.16.1.163 allowed for recursion: true
[XNIO-1 task-9] INFO io.kamax.mxisd.lookup.provider.DnsLookupProvider - Performing DNS lookup for mxisd-federation-test@kamax.io
[XNIO-1 task-9] INFO io.kamax.mxisd.lookup.provider.DnsLookupProvider - Domain name for mxisd-federation-test@kamax.io: kamax.io
[XNIO-1 task-9] INFO io.kamax.mxisd.matrix.IdentityServerUtils - kamax.io is not an URL, using as-is
[XNIO-1 task-9] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Discovering Identity Server for kamax.io
[XNIO-1 task-9] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Performing SRV lookup
[XNIO-1 task-9] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Lookup name: _matrix-identity._tcp.kamax.io
[XNIO-1 task-9] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Record: _matrix-identity._tcp.kamax.io.        1577    IN      SRV     0 5 443 matrix.kamax.io.
[XNIO-1 task-9] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Found Identity Server for domain kamax.io at https://matrix.kamax.io:443
[XNIO-1 task-9] INFO io.kamax.mxisd.lookup.provider.RemoteIdentityServerFetcher - Looking up email 3PID mxisd-federation-test@kamax.io using https://matrix.kamax.io:443
[XNIO-1 task-9] INFO io.kamax.mxisd.lookup.strategy.RecursivePriorityLookupStrategy - Found 3PID mapping: {medium: 'email', address: 'mxisd-federation-test@kamax.io', mxid: '@mxisd-lookup-test:kamax.io'}
[XNIO-1 task-10] INFO io.kamax.mxisd.http.undertow.handler.identity.v1.KeyGetHandler - Key ed25519:0 was requested
maxidorius commented 5 years ago

The mxisd log is fine, this is what you would expect. The synapse log doesn't show the relevant section.

Could you provide the following info:

procopsamuraev commented 5 years ago

mxisd 3.3.8.Final (from git) Server homeserver.py version 0.99.3 nginx/1.12.2 Riot/1.0.5 Chrome/66.0.3359.181 Electron/3.1.6

riot-desktop -T Starting auto update with base URL: null Auto update not supported on this platform

nginx:

 root /opt/matrix/riot;
    index index.html index.htm;
    location /_matrix/identity {
        proxy_pass http://localhost:8090/_matrix/identity;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
    }

    location /_matrix {
        proxy_pass http://localhost:8008/_matrix;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
    }
maxidorius commented 5 years ago

The error in your Matrix client

This is the most important info, as logs don't show any error in synapse and mxisd. Verbatim error please, ideally a screenshot.

procopsamuraev commented 5 years ago

Only white popup window on riot:

Failed to invite the following users to the 1 room: mxisd-federation-test@kamax.io: Unknown server error

Nothing else. I didnt do anything related to federation. is it problem?

maxidorius commented 5 years ago

I didnt do anything related to federation. is it problem?

Yes, federation must be enabled for the last step to work, as indicated in the documentation.

procopsamuraev commented 5 years ago

by last step you mean:

trusted_third_party_id_servers:
    - matrix.example.org

this one i done,

maxidorius commented 5 years ago

In the Validate section:

In case your homeserver has no working federation, step 5 will not happen. If step 4 took place, consider your installation validated.

Step 4 being:

The 3PID invite should be turned into a Matrix invite to @mxisd-lookup-test:kamax.io.

maxidorius commented 5 years ago

@procopsamuraev Any update, or was it solved already since you posted another issue since then?

procopsamuraev commented 5 years ago

yes, i still have issue. i believe i set up federation but still doesnt work: trying to add

2019-04-15 12:41:14,229 - synapse.storage.txn - 317 - DEBUG - POST-19 - [TXN START] {get_destination_retry_timings-39}
2019-04-15 12:41:14,229 - synapse.storage.txn - 373 - DEBUG - POST-19 - [TXN END] {get_destination_retry_timings-39} 0.000335 sec
2019-04-15 12:41:14,231 - synapse.http.matrixfederationclient - 356 - INFO - POST-19 - {PUT-O-3} [kamax.io] Sending request: PUT matrix://kamax.io/_matrix/federation/v2/invite/%21SJUXeslDYbeWZuQhmA%3Aim.sg.example.one/%2415553032740FePwz%3Aim.sg.example.one; timeout 60.000000s
2019-04-15 12:41:14,499 - synapse.access.http.8008 - 233 - INFO - GET-22 - 94.237.61.92 - 8008 - Received request: GET /_matrix_matrix/key/v2/server/ed25519:a_fcEP
2019-04-15 12:41:14,500 - synapse.access.http.8008 - 302 - INFO - GET-22 - 94.237.61.92 - 8008 - {None} Processed request: 0.001sec/-0.000sec (0.001sec, 0.000sec) (0.000sec/0.000sec/0) 153B 404 "GET /_matrix_matrix/key/v2/server/ed25519:a_fcEP HTTP/1.0" "Synapse/0.99.3 (b=matrix-org-hotfixes,8467756dc)" [0 dbevts]
2019-04-15 12:41:14,790 - synapse.access.http.8008 - 233 - INFO - GET-23 - 62.210.11.124 - 8008 - Received request: GET /_matrix_matrix/key/v2/server/ed25519:a_fcEP
2019-04-15 12:41:14,790 - synapse.access.http.8008 - 302 - INFO - GET-23 - 62.210.11.124 - 8008 - {None} Processed request: 0.001sec/-0.000sec (0.001sec, 0.000sec) (0.000sec/0.000sec/0) 153B 404 "GET /_matrix_matrix/key/v2/server/ed25519:a_fcEP HTTP/1.0" "Synapse/0.99.3" [0 dbevts]
2019-04-15 12:41:15,053 - synapse.http.matrixfederationclient - 388 - INFO - POST-19 - {PUT-O-3} [kamax.io] Got response headers: 502 Bad Gateway
2019-04-15 12:41:15,054 - synapse.http.matrixfederationclient - 472 - WARNING - POST-19 - {PUT-O-3} [kamax.io] Request failed: PUT matrix://kamax.io/_matrix/federation/v2/invite/%21SJUXeslDYbeWZuQhmA%3Aim.sg.example.one/%2415553032740FePwz%3Aim.sg.example.one: HttpResponseException("502: b'Bad Gateway'",)
2019-04-15 12:41:15,055 - synapse.util.retryutils - 193 - INFO - POST-19 - Connection to kamax.io was unsuccessful (<class 'synapse.api.errors.HttpResponseException'>(502: b'Bad Gateway')); backoff now 75000000
2019-04-15 12:41:15,057 - synapse.util.async_helpers - 218 - DEBUG - POST-19 - Releasing linearizer lock 'member' for key ('!SJUXeslDYbeWZuQhmA:im.sg.example.one',)
2019-04-15 12:41:15,057 - synapse.storage.txn - 317 - DEBUG - POST-19 - [TXN START] {set_destination_retry_timings-3a}
2019-04-15 12:41:15,059 - synapse.http.server - 112 - ERROR - POST-19 - Failed handle request via 'RoomMembershipRestServlet': <XForwardedForRequest at 0x7f43ce231a58 method='POST' uri='/_matrix/client/r0/rooms/!SJUXeslDYbeWZuQhmA:im.sg.example.one/invite' clientproto='HTTP/1.0' site=8008>

mxisd.log

Apr 15 12:41:11 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Discovering Identity Server for kamax.io
Apr 15 12:41:11 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Performing SRV lookup
Apr 15 12:41:11 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Lookup name: _matrix-identity._tcp.kamax.io
Apr 15 12:41:11 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Record: _matrix-identity._tcp.kamax.io.        2518        IN        SRV        0 5 443 matrix.kamax.io.
Apr 15 12:41:12 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.matrix.IdentityServerUtils - Found Identity Server for domain kamax.io at https://matrix.kamax.io:443
Apr 15 12:41:12 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.lookup.provider.RemoteIdentityServerFetcher - Looking up email 3PID mxisd-federation-test@kamax.io using https://matrix.kamax.io:443
Apr 15 12:41:12 sgqvlt-im mxisd[1551]: [XNIO-1 task-2] INFO io.kamax.mxisd.lookup.strategy.RecursivePriorityLookupStrategy - Found 3PID mapping: {medium: 'email', address: 'mxisd-federation-test@kamax.io', mxid: '@mxisd-lookup-test:kamax.io'}
Apr 15 12:41:12 sgqvlt-im mxisd[1551]: [XNIO-1 task-3] INFO io.kamax.mxisd.http.undertow.handler.identity.v1.KeyGetHandler - Key ed25519:0 was requested
maxidorius commented 5 years ago

Seems like your federation is not working. 3PID resolution is working, so for mxisd this is validated.