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

default acme config doesn't work on py2 #4559

Closed
richvdh opened this issue Feb 4, 2019 · 3 comments
Closed

default acme config doesn't work on py2 #4559

richvdh opened this issue Feb 4, 2019 · 3 comments
Assignees

Comments

@richvdh
Copy link
Member

richvdh commented Feb 4, 2019

2019-02-04 17:45:46,170 - twisted - 245 - ERROR - - Traceback (most recent call last):
2019-02-04 17:45:46,170 - twisted - 245 - ERROR - -   File "/usr/local/lib/python2.7/site-packages/synapse/app/homeserver.py", line 418, in start
2019-02-04 17:45:46,171 - twisted - 245 - ERROR - -     yield acme.start_listening()
2019-02-04 17:45:46,171 - twisted - 245 - ERROR - - TypeError: expected unicode for text, got 'https://acme-v01.api.letsencrypt.org/directory'
2019-02-04 17:45:46,191 - twisted - 245 - CRITICAL - - Unhandled error in Deferred:
2019-02-04 17:45:46,192 - twisted - 245 - CRITICAL - - 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/site-packages/synapse/app/homeserver.py", line 450, in start
    sys.exit(1)
SystemExit: 1
@richvdh richvdh self-assigned this Feb 5, 2019
richvdh added a commit that referenced this issue Feb 5, 2019
richvdh added a commit that referenced this issue Feb 5, 2019
@richvdh
Copy link
Member Author

richvdh commented Feb 5, 2019

fixed by #4564

@richvdh richvdh closed this as completed Feb 5, 2019
@zingi
Copy link

zingi commented Feb 17, 2019

I am trying to activate the acme feature in my homeserver.yaml with Synapse Version v0.99.1.1. But I'm still getting the error described in this ticket:
(I have configured in my homeserver.yaml, that I want to use the port 8009, because on port 80 listens traefik-reverse-proxy)

2019-02-17 12:06:34,060 - twisted - 239 - INFO -  - Site starting on 8009
2019-02-17 12:06:34,061 - synapse.handlers.acme - 105 - INFO -  - Listening for ACME requests on 0.0.0.0:8009
2019-02-17 12:06:34,061 - synapse.app - 47 - WARNING -  - Failed to listen on 0.0.0.0, continuing because listening on [::]
2019-02-17 12:06:34,062 - twisted - 239 - ERROR -  - Error during startup:
2019-02-17 12:06:34,063 - twisted - 239 - ERROR -  - Traceback (most recent call last):
2019-02-17 12:06:34,063 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
2019-02-17 12:06:34,065 - twisted - 239 - ERROR -  -     result = g.send(result)
2019-02-17 12:06:34,066 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/synapse/app/homeserver.py", line 429, in start
2019-02-17 12:06:34,067 - twisted - 239 - ERROR -  -     yield acme.start_listening()
2019-02-17 12:06:34,068 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
2019-02-17 12:06:34,068 - twisted - 239 - ERROR -  -     return _cancellableInlineCallbacks(gen)
2019-02-17 12:06:34,069 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
2019-02-17 12:06:34,069 - twisted - 239 - ERROR -  -     _inlineCallbacks(None, g, status)
2019-02-17 12:06:34,070 - twisted - 239 - ERROR -  - --- <exception caught here> ---
2019-02-17 12:06:34,070 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/synapse/app/homeserver.py", line 429, in start
2019-02-17 12:06:34,071 - twisted - 239 - ERROR -  -     yield acme.start_listening()
2019-02-17 12:06:34,071 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
2019-02-17 12:06:34,072 - twisted - 239 - ERROR -  -     result = g.send(result)
2019-02-17 12:06:34,072 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/synapse/handlers/acme.py", line 121, in start_listening
2019-02-17 12:06:34,073 - twisted - 239 - ERROR -  -     yield self._issuer._ensure_registered()
2019-02-17 12:06:34,075 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/txacme/service.py", line 243, in _ensure_registered
2019-02-17 12:06:34,075 - twisted - 239 - ERROR -  -     return self._with_client(self._register)
2019-02-17 12:06:34,076 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/txacme/service.py", line 184, in _with_client
2019-02-17 12:06:34,077 - twisted - 239 - ERROR -  -     return self._client_creator().addCallback(f, *a, **kw)
2019-02-17 12:06:34,077 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/synapse/handlers/acme.py", line 83, in <lambda>
2019-02-17 12:06:34,078 - twisted - 239 - ERROR -  -     url=URL.from_text(self.hs.config.acme_url),
2019-02-17 12:06:34,078 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/hyperlink/_url.py", line 1098, in from_text
2019-02-17 12:06:34,080 - twisted - 239 - ERROR -  -     um = _URL_RE.match(_textcheck('text', text))
2019-02-17 12:06:34,080 - twisted - 239 - ERROR -  -   File "/usr/local/lib/python2.7/dist-packages/hyperlink/_url.py", line 457, in _textcheck
2019-02-17 12:06:34,081 - twisted - 239 - ERROR -  -     raise TypeError('expected %s for %s, got %r' % (exp, name, value))
2019-02-17 12:06:34,081 - twisted - 239 - ERROR -  - exceptions.TypeError: expected unicode for text, got 'https://acme-v01.api.letsencrypt.org/directory'
2019-02-17 12:06:34,086 - synapse.metrics - 374 - INFO -  - Collecting gc 0
2019-02-17 12:06:34,126 - twisted - 239 - CRITICAL -  - Unhandled error in Deferred:
2019-02-17 12:06:34,127 - twisted - 239 - CRITICAL -  -
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/dist-packages/synapse/app/homeserver.py", line 451, in start
    sys.exit(1)
SystemExit: 1
2019-02-17 12:06:34,129 - twisted - 239 - INFO -  - (TCP Port 8009 Closed)
``

@richvdh
Copy link
Member Author

richvdh commented Feb 18, 2019

@zingi can you open a new issue, including the acme section of your homeserver.yaml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants