kamax-matrix / mxisd

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

Got response headers: 502 Bad Gateway #155

Closed gerroon closed 5 years ago

gerroon commented 5 years ago

Hi

I am trying to use mxisd with my server. I actually am using it successfully on another server but I do not know why this one is borking like this.

According to the Matrix federation tester I am all good. My clients work etc but this particular test failes in this instance.

I am using the docker install on Debian Buster x64, Synapse/0.99.3

Apache proxy line ProxyPass /_matrix/identity http://127.0.0.1:8091/_matrix/identity

Docker instance is run with -p 8091:8090


2019-04-10 22:04:00,314 - synapse.http.client - 295 - INFO - POST-85 - Received response to GET https://MYDOMAIN/_matrix/identity/api/v1/pubkey/ed25519:0: 200                             
2019-04-10 22:04:00,319 - synapse.metrics - 372 - INFO -  - Collecting gc 0                                                                                                                  
2019-04-10 22:04:00,321 - synapse.http.matrixfederationclient - 356 - INFO - POST-85 - {GET-O-1} [kamax.io] Sending request: GET matrix://kamax.io/_matrix/federation/v1/query/profile?user_id
=%40mxisd-lookup-test%3Akamax.io&field=displayname; timeout 10.000000s                                                                                                                       
2019-04-10 22:04:00,321 - synapse.http.federation.matrix_federation_agent - 323 - INFO - POST-85 - Fetching https://kamax.io/.well-known/matrix/server                                       
2019-04-10 22:04:00,769 - synapse.http.federation.matrix_federation_agent - 333 - INFO - POST-85 - Response from .well-known: {'m.server': 'matrix.kamax.io:8448'}                           
2019-04-10 22:04:00,771 - synapse.http.federation.matrix_federation_agent - 373 - INFO - POST-85 - Connecting to matrix.kamax.io:8448                                                        
2019-04-10 22:04:02,612 - synapse.http.matrixfederationclient - 388 - INFO - POST-85 - {GET-O-1} [kamax.io] Got response headers: 502 Bad Gateway                                            
2019-04-10 22:04:02,612 - synapse.http.matrixfederationclient - 472 - WARNING - POST-85 - {GET-O-1} [kamax.io] Request failed: GET matrix://kamax.io/_matrix/federation/v1/query/profile?user_
id=%40mxisd-lookup-test%3Akamax.io&field=displayname: HttpResponseException("502: b'Bad Gateway'")                                                                                           
2019-04-10 22:04:02,613 - synapse.util.retryutils - 193 - INFO - POST-85 - Connection to kamax.io was unsuccessful (<class 'synapse.api.errors.HttpResponseException'>(502: b'Bad Gateway'));
backoff now 0                                                                                                                                                                                
2019-04-10 22:04:02,613 - synapse.handlers.profile - 143 - ERROR - POST-85 - Failed to get displayname                                                                                       
Traceback (most recent call last):                                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/synapse/handlers/profile.py", line 139, in get_displayname                                                        
    ignore_backoff=True,                                                                                                                                                                     
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks                                                        
    result = result.throwExceptionIntoGenerator(g)                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator                                              
    return g.throw(self.type, self.value, self.tb)                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/synapse/federation/transport/client.py", line 202, in make_query                                                  
    ignore_backoff=ignore_backoff,                                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks                                                        
    result = result.throwExceptionIntoGenerator(g)                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator                                              
    return g.throw(self.type, self.value, self.tb)                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 703, in get_json                                                    
    timeout=timeout,                                                                                                                                                                         
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks                                                        
    result = result.throwExceptionIntoGenerator(g)                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator                                              
    return g.throw(self.type, self.value, self.tb)                                                                                                                                           
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 220, in _send_request_with_optional_trailing_slash                  
    request, **send_request_args                                                                                                                                                             
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks                                                        
    result = g.send(result)
  File "/media/DRIVE/opt/matrix_DOMAIN/venv3/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 427, in _send_request
    raise e
synapse.api.errors.HttpResponseException: 502: b'Bad Gateway'
2019-04-10 22:04:04,297 - synapse.handlers.message - 319 - INFO - POST-85 - Failed to get profile information for @mxisd-lookup-test:kamax.io: 502: b'Bad Gateway'
2019-04-10 22:04:04,299 - synapse.metrics - 372 - INFO -  - Collecting gc 0
2019-04-10 22:04:05,048 - synapse.handlers.presence - 350 - INFO -  - Handling presence timeouts
2019-04-10 22:04:05,049 - synapse.handlers.typing - 89 - INFO -  - Checking for typing timeouts
gerroon commented 5 years ago

Never mind, after hours of scratching my head :( It was my domain records with trusted ids.