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
{{ message }}
Repository navigation
Remote workers not receiving submissions (private queue) #1473
$ docker logs -f compute_worker
/usr/local/lib/python3.8/site-packages/celery/platforms.py:800: RuntimeWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!
Please specify a different user using the --uid option.
User information: uid=0 euid=0 gid=0 egid=0
warnings.warn(RuntimeWarning(ROOT_DISCOURAGED.format(
-------------- compute-worker@efe5103be5d4 v4.4.0 (cliffs)
--- ***** -----
-- ******* ---- Linux-5.15.0-1062-aws-x86_64-with-glibc2.34 2024-06-09 19:02:33
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: __main__:0x7f7a65017a30
- ** ---------- .> transport: amqp://63a35e45-cb28-4eed-9c2c-af8072bf9d9c:**@www.codabench.org:5672/4d4c54a3-6e7f-418a-8d6b-36345ea8b37c
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 1 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> compute-worker exchange=compute-worker(direct) key=compute-worker
[tasks]
. compute_worker_run
[2024-06-09 19:02:33,405: INFO/MainProcess] Connected to amqp://63a35e45-cb28-4eed-9c2c-af8072bf9d9c:**@www.codabench.org:5672/4d4c54a3-6e7f-418a-8d6b-36345ea8b37c
[2024-06-09 19:02:33,523: INFO/MainProcess] mingle: searching for neighbors
[2024-06-09 19:02:34,879: INFO/MainProcess] mingle: all alone
[2024-06-09 19:02:35,079: CRITICAL/MainProcess] Unrecoverable error: PreconditionFailed(406, "PRECONDITION_FAILED - inequivalent arg 'x-max-priority' for queue 'compute-worker' in vhost '4d4c54a3-6e7f-418a-8d6b-36345ea8b37c': received the value '10' of type 'signedint' but current is none", (50, 10), 'Queue.declare')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr/local/lib/python3.8/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/usr/local/lib/python3.8/site-packages/celery/bootsteps.py", line 369, in start
return self.obj.start()
File "/usr/local/lib/python3.8/site-packages/celery/worker/consumer/consumer.py", line 318, in start
blueprint.start(self)
File "/usr/local/lib/python3.8/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/usr/local/lib/python3.8/site-packages/celery/worker/consumer/tasks.py", line 40, in start
c.task_consumer = c.app.amqp.TaskConsumer(
File "/usr/local/lib/python3.8/site-packages/celery/app/amqp.py", line 301, in TaskConsumer
return self.Consumer(
File "/usr/local/lib/python3.8/site-packages/kombu/messaging.py", line 386, in __init__
self.revive(self.channel)
File "/usr/local/lib/python3.8/site-packages/kombu/messaging.py", line 408, in revive
self.declare()
File "/usr/local/lib/python3.8/site-packages/kombu/messaging.py", line 421, in declare
queue.declare()
File "/usr/local/lib/python3.8/site-packages/kombu/entity.py", line 611, in declare
self._create_queue(nowait=nowait, channel=channel)
File "/usr/local/lib/python3.8/site-packages/kombu/entity.py", line 620, in _create_queue
self.queue_declare(nowait=nowait, passive=False, channel=channel)
File "/usr/local/lib/python3.8/site-packages/kombu/entity.py", line 648, in queue_declare
ret = channel.queue_declare(
File "/usr/local/lib/python3.8/site-packages/amqp/channel.py", line 1148, in queue_declare
return queue_declare_ok_t(*self.wait(
File "/usr/local/lib/python3.8/site-packages/amqp/abstract_channel.py", line 88, in wait
self.connection.drain_events(timeout=timeout)
File "/usr/local/lib/python3.8/site-packages/amqp/connection.py", line 508, in drain_events
while not self.blocking_read(timeout):
File "/usr/local/lib/python3.8/site-packages/amqp/connection.py", line 514, in blocking_read
return self.on_inbound_frame(frame)
File "/usr/local/lib/python3.8/site-packages/amqp/method_framing.py", line 55, in on_frame
callback(channel, method_sig, buf, None)
File "/usr/local/lib/python3.8/site-packages/amqp/connection.py", line 520, in on_inbound_method
return self.channels[channel_id].dispatch_method(
File "/usr/local/lib/python3.8/site-packages/amqp/abstract_channel.py", line 145, in dispatch_method
listener(*args)
File "/usr/local/lib/python3.8/site-packages/amqp/channel.py", line 279, in _on_close
raise error_for_code(
amqp.exceptions.PreconditionFailed: Queue.declare: (406) PRECONDITION_FAILED - inequivalent arg 'x-max-priority' for queue 'compute-worker' in vhost '4d4c54a3-6e7f-418a-8d6b-36345ea8b37c': received the value '10' of type 'signedint' but current is none
@ObadaS Do you think this problem is happening since the upgrade of Caddy?
Caddy is not used for workers since it only supports the HTTP(s) protocol and not AMQP that RabbitMQ uses, so I don't think it's connected to the Caddy upgrade
@Didayolo I got some logs that we can analyze later for this weird problem. I tried restarting the RabbitMQ container alone, but it did not fix the problem. It only got fixed after I restart all the containers (but I suspect that the problem might be coming from the site_worker container, we can try restarting it only, if the problem happens again in the future)
The remote workers are now receiving jobs and running; however, before, a job was finished within 3-4 hours. Now jobs are running for more than 8 hours, and some haven't even stopped yet. Nothing has changed on my end. Is there any explanation or something that might fix this?
@Didayolo I don't think this is a Caddy problem. Those errors don't seem to have anything to do with this problem. I think the problem comes from the site_worker container.
Caddy does not redirect the requests to RabbitMQ since it does not support other protocols than HTTP(S).
It also seems like restarting the site_worker might fix the issue temporarily, which makes it even less likely that the problem comes from Caddy.
Ah yes that is what we wanted to try. I couldn't remember and did not wanted to let the queue blocked for too much time. Thank you very much for you input.
So we can see that the error message is consistent.
It seems that at some point the queue is created with 'x-max-priority=10', but at some latter moment is defined without this maximum priority value.
@xbaro : yes, I've seen this explanation. However, everywhere in the code we set this value to 10, I don't know how exactly sometimes it receives a value of None.
@ObadaS - Thanks! I can confirm that they are running. @Didayolo - Exciting, great job all of you and thanks for your continued support and improvements!
Activity
johanneskruse commentedon Jun 9, 2024
The public queue seems to be working; but I cannot use it for our competition because of the run time limit.
johanneskruse commentedon Jun 9, 2024
I am now getting the following output logs:
Didayolo commentedon Jun 11, 2024
Hi,
It seems to be a general problem. I am not able to compute submissions on my custom queue.
The difference is that I just have not logs in my case.
Didayolo commentedon Jun 11, 2024
@ObadaS Do you think this problem is happening since the upgrade of Caddy?
It is a very concerning issue, we need to solve it asap.
ObadaS commentedon Jun 11, 2024
Caddy is not used for workers since it only supports the HTTP(s) protocol and not AMQP that RabbitMQ uses, so I don't think it's connected to the Caddy upgrade
ObadaS commentedon Jun 11, 2024
@johanneskruse Hello, have you tried creating a new worker on a fresh machine/virtual machine?
Also, just to make sure, you are using this command to launch the worker, without changing anything ?
Didayolo commentedon Jun 11, 2024
@ObadaS I attached the worker wk8 to a custom queue named "TMP", and I confirm this is not working.
I added you as an admin of the queue if you want to do some tests.
ObadaS commentedon Jun 11, 2024
@johanneskruse The problem should be fixed.
@Didayolo I got some logs that we can analyze later for this weird problem. I tried restarting the RabbitMQ container alone, but it did not fix the problem. It only got fixed after I restart all the containers (but I suspect that the problem might be coming from the site_worker container, we can try restarting it only, if the problem happens again in the future)
johanneskruse commentedon Jun 11, 2024
@ObadaS - I can confirm that it is indeed working on my end.
Thank you both for your swift actions!
johanneskruse commentedon Jun 12, 2024
Hi @Didayolo and @ObadaS.
The remote workers are now receiving jobs and running; however, before, a job was finished within 3-4 hours. Now jobs are running for more than 8 hours, and some haven't even stopped yet. Nothing has changed on my end. Is there any explanation or something that might fix this?
Didayolo commentedon Jun 12, 2024
That is weird indeed. I haven't notice any difference on my side (another queue and competition).
It seems that the problem with receiving submissions happened again. I'm restarting the service again.
7 remaining items
ObadaS commentedon Jun 17, 2024
@Didayolo I don't think this is a Caddy problem. Those errors don't seem to have anything to do with this problem. I think the problem comes from the site_worker container.
Caddy does not redirect the requests to RabbitMQ since it does not support other protocols than HTTP(S).
It also seems like restarting the site_worker might fix the issue temporarily, which makes it even less likely that the problem comes from Caddy.
Didayolo commentedon Jun 17, 2024
Ah yes that is what we wanted to try. I couldn't remember and did not wanted to let the queue blocked for too much time. Thank you very much for you input.
So we can see that the error message is consistent.
johanneskruse commentedon Jun 17, 2024
It is running again after the reset - thank you!
Didayolo commentedon Jun 18, 2024
@johanneskruse May I ask how many workers you have on your private queue?
Apart from the bug reported above, it seems that your queue does not have enough resources to handle the load of your competition.
johanneskruse commentedon Jun 18, 2024
@Didayolo - the competition is coming to an end and we are experiencing a high-level of submissions.
At the moment we 20 workers; but I can see a few of them have crashed and I have to reset them. Is there a limit on amount of workers?
xbaro commentedon Jun 19, 2024
According to this issue amqp-node/amqplib#165, the error:
from @Didayolo logs is due to a change in the queue configuration.
It seems that at some point the queue is created with 'x-max-priority=10', but at some latter moment is defined without this maximum priority value.
Does it have sense to you?
Didayolo commentedon Jun 19, 2024
@johanneskruse : No, there is not limit.
@xbaro : yes, I've seen this explanation. However, everywhere in the code we set this value to 10, I don't know how exactly sometimes it receives a value of
None.codabench/compute_worker/compute_worker.py
Line 40 in 9c5a545
codabench/src/celery_config.py
Line 15 in 9c5a545
Maybe it is declared somewhere else?
johanneskruse commentedon Jun 22, 2024
@Didayolo, @ObadaS - The remote workers seems to have lost connection again, could you reset them again? Thanks!
Didayolo commentedon Jun 22, 2024
@johanneskruse Done.
Interesting investigation of this problem here:
#1352 (comment)
The problem happens after cancelling a submission
johanneskruse commentedon Jun 25, 2024
@Didayolo - workers seem to be disconnected.
ObadaS commentedon Jun 26, 2024
@johanneskruse Hello, I fixed it for now.
Didayolo commentedon Jun 26, 2024
@johanneskruse Hi, the good news is that we found a fix! We will deploy it soon in production.
johanneskruse commentedon Jun 26, 2024
@ObadaS - Thanks! I can confirm that they are running.
@Didayolo - Exciting, great job all of you and thanks for your continued support and improvements!