You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The migration itself went well but then my synapse wont start with it and I've got a database with an issue:
journalctl -xeu matrix-synapse.service
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/pusher.py", line 82, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/roommember.py", line 99, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/pusher.py", line 578, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/receipts.py", line 149, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/stream.py", line 595, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/receipts.py", line 1164, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/client_ips.py", line 414, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/client_ips.py", line 84, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: super().__init__(database, db_conn, hs)
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/databases/main/deviceinbox.py", line 92, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: self._to_device_msg_id_gen: MultiWriterIdGenerator = MultiWriterIdGenerator(
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: ^^^^^^^^^^^^^^^^^^^^^^^
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/util/id_generators.py", line 295, in __init__
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: self._sequence_gen.check_consistency(
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: File "/usr/local/lib/python3.12/site-packages/synapse/storage/util/sequence.py", line 192, in check_consistency
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: raise IncorrectDatabaseSetup(
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: synapse.storage.engines._base.IncorrectDatabaseSetup:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: Postgres sequence 'device_inbox_sequence' is inconsistent with associated stream position
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: of 'to_device' in the 'stream_positions' table.
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: This is likely a programming error and should be reported at
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: https://github.com/matrix-org/synapse.
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: A temporary workaround to fix this error is to shut down Synapse (including
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: any and all workers) and run the following SQL:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: DELETE FROM stream_positions WHERE stream_name = 'to_device';
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: This will need to be done every time the server is restarted.
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]:
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: There may be more information in the logs.
Dec 26 16:23:10 matrix-example-com matrix-synapse[328980]: **********************************************************************************
Dec 26 16:23:11 matrix-example-com systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit matrix-synapse.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Dec 26 16:23:13 matrix-example-com systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit matrix-synapse.service has entered the 'failed' state with result 'exit-code'.
Dec 26 16:23:13 matrix-example-com systemd[1]: Failed to start matrix-synapse.service - Synapse server.
░░ Subject: A start job for unit matrix-synapse.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit matrix-synapse.service has finished with a failure.
░░
░░ The job identifier is 55830 and the job result is failed.
lines 1086-1147/1147 (END)
Description
Hi,
I have an old version of the synapse server that I installed myself with SQLite database. I have set up a new one with the https://github.com/spantaleev/matrix-docker-ansible-deploy and trying to migrate my old SQLite to Postgres.
Getting error when it tries to insert values in identity column.
Steps to reproduce
ansible-playbook -i inventory/hosts setup.yml --tags=install-all
Workaround attempts:
I also tried to adjust the migration script:
The migration itself went well but then my synapse wont start with it and I've got a database with an issue:
Homeserver
personal homeserver
Synapse Version
1.121.1
Installation Method
Default configuration using https://github.com/spantaleev/matrix-docker-ansible-deploy
Database
PostgreSQL
Workers
I don't know
Platform
Ubuntu 24.04
Configuration
Standard configuration set up by the default setup of https://github.com/spantaleev/matrix-docker-ansible-deploy
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: