我正在使用“ docker.io/matrixdotorg/synapse:latest-py3 ” docker image,它按预期运行在本地运行时,但仅当将其部署到我的群集上,并出现无法监听::: 8008:[Errno 97]协议不支持的地址族错误。 有帮助吗?
- twisted - 242 - ERROR - - Traceback (most recent call last):
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 1356, in startListening
- twisted - 242 - ERROR - - skt = self.createInternetSocket()
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 1340, in createInternetSocket
- twisted - 242 - ERROR - - s = base.BasePort.createInternetSocket(self)
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/twisted/internet/base.py", line 1188, in createInternetSocket
- twisted - 242 - ERROR - - s = socket.socket(self.addressFamily, self.socketType)
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/socket.py", line 144, in __init__
- twisted - 242 - ERROR - - _socket.socket.__init__(self, family, type, proto, fileno)
- twisted - 242 - ERROR - - OSError: [Errno 97] Address family not supported by protocol
- twisted - 242 - ERROR - - During handling of the above exception, another exception occurred:
- twisted - 242 - ERROR - - Traceback (most recent call last):
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/synapse/app/_base.py", line 282, in start
- twisted - 242 - ERROR - - hs.start_listening(listeners)
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-
packages/synapse/app/homeserver.py", line 261, in start_listening
- twisted - 242 - ERROR - - self._listener_http(config, listener)
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/synapse/app/homeserver.py", line 154, in _listener_http
- twisted - 242 - ERROR - - reactor=self.get_reactor(),
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/synapse/app/_base.py", line 190, in listen_tcp
- twisted - 242 - ERROR - - check_bind_error(e, address, bind_addresses)
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/synapse/app/__init__.py", line 49, in check_bind_error
- twisted - 242 - ERROR - - raise e
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/synapse/app/_base.py", line 186, in listen_tcp
- twisted - 242 - ERROR - - address
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP
- twisted - 242 - ERROR - - p.startListening()
- twisted - 242 - ERROR - - File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 1363, in startListening
- twisted - 242 - ERROR - - raise CannotListenError(self.interface, self.port, le)
- twisted - 242 - ERROR - - twisted.internet.error.CannotListenError: Couldn't listen on :::8008: [Errno 97] Address family not supported by protocol```
`
答案 0 :(得分:0)
您可能已禁用ipv6,并且默认配置尝试同时监听ipv6和ipv4。如果您检查bind_addresses
配置文件的/etc/matrix-synapse/homeserver.yaml
部分,则应将bind_addresses: ['::1', '127.0.0.1']
更改为bind_addresses: ['127.0.0.1']