synapse
synapse copied to clipboard
Could not connect after a migration of server
Description
Hello,
I try to migrate matrix-synapse from a server to another but I couldn't reconnect to matrix in new one server.
Steps to reproduce
I do this
- rsync configuration files
- rsync media data
- dump and restore database on other server
- change url_old to url_new in file and in database
Homeserver
homeserver
Synapse Version
1.87.0+bullseye1
Installation Method
Debian packages from packages.matrix.org
Database
Postgresql
Workers
Single process
Platform
Debian 11 server
Configuration
No response
Relevant log output
Sep 26 15:54:37 agrobio synapse[374173]: synapse.access.http.8008: [OPTIONS-2] 91.175.148.239 - 8008 - Received request: OPTIONS /_matrix/client/v3/login
Sep 26 15:54:37 agrobio synapse[374173]: synapse.access.http.8008: [OPTIONS-2] 91.175.148.239 - 8008 - {None} Processed request: 0.001sec/-0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 0B 204 "OPTIONS /_matrix/client/v3/login HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.43 Chrome/116.0.5845.188 Electron/26.2.1 Safari/537.36" [0 dbevts]
Sep 26 15:54:37 agrobio synapse[374173]: synapse.access.http.8008: [POST-3] 91.175.148.239 - 8008 - Received request: POST /_matrix/client/v3/login
Sep 26 15:54:37 agrobio synapse[374173]: synapse.rest.client.login: [POST-3] Got login request with identifier: {'type': 'm.id.user', 'user': 'myadminuser'}, medium: None, address: None, user: None
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN START] {get_users_by_id_case_insensitive-7a}
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL] {get_users_by_id_case_insensitive-7a} SELECT name, password_hash FROM users WHERE lower(name) = lower(?)
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL values] {get_users_by_id_case_insensitive-7a} ('@myadminuser:mymatrixdomain',)
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL time] {get_users_by_id_case_insensitive-7a} 0.005480 sec
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN END] {get_users_by_id_case_insensitive-7a} 0.007555 sec
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN START] {get_user_deactivated_status-7b}
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL] {get_user_deactivated_status-7b} SELECT deactivated FROM users WHERE name = ?
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL values] {get_user_deactivated_status-7b} ['@myadminuser:mymatrixdomain']
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL time] {get_user_deactivated_status-7b} 0.000457 sec
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN FAIL] {get_user_deactivated_status-7b} 404: No row found
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN END] {get_user_deactivated_status-7b} 0.003969 sec
Sep 26 15:54:37 agrobio synapse[374173]: synapse.http.server: [POST-3] <XForwardedForRequest at 0x7fa22c1426a0 method='POST' uri='/_matrix/client/v3/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 404 - No row found
Sep 26 15:54:37 agrobio synapse[374173]: synapse.access.http.8008: [POST-3] 91.175.148.239 - 8008 - {None} Processed request: 0.350sec/0.001sec (0.336sec, 0.000sec) (0.001sec/0.012sec/2) 62B 404 "POST /_matrix/client/v3/login HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.43 Chrome/116.0.5845.188 Electron/26.2.1 Safari/537.36" [0 dbevts]
Anything else that would be useful to know?
If I create a new user in the new one serveur it could connecte
change url_old to url_new in file and in database
You can't change a server's server name once it is running. Is that what you attempted to do?
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL] {get_user_deactivated_status-7b} SELECT deactivated FROM users WHERE name = ?
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL values] {get_user_deactivated_status-7b} ['@myadminuser:mymatrixdomain']
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.SQL: [POST-3] [SQL time] {get_user_deactivated_status-7b} 0.000457 sec
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN FAIL] {get_user_deactivated_status-7b} 404: No row found
Sep 26 15:54:37 agrobio synapse[374173]: synapse.storage.txn: [POST-3] [TXN END] {get_user_deactivated_status-7b} 0.003969 sec
This suggests that there is no admin user in the users table.
@aukfood did you manage to resolve this? If so, please let us know how you did so. If not, please can you answer Patrick's question above:
You can't change a server's server name once it is running. Is that what you attempted to do?
@DMRobertson sorry for this long response time.
After an other migration test now we could connect to synapse server but we couln't list rooms on local server.
Before migration on old server :
After migration on another server :
Why ? My migration process seams to be good :
- dump and restore database
- sync files on /var/lib/matrix-synapse/
- move dns
I don't understand
@clokep @DMRobertson @all no idea why ?
no idea why ?
We need more information to understand what you have done in order to diagnose your problem. We asked you for information here:
You can't change a server's server name once it is running. Is that what you attempted to do?
and again here if you have tried to change your server name.
If not, please can you answer Patrick's question above:
You can't change a server's server name once it is running. Is that what you attempted to do?
Since you wrote
- move dns
it certainly sounds like you tried to change the server name! Please can you confirm if that's the case?
@DMRobertson in my last case I don't change dns I done migration like that from old serve to new one :
- dump database on old server and restore database in new server
- sync files on /var/lib/matrix-synapse/
- move dns record from old server to new one