-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
v1.15 upgrade broken ipv6 replication config (ipv6 literals) #7695
Comments
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 Detailsdiff --git a/lib/SyTest/Homeserver/Synapse.pm b/lib/SyTest/Homeserver/Synapse.pm
--- a/lib/SyTest/Homeserver/Synapse.pm
+++ b/lib/SyTest/Homeserver/Synapse.pm
@@ -719,7 +719,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.pusher",
"worker_pid_file" => "$hsdir/pusher.pid",
"worker_log_config" => $self->configure_logger("pusher"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_listeners" => [
@@ -745,7 +745,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.appservice",
"worker_pid_file" => "$hsdir/appservice.pid",
"worker_log_config" => $self->configure_logger("appservice"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_listeners" => [
@@ -771,7 +771,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.federation_sender",
"worker_pid_file" => "$hsdir/federation_sender.pid",
"worker_log_config" => $self->configure_logger("federation_sender"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_listeners" => [
@@ -797,7 +797,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.synchrotron",
"worker_pid_file" => "$hsdir/synchrotron.pid",
"worker_log_config" => $self->configure_logger("synchrotron"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_listeners" => [
@@ -831,7 +831,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.federation_reader",
"worker_pid_file" => "$hsdir/federation_reader.pid",
"worker_log_config" => $self->configure_logger("federation_reader"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_listeners" => [
@@ -865,7 +865,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.media_repository",
"worker_pid_file" => "$hsdir/media_repository.pid",
"worker_log_config" => $self->configure_logger("media_repository"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_listeners" => [
@@ -933,7 +933,7 @@ sub wrap_synapse_command
"worker_app" => "synapse.app.user_dir",
"worker_pid_file" => "$hsdir/user_dir.pid",
"worker_log_config" => $self->configure_logger("user_dir"),
- "worker_replication_host" => "$bind_host",
+ "worker_replication_host" => "::1",
"worker_replication_port" => $self->{ports}{synapse_replication_tcp},
"worker_replication_http_port" => $self->{ports}{synapse_unsecure},
"worker_listeners" => [ 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:
|
From #synapse-dev:matrix.org:
|
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 |
@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:
|
I see a similar issue to #4478 when configuring an appservice with an IPv6 literal address in the
|
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
The text was updated successfully, but these errors were encountered: