Repository navigation
after upgrade to debian 12 replication for workers is broken #16093
Description
Description
hi,
i have a strange Problem today.
I upgrade my matrix-synapse VM from Debian 11 to Debian 12.
Before i upgrade everything works fine!
But after the upgrade i see some strange logs like:
see below
My first guess was that the server time is not right. Since I checked but everything was OK and the time was synchronized correctly.
The second idea was that the Redis connection does not work. However, Redis works without errors and Synapse has also been diligently using the keyspace.
As a next step, I have now commented out the worker setup so that synapse works without workers. Everything seems to be working there too.
Homeserver
envs.net
Synapse Version
1.89.0 and 1.90.0rc1
(i already had the problem with 1.89.0 then I upgraded to 1.90.0rc1 and the logs continued to look like this.)
Installation Method
Debian packages from packages.matrix.org
Database
singe pgsql 13
Workers
Multiple workers
Platform
Debian 12 KVM
Configuration
here my complet config: https://git.envs.net/envs/matrix-conf/src/branch/master/etc/matrix-synapse
i double checked the instance_map, stream_writers and worker configs.
Relevant log output
2023-08-09 15:33:10,214 - synapse.replication.tcp.handler - 733 - WARNING - GET-7981 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:10,278 - synapse.replication.tcp.handler - 733 - WARNING - GET-7984 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:10,346 - synapse.replication.tcp.handler - 733 - WARNING - GET-7987 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:10,480 - synapse.replication.tcp.handler - 733 - WARNING - GET-7993 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:11,025 - synapse.replication.tcp.handler - 733 - WARNING - GET-8020 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:11,594 - synapse.replication.tcp.handler - 733 - WARNING - GET-8048 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:11,756 - synapse.replication.tcp.handler - 733 - WARNING - GET-8061 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:12,119 - synapse.replication.tcp.handler - 733 - WARNING - GET-8080 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:12,287 - synapse.replication.tcp.handler - 733 - WARNING - GET-8093 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:12,330 - synapse.replication.tcp.handler - 733 - WARNING - GET-8095 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:12,766 - synapse.replication.tcp.client - 331 - ERROR - POST-7878 - Timed out waiting for repl stream 'backfill' to reach 77624896 (generic_worker4); currently at: 77620991
2023-08-09 15:33:12,770 - synapse.replication.tcp.handler - 733 - WARNING - GET-8117 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:12,906 - synapse.replication.tcp.client - 331 - ERROR - POST-7885 - Timed out waiting for repl stream 'backfill' to reach 77624896 (generic_worker4); currently at: 77620991
2023-08-09 15:33:12,938 - synapse.replication.tcp.client - 331 - ERROR - POST-7887 - Timed out waiting for repl stream 'caches' to reach 49072379 (generic_worker5); currently at: 49072351
2023-08-09 15:33:13,164 - synapse.replication.tcp.client - 331 - ERROR - POST-7896 - Timed out waiting for repl stream 'caches' to reach 49072379 (generic_worker5); currently at: 49072351
2023-08-09 15:33:13,434 - synapse.replication.tcp.handler - 733 - WARNING - GET-8150 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:13,630 - synapse.replication.tcp.client - 331 - ERROR - POST-7915 - Timed out waiting for repl stream 'caches' to reach 49072379 (generic_worker5); currently at: 49072351
2023-08-09 15:33:14,042 - synapse.replication.tcp.handler - 733 - WARNING - GET-8182 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:14,234 - synapse.replication.tcp.client - 331 - ERROR - PUT-7433 - Timed out waiting for repl stream 'receipts' to reach 158430400 (additional1); currently at: 158428466
2023-08-09 15:33:14,290 - synapse.replication.tcp.client - 331 - ERROR - PUT-7236 - Timed out waiting for repl stream 'account_data' to reach 21971997 (additional1); currently at: 21971866
2023-08-09 15:33:14,293 - synapse.replication.tcp.client - 331 - ERROR - PUT-7236 - Timed out waiting for repl stream 'account_data' to reach 21971997 (additional1); currently at: 21971866
2023-08-09 15:33:14,836 - synapse.replication.tcp.client - 331 - ERROR - POST-7966 - Timed out waiting for repl stream 'backfill' to reach 77624896 (generic_worker4); currently at: 77620991
2023-08-09 15:33:15,208 - synapse.replication.tcp.handler - 733 - WARNING - GET-8245 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:16,312 - synapse.replication.tcp.client - 331 - ERROR - _process_incoming_pdus_in_room_inner-23-$3eVnPoZJ61dwXPvbmOD3QQ2vmv_t3nvcRM7lT0pnbRE - Timed out waiting for repl stream 'events' to reach 175128345 (generic_worker2); currently at: 175127539
2023-08-09 15:33:16,497 - synapse.replication.tcp.handler - 733 - WARNING - GET-8307 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:17,713 - synapse.replication.tcp.handler - 733 - WARNING - GET-8370 - Dropping command as not connected: 'USER_IP'
2023-08-09 15:33:17,716 - synapse.replication.tcp.client - 331 - ERROR - PUT-7496 - Timed out waiting for repl stream 'typing' to reach 338 (additional1); currently at: 0
2023-08-09 15:33:17,766 - synapse.replication.tcp.client - 331 - ERROR - POST-7878 - Timed out waiting for repl stream 'caches' to reach 49072368 (generic_worker4); currently at: 49072351
2023-08-09 15:33:17,906 - synapse.replication.tcp.client - 331 - ERROR - POST-7885 - Timed out waiting for repl stream 'caches' to reach 49072368 (generic_worker4); currently at: 49072351
2023-08-09 15:33:17,939 - synapse.replication.tcp.client - 331 - ERROR - POST-7887 - Timed out waiting for repl stream 'events' to reach 175128330 (generic_worker5); currently at: 175127514
2023-08-09 15:33:17,948 - synapse.replication.tcp.handler - 733 - WARNING - persist_events-291 - Dropping command as not connected: 'LOCK_RELEASED'
2023-08-09 15:33:18,165 - synapse.replication.tcp.client - 331 - ERROR - POST-7896 - Timed out waiting for repl stream 'events' to reach 175128330 (generic_worker5); currently at: 175127514
2023-08-09 15:33:18,179 - synapse.replication.tcp.handler - 733 - WARNING - persist_events-292 - Dropping command as not connected: 'LOCK_RELEASED'
2023-08-09 15:33:18,355 - synapse.replication.tcp.client - 331 - ERROR - PUT-7697 - Timed out waiting for repl stream 'typing' to reach 338 (additional1); currently at: 0
2023-08-09 15:33:18,452 - synapse.replication.tcp.client - 331 - ERROR - POST-8152 - Timed out waiting for repl stream 'backfill' to reach 77624896 (generic_worker4); currently at: 77620991
2023-08-09 15:33:18,631 - synapse.replication.tcp.client - 331 - ERROR - POST-7915 - Timed out waiting for repl stream 'events' to reach 175128330 (generic_worker5); currently at: 175127514
2023-08-09 15:33:18,642 - synapse.replication.tcp.handler - 733 - WARNING - persist_events-293 - Dropping command as not connected: 'LOCK_RELEASED'
2023-08-09 15:33:19,234 - synapse.replication.tcp.client - 331 - ERROR - PUT-7433 - Timed out waiting for repl stream 'to_device' to reach 10441913 (additional1); currently at: 10441702
2023-08-09 15:33:19,837 - synapse.replication.tcp.client - 331 - ERROR - POST-7966 - Timed out waiting for repl stream 'caches' to reach 49072368 (generic_worker4); currently at: 49072351
2023-08-09 15:33:20,319 - synapse.replication.tcp.client - 331 - ERROR - POST-8252 - Timed out waiting for repl stream 'backfill' to reach 77624896 (generic_worker4); currently at: 77620991
2023-08-09 15:33:20,901 - synapse.replication.tcp.client - 331 - ERROR - PUT-7634 - Timed out waiting for repl stream 'typing' to reach 344 (additional1); currently at: 0
2023-08-09 15:33:21,273 - synapse.replication.tcp.client - 331 - ERROR - PUT-7821 - Timed out waiting for repl stream 'typing' to reach 346 (additional1); currently at: 0
2023-08-09 15:33:21,273 - synapse.replication.tcp.client - 331 - ERROR - PUT-7821 - Timed out waiting for repl stream 'typing' to reach 347 (additional1); currently at: 0
2023-08-09 15:33:21,278 - synapse.replication.tcp.client - 331 - ERROR - PUT-7821 - Timed out waiting for repl stream 'typing' to reach 347 (additional1); currently at: 0
2023-08-09 15:33:21,313 - synapse.replication.tcp.client - 331 - ERROR - _process_incoming_pdus_in_room_inner-23-$3eVnPoZJ61dwXPvbmOD3QQ2vmv_t3nvcRM7lT0pnbRE - Timed out waiting for repl stream 'caches' to reach 49072396 (generic_worker2); currently at: 49072351
2023-08-09 15:33:21,313 - synapse.replication.tcp.handler - 733 - WARNING - _process_incoming_pdus_in_room_inner-23-$3eVnPoZJ61dwXPvbmOD3QQ2vmv_t3nvcRM7lT0pnbRE - Dropping command as not connected: 'LOCK_RELEASED'
Activity
cremesk commentedon Aug 10, 2023
i check some more today..
i can see in redis some connection from synapse to keyspace 0:
(keyspace 15 is the matrix-media-repo)
also the redis monitor shows something:
but it feels like i see no RDATA commands in redis. also the grafana graph shows no RDATA:

