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

Possible redis incompatibility? #534

Closed
gedsic opened this issue Nov 21, 2018 · 1 comment
Closed

Possible redis incompatibility? #534

gedsic opened this issue Nov 21, 2018 · 1 comment

Comments

@gedsic
Copy link
Contributor

gedsic commented Nov 21, 2018

I set up pretalx according to the documentation, on Ubuntu 18.04 with a postgres database. With a pretalx user in /var/pretalx and a virtual environment in the right place. Setting up an event, opening the CfP worked, but uploaded files (e.g. logo image or resources in submissions) can't be viewed, nginx throws:

2018/11/21 19:43:27 [error] 1937#1937: *4 open() "/var/pretalx/data/media/testevent/img/testlogo.png" failed (2: No such file or directory), client: XXXXXXX, server: XXXXX, request: "GET /media/testevent/img/testlogo.png HTTP/1.1", host: "XXXXXX", referrer: "https://XXXXX/testevent/cfp"

Looking at the service logs, I seem to have a problem with the pretalx-worker service :

celery[3354]: [2018-11-21 14:28:33,821: INFO/MainProcess] Connected to redis://127.0.0.1:6379/2
celery[3354]: [2018-11-21 14:28:33,844: INFO/MainProcess] mingle: searching for neighbors
celery[3354]: [2018-11-21 14:28:34,855: INFO/MainProcess] mingle: all alone
celery[3354]: [2018-11-21 14:28:34,869: INFO/MainProcess] celery@XXXXXXXXXXX ready.
celery[3354]: [2018-11-21 14:28:35,240: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'items'",)
celery[3354]: Traceback (most recent call last):
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
celery[3354]: self.blueprint.start(self)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
celery[3354]: step.start(parent)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 369, in start
celery[3354]: return self.obj.start()
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 317, in start
celery[3354]: blueprint.start(self)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
celery[3354]: step.start(parent)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 593, in start
celery[3354]: c.loop(*c.loop_args())
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/worker/loops.py", line 91, in asynloop
celery[3354]: next(loop)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/asynchronous/hub.py", line 354, in create_loop
celery[3354]: cb(*cbargs)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/transport/redis.py", line 1040, in on_readable
celery[3354]: self.cycle.on_readable(fileno)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/transport/redis.py", line 337, in on_readable
celery[3354]: chan.handlerstype
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/transport/redis.py", line 724, in _brpop_read
celery[3354]: self.connection._deliver(loads(bytes_to_str(item)), dest)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 983, in _deliver
celery[3354]: callback(message)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 632, in _callback
celery[3354]: self.qos.append(message, message.delivery_tag)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/kombu/transport/redis.py", line 149, in append
celery[3354]: pipe.zadd(self.unacked_index_key, time(), delivery_tag)
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/redis/client.py", line 2263, in zadd
celery[3354]: for pair in iteritems(mapping):
celery[3354]: File "/var/pretalx/venv/lib/python3.6/site-packages/redis/_compat.py", line 123, in iteritems
celery[3354]: return iter(x.items())
celery[3354]: AttributeError: 'float' object has no attribute 'items'
celery[3354]: ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
celery[3354]: ┃ ┏━━━━━━━━━━┓ This is pretalx v0.8.0 calling, running in production mode. ┃
celery[3354]: ┃ ┃ ┌─·──╮ ┃ ┃
celery[3354]: ┃ ┃ │ O │ ┃ Settings: ┃

After this error, the service restarts and runs into the error again shortly afterwards.

This seems to be related to celery/celery#5175. Explicitly pinning the redis version to 2.10.6 using pip install redis==2.10.6 leads to SSL connection errors from psycopg2:

celery[7205]: [2018-11-21 12:53:40,870: ERROR/ForkPoolWorker-1] Task pretalx.common.tasks.regenerate_css[e23dee6e-5a79-49b2-9e24-a5ef994a2f32] raised unexpected: OperationalError('SSL SYSCALL error: Bad file descriptor\n',)
celery[7205]: Traceback (most recent call last):
celery[7205]: File "/var/pretalx/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
celery[7205]: return self.cursor.execute(sql, params)
celery[7205]: psycopg2.OperationalError: SSL SYSCALL error: Bad file descriptor
celery[7205]: The above exception was the direct cause of the following exception:
celery[7205]: Traceback (most recent call last):
celery[7205]: File "/var/pretalx/venv/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task

Is there a set of versions of all required python modules that is known to work?

@gedsic
Copy link
Contributor Author

gedsic commented Nov 22, 2018

Nevermind, I figured out why uploaded images were not display and no mail got out. I had the wrong media directory in /etc/pretalx/pretalx.cfg. Serves me right for blindly trusting example configs.

So pinning redis 2.10.6 fixed the issue with the crashing worker.

@gedsic gedsic closed this as completed Nov 22, 2018
realitygaps added a commit to realitygaps/pretalx that referenced this issue Dec 5, 2018
This is needed for using with pretalx-docker due to pretalx#534 and celery/celery#5175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant