You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
A-Metricsmetrics, measures, stuff we put in PrometheusP4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-MinorBlocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.
and synapse will not start anymore, instead yielding the following traceback:
twisted: [] Traceback (most recent call last):
twisted: [] File "/usr/lib/python3/dist-packages/synapse/app/_base.py", line 271, in start
twisted: [] hs.start_listening(listeners)
twisted: [] File "/usr/lib/python3/dist-packages/synapse/app/homeserver.py", line 293, in start_listening
twisted: [] _base.listen_metrics(listener["bind_addresses"], listener["port"])
twisted: [] File "/usr/lib/python3/dist-packages/synapse/app/_base.py", line 160, in listen_metrics
twisted: [] start_http_server(port, addr=host, registry=RegistryProxy)
twisted: [] File "/usr/lib/python3/dist-packages/synapse/metrics/_exposition.py", line 242, in start_http_server
twisted: [] httpd = _ThreadingSimpleServer((addr, port), CustomMetricsHandler)
twisted: [] File "/usr/lib/python3.7/socketserver.py", line 452, in __init__
twisted: [] self.server_bind()
twisted: [] File "/usr/lib/python3.7/http/server.py", line 137, in server_bind
twisted: [] socketserver.TCPServer.server_bind(self)
twisted: [] File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind
twisted: [] self.socket.bind(self.server_address)
twisted: [] socket.gaierror: [Errno -9] Address family for hostname not supported
twisted: [] Unhandled error in Deferred:
twisted: []
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/synapse/app/_base.py", line 271, in start
hs.start_listening(listeners)
File "/usr/lib/python3/dist-packages/synapse/app/homeserver.py", line 293, in start_listening
_base.listen_metrics(listener["bind_addresses"], listener["port"])
File "/usr/lib/python3/dist-packages/synapse/app/_base.py", line 160, in listen_metrics
start_http_server(port, addr=host, registry=RegistryProxy)
File "/usr/lib/python3/dist-packages/synapse/metrics/_exposition.py", line 242, in start_http_server
httpd = _ThreadingSimpleServer((addr, port), CustomMetricsHandler)
File "/usr/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/usr/lib/python3.7/http/server.py", line 137, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
socket.gaierror: [Errno -9] Address family for hostname not supported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python3/dist-packages/synapse/app/homeserver.py", line 413, in start
_base.start(hs, config.listeners)
File "/usr/lib/python3/dist-packages/synapse/app/_base.py", line 281, in start
sys.exit(1)
SystemExit: 1
Applying the workaround at python/cpython#11767 to start_http_server enables using IPv6 literals as bind addresses. I haven't checked how that impacts IPv4 or hostnames.
Applying the workaround at python/cpython#11767 to start_http_server enables using IPv6 literals as bind addresses. I haven't checked how that impacts IPv4 or hostnames.
Worth noting that the corresponding Python bug was marked as resolved in 3.8. Maybe this has been solved for anyone running that version or newer?
This is still an issue with Python 3.8.12 and synapse fcfe675
As a workaround, explicitly setting AF_INET6 in Python's socket.py, line 231: _socket.socket.init(self, AF_INET6, type, proto, fileno) works
roosemberth
added a commit
to roosemberth/dotfiles
that referenced
this issue
Jun 5, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A-Metricsmetrics, measures, stuff we put in PrometheusP4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-MinorBlocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
metrics-listener makes synapse crash when assigned an IPv6-bind_address
Steps to reproduce
Add
to the
/etc/matrix-synapse/homeserver.yaml
and everything works, change it to eitheror
and synapse will not start anymore, instead yielding the following traceback:
Version information
The text was updated successfully, but these errors were encountered: