Project

General

Profile

Actions

tickets #178735

closed

matrix-synapse.service not starting (hiredis, txredisapi)

Added by crameleon 23 days ago. Updated 22 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
IRC and Matrix
Target version:
-
Start date:
2025-03-12
Due date:
% Done:

0%

Estimated time:

Description

Mar 12 08:56:15 matrix systemd[1]: Starting Synapse Matrix homeserver...
Mar 12 08:56:19 matrix matrix-synapse[511463]: ERROR:root:Synapse 1.125.0 needs hiredis for redis, but it is not installed
Mar 12 08:56:19 matrix matrix-synapse[511463]: ERROR:root:Synapse 1.125.0 needs txredisapi for redis, but it is not installed
Mar 12 08:56:19 matrix matrix-synapse[511463]: Traceback (most recent call last):
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "<frozen runpy>", line 198, in _run_module_as_main
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "<frozen runpy>", line 88, in _run_code
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/app/homeserver.py", line 419, in <module>
Mar 12 08:56:19 matrix matrix-synapse[511463]:     main()
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ~~~~^^
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/app/homeserver.py", line 409, in main
Mar 12 08:56:19 matrix matrix-synapse[511463]:     hs = setup(sys.argv[1:])
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/app/homeserver.py", line 318, in setup
Mar 12 08:56:19 matrix matrix-synapse[511463]:     config = HomeServerConfig.load_or_generate_config(
Mar 12 08:56:19 matrix matrix-synapse[511463]:         "Synapse Homeserver", config_options
Mar 12 08:56:19 matrix matrix-synapse[511463]:     )
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/config/_base.py", line 823, in load_or_generate_config
Mar 12 08:56:19 matrix matrix-synapse[511463]:     obj.parse_config_dict(
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ~~~~~~~~~~~~~~~~~~~~~^
Mar 12 08:56:19 matrix matrix-synapse[511463]:         config_dict, config_dir_path=config_dir_path, data_dir_path=data_dir_path
Mar 12 08:56:19 matrix matrix-synapse[511463]:         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 12 08:56:19 matrix matrix-synapse[511463]:     )
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ^
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/config/_base.py", line 844, in parse_config_dict
Mar 12 08:56:19 matrix matrix-synapse[511463]:     self.invoke_all(
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ~~~~~~~~~~~~~~~^
Mar 12 08:56:19 matrix matrix-synapse[511463]:         "read_config",
Mar 12 08:56:19 matrix matrix-synapse[511463]:         ^^^^^^^^^^^^^^
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ...<2 lines>...
Mar 12 08:56:19 matrix matrix-synapse[511463]:         data_dir_path=data_dir_path,
Mar 12 08:56:19 matrix matrix-synapse[511463]:         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 12 08:56:19 matrix matrix-synapse[511463]:     )
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ^
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/config/_base.py", line 443, in invoke_all
Mar 12 08:56:19 matrix matrix-synapse[511463]:     res[config_class.section] = getattr(config, func_name)(*args, **kwargs)
Mar 12 08:56:19 matrix matrix-synapse[511463]:                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/config/redis.py", line 44, in read_config
Mar 12 08:56:19 matrix matrix-synapse[511463]:     check_requirements("redis")
Mar 12 08:56:19 matrix matrix-synapse[511463]:     ~~~~~~~~~~~~~~~~~~^^^^^^^^^
Mar 12 08:56:19 matrix matrix-synapse[511463]:   File "/usr/lib64/python3.13/site-packages/synapse/util/check_dependencies.py", line 216, in check_requirements
Mar 12 08:56:19 matrix matrix-synapse[511463]:     raise DependencyException(deps_unfulfilled)
Mar 12 08:56:19 matrix matrix-synapse[511463]: synapse.util.check_dependencies.DependencyException: ['hiredis', 'txredisapi']
Mar 12 08:56:19 matrix systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE
Mar 12 08:56:19 matrix systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.
Mar 12 08:56:19 matrix systemd[1]: Failed to start Synapse Matrix homeserver.
Mar 12 08:56:19 matrix systemd[1]: matrix-synapse.service: Consumed 2.984s CPU time.
Actions #1

Updated by crameleon 23 days ago

  • Private changed from Yes to No
Actions #2

Updated by crameleon 23 days ago

It seems Synapse boots with Python 3.13 but the dependencies are installed for Python 3.11?

matrix (matrix.o.o):~ # zypper se -s hiredis
Loading repository data...
Reading installed packages...

S  | Name              | Type    | Version   | Arch   | Repository
---+-------------------+---------+-----------+--------+-----------
   | hiredis           | package | 1.2.0-2.4 | x86_64 | repo-oss
   | hiredis-devel     | package | 1.2.0-2.4 | x86_64 | repo-oss
i  | libhiredis1_1_0   | package | 1.2.0-2.4 | x86_64 | repo-oss
i+ | python311-hiredis | package | 2.3.2-2.9 | x86_64 | repo-oss
   | python312-hiredis | package | 2.3.2-2.9 | x86_64 | repo-oss
   | python313-hiredis | package | 2.3.2-2.9 | x86_64 | repo-oss
matrix (matrix.o.o):~ # zypper se -s txredisapi
Loading repository data...
Reading installed packages...

S  | Name                 | Type       | Version     | Arch   | Repository
---+----------------------+------------+-------------+--------+-------------------------------
   | python-txredisapi    | srcpackage | 1.4.10-8.14 | noarch | openSUSE:infrastructure:matrix
i+ | python311-txredisapi | package    | 1.4.10-8.14 | x86_64 | openSUSE:infrastructure:matrix
   | python312-txredisapi | package    | 1.4.10-8.14 | x86_64 | openSUSE:infrastructure:matrix
   | python313-txredisapi | package    | 1.4.10-8.14 | x86_64 | openSUSE:infrastructure:matrix
Actions #3

Updated by crameleon 23 days ago

Whilst the package has various requires for 3.13, these two in question are not (and hence also weren't updated automatically):

matrix (matrix.o.o):~ # rpm -q --requires matrix-synapse|grep redis ; echo $?
1
matrix (matrix.o.o):~ # rpm -q --recommends matrix-synapse|grep redis ; echo $?
1
Actions #4

Updated by crameleon 23 days ago

Installing the two offending packages manually, makes the service start again.

Inspecting the package it does seem they should be required though https://build.opensuse.org/projects/openSUSE:Factory/packages/matrix-synapse/files/matrix-synapse.spec?expand=1.

Actions #5

Updated by darix 22 days ago

the redis feature is optional and that's why the package did not have the hard requires for them. you probably had them installed before. something that should have gotten kept in sync via salt.

package will now pull redis deps by default. it is on the way to TW.

Actions #6

Updated by crameleon 22 days ago

  • Status changed from New to Resolved

Didn't realize it was optional, it was not in Salt, so I guess someone did it manually in the past... thanks for including it in the package now!

Actions #7

Updated by crameleon 22 days ago

As the change in the package was reverted again due to not all the dependencies being shipped in the distribution, I made https://gitlab.infra.opensuse.org/infra/salt/-/merge_requests/2381 to manage them with Salt instead.

Actions

Also available in: Atom PDF