Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix-registration does not start #1463

Closed
lemmy04 opened this issue Dec 15, 2021 · 19 comments
Closed

matrix-registration does not start #1463

lemmy04 opened this issue Dec 15, 2021 · 19 comments
Labels

Comments

@lemmy04
Copy link

lemmy04 commented Dec 15, 2021

I'm deploying on an oracle cloud free instance, and the matrix-registration service isn't starting.

journalctl -ex shows python errors:

Dec 15 11:39:10 matrix.eregion.de matrix-registration[172420]: Traceback (most recent call last):
Dec 15 11:39:10 matrix.eregion.de matrix-registration[172420]:   File "/usr/local/bin/matrix-registration", line 5, in <module>
Dec 15 11:39:10 matrix.eregion.de matrix-registration[172420]:     from matrix_registration.app import cli
Dec 15 11:39:10 matrix.eregion.de matrix-registration[172420]:   File "/usr/local/lib/python3.8/site-packages/matrix_registration/app.py", line 9, in <mo>
Dec 15 11:39:10 matrix.eregion.de matrix-registration[172420]:     from flask_limiter.util import get_ipaddr
Dec 15 11:39:10 matrix.eregion.de matrix-registration[172420]: ImportError: cannot import name 'get_ipaddr' from 'flask_limiter.util' (/usr/local/lib/pyt>
@spantaleev
Copy link
Owner

Oracle instance likely means arm64.

On arm64, self-building is enabled for matrix-registration.

Unless you've redefined matrix_registration_container_image_self_build_branch, we should be pulling and building the v0.7.2 branch of matrix-registration.

It seems like its Dockerfile fixes some Python / Alpine versions, so what you've built should be similar to what they built and pushed to Docker Hub. Unless pip install does something different with regards to the Flask version, etc., defined in setup.py

@lemmy04
Copy link
Author

lemmy04 commented Dec 15, 2021

lemmy@mio:~/Work/matrix.eregion.de/matrix-docker-ansible-deploy> grep registr inventory/host_vars/matrix.eregion.de/vars.yml 
matrix_registration_enabled: true
matrix_registration_admin_secret: "..."

that's all I have in my vars file in regard to the registration bits...

@rpush-01
Copy link

rpush-01 commented Jan 11, 2022

i believe this is due to new versions of flask-limiter having deprecated get_ipaddr, although that should result in matrix-registration crashing on all platforms, not just arm64

@spantaleev
Copy link
Owner

It probably results in it breaking on all platforms if you self-build it. For amd64 there's a pre-built image, so most users do not go through self-building, unless they explicitly enable it.

@ElnuDev
Copy link

ElnuDev commented Jan 13, 2022

I'm getting the same issue installing it with pip, and I'm not arm64. Any ideas what's going wrong?

@vinogradovnet
Copy link

To resolve this issue I created https://github.com/vinogradovnet/matrix-registration

In this repo original matrix-registration v0.7.2 with only one change in setup.py

    "flask-limiter==2.0.0"

and than you need to change in your matrix-docker-ansible-deploy/roles/matrix-registration/defaults

matrix_registration_container_image_self_build_repo: "https://github.com/vinogradovnet/matrix-registration.git"

this way I resolve my problem with installation on Oracle cloud

@lemmy04
Copy link
Author

lemmy04 commented Jan 19, 2022

even with that, still the same:

Jan 19 20:40:05 matrix.eregion.de systemd[1]: Started matrix-registration.
Jan 19 20:40:06 matrix.eregion.de matrix-registration[182903]: Traceback (most recent call last):
Jan 19 20:40:06 matrix.eregion.de matrix-registration[182903]:   File "/usr/local/bin/matrix-registration", line 5, in <module>
Jan 19 20:40:06 matrix.eregion.de matrix-registration[182903]:     from matrix_registration.app import cli
Jan 19 20:40:06 matrix.eregion.de matrix-registration[182903]:   File "/usr/local/lib/python3.8/site-packages/matrix_registration/app.py", line 9, in <module>
Jan 19 20:40:06 matrix.eregion.de matrix-registration[182903]:     from flask_limiter.util import get_ipaddr
Jan 19 20:40:06 matrix.eregion.de matrix-registration[182903]: ImportError: cannot import name 'get_ipaddr' from 'flask_limiter.util' (/usr/local/lib/python3.8/site-packages/flask_limiter/util.py)
Jan 19 20:40:07 matrix.eregion.de systemd[1]: matrix-registration.service: Main process exited, code=exited, status=1/FAILURE
Jan 19 20:40:07 matrix.eregion.de systemd[1]: matrix-registration.service: Failed with result 'exit-code'.

@vinogradovnet
Copy link

Do you have
matrix_registration_container_image_self_build: true

in yours vars.yml?

@lemmy04
Copy link
Author

lemmy04 commented Jan 19, 2022

yep.

@lemmy04
Copy link
Author

lemmy04 commented Jan 19, 2022

Oracle instance likely means arm64.

On arm64, self-building is enabled for matrix-registration.

Unless you've redefined matrix_registration_container_image_self_build_branch, we should be pulling and building the v0.7.2 branch of matrix-registration.

It seems like its Dockerfile fixes some Python / Alpine versions, so what you've built should be similar to what they built and pushed to Docker Hub. Unless pip install does something different with regards to the Flask version, etc., defined in setup.py

...there is no v0.7.2 branch...

@FarmEquipment69
Copy link

Oracle instance likely means arm64.
On arm64, self-building is enabled for matrix-registration.
Unless you've redefined matrix_registration_container_image_self_build_branch, we should be pulling and building the v0.7.2 branch of matrix-registration.
It seems like its Dockerfile fixes some Python / Alpine versions, so what you've built should be similar to what they built and pushed to Docker Hub. Unless pip install does something different with regards to the Flask version, etc., defined in setup.py

...there is no v0.7.2 branch...

I had the same problem

You need to set
matrix_registration_version: "latest"
and
matrix_registration_container_image_self_build_repo: "https://github.com/vinogradovnet/matrix-registration.git"

in the file matrix-docker-ansible-deploy/roles/matrix-registration/defaults/main.yml

as the repo @vinogradovnet setup has no version other than the master

@lemmy04
Copy link
Author

lemmy04 commented Feb 2, 2022

You need to set matrix_registration_version: "latest" and matrix_registration_container_image_self_build_repo: "https://github.com/vinogradovnet/matrix-registration.git"

in the file matrix-docker-ansible-deploy/roles/matrix-registration/defaults/main.yml

as the repo @vinogradovnet setup has no version other than the master

that worked. thanks a million!

@mooks42
Copy link

mooks42 commented Feb 13, 2022

Oracle instance likely means arm64.
On arm64, self-building is enabled for matrix-registration.
Unless you've redefined matrix_registration_container_image_self_build_branch, we should be pulling and building the v0.7.2 branch of matrix-registration.
It seems like its Dockerfile fixes some Python / Alpine versions, so what you've built should be similar to what they built and pushed to Docker Hub. Unless pip install does something different with regards to the Flask version, etc., defined in setup.py

...there is no v0.7.2 branch...

I had the same problem

You need to set matrix_registration_version: "latest" and matrix_registration_container_image_self_build_repo: "https://github.com/vinogradovnet/matrix-registration.git"

in the file matrix-docker-ansible-deploy/roles/matrix-registration/defaults/main.yml

as the repo @vinogradovnet setup has no version other than the master

Thank you! Fixed the problem :)

@mooks42
Copy link

mooks42 commented Apr 14, 2022

well it fixed the problem only once it seems, now it is not starting again.

Apr 14 22:13:18 matrix systemd[1]: Started matrix-registration. Apr 14 22:13:19 matrix matrix-registration[2367040]: Traceback (most recent call last): Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/bin/matrix-registration", line 5, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from matrix_registration.app import cli Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/matrix_registration/__init__.py", line 1, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from . import api Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/matrix_registration/api.py", line 9, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from flask import ( Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/flask/__init__.py", line 14, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from jinja2 import escape Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from .environment import Environment Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from .defaults import BLOCK_END_STRING Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401 Apr 14 22:13:19 matrix matrix-registration[2367040]: File "/usr/local/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module> Apr 14 22:13:19 matrix matrix-registration[2367040]: from markupsafe import soft_unicode Apr 14 22:13:19 matrix matrix-registration[2367040]: ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.8/site-packages/markupsafe/__init__.py) Apr 14 22:13:19 matrix systemd[1]: matrix-registration.service: Main process exited, code=exited, status=1/FAILURE

@CreeperFace00
Copy link

CreeperFace00 commented May 11, 2022

After adding
matrix_registration_version: "latest"
matrix_registration_container_image_self_build_repo: "https://github.com/Jesse-Millwood/matrix-registration.git"
to my vars.yml file, matrix-registration is compiling and starting without errors.

@spantaleev
Copy link
Owner

Fixed in 8ea7cd7.

The playbook now applies some of these patches (to pin the version of Markupsafe and flask-limiter) by itself.

@paboum
Copy link

paboum commented Dec 10, 2022

Can't you just submit a PR to upstream? It's not that everyone wants to or needs to use your playbook.

@spantaleev
Copy link
Owner

Because matrix-registration is an unmaintained project which hasn't had a proper release in a long time.

I actually wanted us to keep it up to date, but they broke their Docker image while chasing some hipster docker + nix stuff.. So even if this gets fixed upstream, it will be part of some master / latest build, which doesn't work.. We're stuck on the nicely-working old 0.9.1 version, which we need to patch-up a bit to make it build.. Well, they may backport the patch and release 0.9.2, but.. I don't think they care to do that, judging by their lack of releases or effort spent on fixing the Docker image.

@paboum
Copy link

paboum commented Dec 11, 2022

It seems you're right, I found more issues and tried to contribute to their bug report githup page and only got locked out. Apparently, it should be forked and taken over by somewhone who has interest in developing the project. I'm not that person, will simply use some of the alternatives.

@luixxiul luixxiul added the bug label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants