Open grinapo opened 4 years ago
Thanks for the bug report! I was able to reproduce this in sytest by running in worker mode with a command like:
docker run --rm -it -e POSTGRES=true -e WORKERS=true -v /Users/clokep/matrix/synapse\:/src:ro -v /Users/clokep/matrix/sytest/logs\:/logs -v /Users/clokep/matrix/sytest\:/sytest:ro matrixdotorg/sytest-synapse:py35 tests/10apidoc/35room-typing.pl
After modifying sytests to bind to ::1
:
Although I tried to bisect what broke this and now I'm not able to reproduce it anymore...
Looks like this got broken in v1.14.0 due to #7517, was able to reproduce with the following:
docker run --rm -it -e POSTGRES=true -e WORKERS=true -v /Users/clokep/matrix/synapse\:/src:ro -v /Users/clokep/matrix/sytest/logs\:/logs -v /Users/clokep/matrix/sytest\:/sytest:ro matrixdotorg/sytest-synapse:py35 tests/10apidoc/12device_management.pl
From #synapse-dev:matrix.org:
I guess this has actually always been broken, just that likely their set up didn't use replication http pokes before we changed the replication protocol so that we requested missing updates via http rather than in band on the tcp connection https://github.com/matrix-org/synapse/blob/master/synapse/replication/http/_base.py#L191 is the offending line
I think this is python-hyper/hyperlink#68, which is also the cause of #4092 it seems?
Maybe, though I'll note that we don't correctly construct the URL in the first place as we don't enclose IPv6 literals in [..]
. Having done that we may still run into the issue linked
@erikjohnston I attempted putting it directly in the config (as @grinapo suggested in the description) and then ran into the hyperlink issue.
I also tried making the URL that we construct a byte string instead (as that goes through a slightly different code path). I'm not convinced that really made anything different though.
I think #4478 is a duplicate of this, although that has a workaround:
A workaround is using ip6-localhost in the URL.
I see a similar issue to #4478 when configuring an appservice with an IPv6 literal address in the url
registration field. Using ip6-localhost
instead works.
synapse.appservice.api: [as-sender-494a742717f3d068f2e73680da4c2366d8d489df6ce56a050e85fed8c599d097-0] push_bulk to http://[::1]:54554/transactions/1 threw exception Codepoint U+003A at position 1 of '::1' not allowed
Description
v1.13.x workers config broken after v1.15.0 upgrade. Server dies in mysterious ways.
So far it has been working as:
Apart from it may have require
worker_replication_http_port
now (not sure though) the…_host
is completely broken. I can try various valid combos without success, likebut then it stupidly tries to interpret it as a hostname. I did not find a working solution, so I had to downgrade all connections to ipv4.
Steps to reproduce
Version information