I've finally got Synapse to connect to my postgresql server running on the host, but now it throws an error when it tries to listen to port 8008:
2021-01-04 18:44:10,089 - twisted - 254 - ERROR - - Traceback (most recent call last):
2021-01-04 18:44:10,089 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 1361, in startListening
2021-01-04 18:44:10,089 - twisted - 254 - ERROR - - skt.bind(addr)
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - OSError: [Errno 99] Cannot assign requested address
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - -
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - During handling of the above exception, another exception occurred:
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - -
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - Traceback (most recent call last):
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 278, in start
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - hs.start_listening(listeners)
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 298, in start_listening
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - self._listening_services.extend(self._listener_http(config, listener))
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 160, in _listener_http
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - reactor=self.get_reactor(),
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 169, in listen_tcp
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - check_bind_error(e, address, bind_addresses)
2021-01-04 18:44:10,090 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/synapse/app/__init__.py", line 51, in check_bind_error
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - raise e
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 167, in listen_tcp
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - r.append(reactor.listenTCP(port, factory, backlog, address))
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 495, in listenTCP
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - p.startListening()
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 1363, in startListening
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - raise CannotListenError(self.interface, self.port, le)
2021-01-04 18:44:10,091 - twisted - 254 - ERROR - - twisted.internet.error.CannotListenError: Couldn't listen on ::1:8008: [Errno 99] Cannot assign requested address.
2021-01-04 18:44:10,115 - twisted - 254 - CRITICAL - - Unhandled error in Deferred:
2021-01-04 18:44:10,116 - twisted - 254 - CRITICAL - -
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 1361, in startListening
skt.bind(addr)
OSError: [Errno 99] Cannot assign requested address
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 278, in start
hs.start_listening(listeners)
File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 298, in start_listening
self._listening_services.extend(self._listener_http(config, listener))
File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 160, in _listener_http
reactor=self.get_reactor(),
File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 169, in listen_tcp
check_bind_error(e, address, bind_addresses)
File "/usr/local/lib/python3.7/dist-packages/synapse/app/__init__.py", line 51, in check_bind_error
raise e
File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 167, in listen_tcp
r.append(reactor.listenTCP(port, factory, backlog, address))
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 495, in listenTCP
p.startListening()
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 1363, in startListening
raise CannotListenError(self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on ::1:8008: [Errno 99] Cannot assign requested address.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 429, in start
_base.start(hs, config.listeners)
File "/usr/local/lib/python3.7/dist-packages/synapse/app/_base.py", line 308, in start
sys.exit(1)
SystemExit: 1
2021-01-04 18:44:10,139 - twisted - 254 - INFO - - Main loop terminated.
I've read this is probably due to some ipv6 issue, but is this something I can fix or something that needs to be fixed in the config of the docker image itself?