Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#68821 - [matrix-synapse] Synapse won't start with prometheus-client==0.9.0

Attached to Project: Community Packages
Opened by James Hogan (jhogan) - Wednesday, 02 December 2020, 14:14 GMT
Last edited by Johannes Löthberg (demize) - Sunday, 06 December 2020, 21:03 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Johannes Löthberg (demize)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Since updating python-prometheus_client to 0.9.0-1, synapse won't start:

Dec 02 13:53:46 systemd[1]: Started Synapse Matrix homeserver.
Dec 02 13:53:46 synapse[402]: ERROR:root:Needed prometheus_client>=0.4.0,<0.9.0, got prometheus-client==0.9.0
Dec 02 13:53:46 synapse[402]: Missing Requirements: 'prometheus_client>=0.4.0,<0.9.0'
Dec 02 13:53:46 synapse[402]: To install run:
Dec 02 13:53:46 synapse[402]: pip install --upgrade --force 'prometheus_client>=0.4.0,<0.9.0'
Dec 02 13:53:46 systemd[1]: synapse.service: Main process exited, code=exited, status=1/FAILURE
Dec 02 13:53:46 systemd[1]: synapse.service: Failed with result 'exit-code'.

When I downgrade to python-prometheus_client-0.8.0-2, synapse doesn't detect it at all:
Dec 02 13:55:35 synapse[418]: ERROR:root:Needed prometheus_client>=0.4.0,<0.9.0 but it was not installed

maybe it isn't safe to downgrade that package or something? I have no idea how to get synapse started again. any ideas?

Additional info:
* package version(s)
python-prometheus_client-0.9.0-1 (previously 0.8.0-2)
matrix-synapse-1.22.1-2 (previously 1.21.2-1)

* config and/or log files etc.
* link to upstream bug report, if any
I've mentioned it in a related upstream bug report here:
https://github.com/matrix-org/synapse/issues/8766#issuecomment-737250335

This task depends upon

Closed by  Johannes Löthberg (demize)
Sunday, 06 December 2020, 21:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  Patch backported in 1.23.0-1.
Comment by James Hogan (jhogan) - Wednesday, 02 December 2020, 14:19 GMT
Well i got it working by installing python-pip and doing the suggested pip command. I don't know OTOH whether pip packages will get in the way of arch ones... but it works at least.
Comment by Uwe Sauter (UweSauter) - Wednesday, 02 December 2020, 18:08 GMT
With this update it will not start with Prometheus Client 0.8.0-2 as well. I specifically excluded python-prometheus_client from updating for the last few weeks (since the update to 0.9 was released) but since today my Synapse instance won't start any more

[root@uweb ~]# pacman -Qs prometheus
local/python-prometheus_client 0.8.0-2
Prometheus instrumentation library for Python applications

[root@uweb ~]# pacman -Qs synapse
local/matrix-synapse 1.22.1-2
Matrix reference homeserver

[root@uweb ~]# systemctl status synapse
● synapse.service - Synapse Matrix homeserver
Loaded: loaded (/usr/lib/systemd/system/synapse.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-12-02 18:48:59 CET; 17min ago
Process: 3563 ExecStart=/usr/bin/python3 -m synapse.app.homeserver --config-path=/etc/synapse/homeserver.yaml (code=exited, status=1/FAILURE)
Main PID: 3563 (code=exited, status=1/FAILURE)

Dec 02 18:48:56 uweb systemd[1]: Started Synapse Matrix homeserver.
Dec 02 18:48:59 uweb synapse[3563]: ERROR:root:Needed prometheus_client>=0.4.0,<0.9.0 but it was not installed
Dec 02 18:48:59 uweb synapse[3563]: Missing Requirements: 'prometheus_client>=0.4.0,<0.9.0'
Dec 02 18:48:59 uweb synapse[3563]: To install run:
Dec 02 18:48:59 uweb synapse[3563]: pip install --upgrade --force 'prometheus_client>=0.4.0,<0.9.0'
Dec 02 18:48:59 uweb systemd[1]: synapse.service: Main process exited, code=exited, status=1/FAILURE
Dec 02 18:48:59 uweb systemd[1]: synapse.service: Failed with result 'exit-code'.

And I'm not going to use PIP packages for packages that come with the distribution.

Comment by Uwe Sauter (UweSauter) - Wednesday, 02 December 2020, 18:22 GMT
Downgrading to matrix-synapse 1.22.1-1 doesn't help either as this package was built for Python 3.8 while today, Python was upgraded to 3.9.
Which also explains why python-prometheus_client 0.8.0-2 doesn't help any more, as this is also built for Python 3.8.
Comment by Ross Starritt (rstarritt) - Wednesday, 02 December 2020, 18:38 GMT
I was able to get synapse working by symlinking the prometheus 0.8.0-2 files to the python 3.9 libs, however I expect this to cause other issues if I don't remove the links before updating either package.
Comment by Klaus Alexander Seistrup (kseistrup) - Wednesday, 02 December 2020, 19:53 GMT
I was able to get synapse working by manually editing line 75 in /usr/lib/python3.9/site-packages/synapse/python_dependencies.py to read "prometheus_client>=0.4.0,<=0.9.0" — i.e., I added the rightmost equal sign.

Loading...