jahschwa / sibyl

a python chatbot with a focus on XBMC
GNU General Public License v3.0
7 stars 6 forks source link

matrix: ConnectionError in connect() #66

Closed jahschwa closed 5 years ago

jahschwa commented 5 years ago

Probably just add it here: https://github.com/TheSchwa/sibyl/blob/23863ad4f2e0d91c6e177ea93e14c5b8da49821a/protocols/sibyl_matrix.py#L195

2019-05-14 18:07:45 | sibylbot | CRI | UNHANDLED: ConnectionError

Traceback (most recent call last):
  File "/usr/src/app/sibyl/lib/sibylbot.py", line 1186, in run_forever
    self.__run_forever()
  File "/usr/src/app/sibyl/lib/sibylbot.py", line 1065, in __run_forever
    self.__serve()
  File "/usr/src/app/sibyl/lib/sibylbot.py", line 1045, in __serve
    proto.connect()
  File "protocols/sibyl_matrix.py", line 182, in connect
    self.client = MatrixClient(homeserver, user_id=user, token=self.bot.credentials[1])
  File "/usr/src/app/src/matrix-client/matrix_client/client.py", line 104, in __init__
    self._sync()
  File "/usr/src/app/src/matrix-client/matrix_client/client.py", line 426, in _sync
    response = self.api.sync(self.sync_token, timeout_ms, filter=self.sync_filter)
  File "/usr/src/app/src/matrix-client/matrix_client/api.py", line 94, in sync
    api_path=MATRIX_V2_API_PATH)
  File "/usr/src/app/src/matrix-client/matrix_client/api.py", line 531, in _send
    verify=self.validate_cert
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='matrix.org', port=443):
Max retries exceeded with url:
/_matrix/client/r0/sync?access_token=REDACTED&timeout=30000 (
  Caused by NewConnectionError (
    '<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fae6badcbd0>:
    Failed to establish a new connection: [Errno -2] Name or service not known',
  )
)

2019-05-14 18:07:45 | sibylbot | CRI | Please consider reporting the above error to the developers.