(i tried and tested several things.. therefore, quite a lot of restarts are also recorded.)
[-]after upgrade to debian 12 worker setup looks broken[/-][+]after upgrade to debian 12 replication for workers is broken[/+]cremesk commentedon Aug 10, 2023
the log part in debug mode looks something like:
and also:
cremesk commentedon Aug 10, 2023
maybe it could be partly in relation with the missing patch of #16061 ?
cremesk commentedon Aug 11, 2023
with synapse without workers i also see sometimes a replication problem i think:
cremesk commentedon Aug 11, 2023
if I activate redis in single synpase mode (without workers), I see the following in the logs:
erikjohnston commentedon Aug 11, 2023
Hi @cremesk, a quick looks suggest to me that for some reason the workers aren't sending/receiving redis pub/sub traffic. In particular:
Suggests that its failing to talk to the Redis. Also, the lack of
PUBLISHcommands in your monitor logs suggest its not doing any pub/sub. I am confused why Synapse seems to be able to sendSETcommands happily. Are there any logs after restart that reference redis?cremesk commentedon Aug 14, 2023
hi @erikjohnston
That's what also surprises me. Somehow a connection seems to come about.
I don't see anything relevant in the logs at first, I would say.
i also try the txredisapi==1.4.10 in the synapse venv (#16107) unfortunately, the problem remains the same.
cremesk commentedon Aug 14, 2023
okay i look a bit deeper in my synapse logs and i think i found the issue...
it looks like the debian 12 upgrade add a acl line to the end of the redis config..
user default on nopass ~* +@alli delete this line and now it looks fine!