Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

500 error when inviting user on unreachable HS #2047

Open
richvdh opened this issue Mar 22, 2017 · 3 comments
Open

500 error when inviting user on unreachable HS #2047

richvdh opened this issue Mar 22, 2017 · 3 comments
Labels
A-Federation A-Invite Inviting users to rooms and accepting invites T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-bug (Deprecated Label)

Comments

@richvdh
Copy link
Member

richvdh commented Mar 22, 2017

if you try to send an invite to a user on a homeserver which cannot be reached, synapse (eventually) returns a 500 with {errcode: "M_UNKNOWN", error: "Internal server error"}

@richvdh richvdh changed the title "500 error when inviting user on unreachable HS" "if you try to send an invite to a user on a homeserver which cannot be reached, synapse (eventually) returns a 500 with {errcode: "M_UNKNOWN", error: "Internal server error"} 500 error when inviting user on unreachable HS Mar 22, 2017
@richvdh
Copy link
Member Author

richvdh commented Mar 23, 2017

See also #1411.

@bmarty
Copy link

bmarty commented Apr 9, 2019

Still observed today

@neilisfragile neilisfragile added A-Federation z-bug (Deprecated Label) labels Apr 10, 2019
@werner291
Copy link
Contributor

werner291 commented Sep 27, 2019

Reproduced today as well when trying to create a room with a list of invitees.

Here's a stacktrace I found in the logs:

Sep 27 00:00:29 nixos synapse[18978]: synapse.http.server: [POST-352] Failed handle request via 'RoomCreateRestServlet': <XForwardedForRequest at 0x7fc82ffe2a50 method='POST' uri='/_matrix/client/r0/createRoom' clientproto='HTTP/1.0' site=8008>
                                      Traceback (most recent call last):
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 424, in _send_request
                                          response = yield request_deferred
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/federation/matrix_federation_agent.py", line 150, in request
                                          agent.request(method, uri, headers, bodyProducer)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
                                          current.result = callback(current.result, *args, **kw)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/endpoints.py", line 975, in startConnectionAttempts
                                          "no results for hostname lookup: {}".format(self._hostStr)
                                      twisted.internet.error.DNSLookupError: DNS lookup failed: no results for hostname lookup: doesnotexist.tldrrrrrr.
                                      
                                      The above exception was the direct cause of the following exception:
                                      
                                      Traceback (most recent call last):
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/server.py", line 76, in wrapped_request_handler
                                          await h(self, request)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/server.py", line 315, in _async_render
                                          callback_return = await callback_return
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/rest/client/v1/room.py", line 91, in on_POST
                                          requester, self.get_room_config(request)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/room.py", line 651, in create_room
                                          content=content,
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/room_member.py", line 302, in update_membership
                                          require_consent=require_consent,
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/room_member.py", line 508, in _update_membership
                                          require_consent=require_consent,
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/room_member.py", line 196, in _local_membership_update
                                          requester, event, context, extra_users=[target], ratelimit=ratelimit
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/util/metrics.py", line 69, in measured_func
                                          r = yield func(self, *args, **kwargs)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/message.py", line 705, in handle_new_client_event
                                          requester, event, context, ratelimit=ratelimit, extra_users=extra_users
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/message.py", line 783, in persist_and_notify_client_event
                                          invitee.domain, event
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/handlers/federation.py", line 1085, in send_invite
                                          pdu=event,
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/federation/federation_client.py", line 742, in send_invite
                                          content = yield self._do_send_invite(destination, pdu, room_version)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/federation/federation_client.py", line 783, in _do_send_invite
                                          "invite_room_state": pdu.unsigned.get("invite_room_state", []),
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/federation/transport/client.py", line 314, in send_invite_v2
                                          destination=destination, path=path, data=content, ignore_backoff=True
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 640, in put_json
                                          timeout=timeout,
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 241, in _send_request_with_optional_trailing_slash
                                          response = yield self._send_request(request, **send_request_args)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
                                          result = result.throwExceptionIntoGenerator(g)
                                        File "/nix/store/kv604h4xyjdcvnfqxzprfr3msg9i1dvh-python3.7-Twisted-18.9.0/lib/python3.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
                                          return g.throw(self.type, self.value, self.tb)
                                        File "/nix/store/02my60ip60g2vw2rhvynz79iihvs5v1i-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/http/matrixfederationclient.py", line 426, in _send_request
                                          raise_from(RequestSendFailed(e, can_retry=retry_on_dns_fail), e)
                                        File "<string>", line 3, in raise_from
                                      synapse.api.errors.RequestSendFailed: Failed to send request: DNSLookupError: DNS lookup failed: no results for hostname lookup: doesnotexist.tldrrrrrr.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federation A-Invite Inviting users to rooms and accepting invites T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-bug (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

5 participants