Kallithea issues archive

Issue #290: [wait-for-feedback] Cannot create a Repo with Celery in Version 0.3.3

Reported by: Marcus Marcus
State: closed
Created on: 2017-08-04 10:00
Updated on: 2018-05-06 09:13

Description

Hi,

if i try to create a Repo on Version 0.3.3, with celery and rabbitMQ enabled, I got into an endless loop.

It seems that Kallithea tries to receive and Update the repositories.statistics table and the session cookies.

There is no difference between the Web-GUI or the API (the api returns succes but the paster never ends)

Regards Marcus

Attachments

Comments

Comment by Thomas De Schampheleire, on 2017-08-04 19:48

I tried reproducing this problem by creating an empty repository with celery enabled (using rabbitmq). But I don't get an endless loop. I do get an error:

[2017-08-04 21:46:13,639: ERROR/MainProcess] Task kallithea.lib.celerylib.tasks.create_repo[ad58de66-4699-470a-8c8d-5c8d66411dca] raised exception: UnpickleableExceptionWrapper('amqplib.client_0_8.exceptions', 'AMQPChannelException', (406, u"PRECONDITION_FAILED - inequivalent arg 'durable' for exchange 'celeryresults' in vhost 'rabbitmqhost': received 'false' but current is 'true'", (40, 10), 'Channel.exchange_declare'))
Traceback (most recent call last):
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/worker/job.py", line 108, in execute_safe
    return self.execute(*args, **kwargs)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/worker/job.py", line 126, in execute
    return super(WorkerTaskTrace, self).execute()
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/execute/trace.py", line 76, in execute
    retval = self._trace()
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/execute/trace.py", line 90, in _trace
    r = handler(trace.retval, trace.exc_type, trace.tb, trace.strtb)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/worker/job.py", line 134, in handle_success
    self.task.backend.mark_as_done(self.task_id, retval)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/backends/base.py", line 40, in mark_as_done
    return self.store_result(task_id, result, status=states.SUCCESS)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/backends/base.py", line 157, in store_result
    return self._store_result(task_id, result, status, traceback, **kwargs)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/backends/amqp.py", line 128, in _store_result
    "traceback": traceback})
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/kombu/connection.py", line 287, in _ensured
    return fun(*args, **kwargs)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/backends/amqp.py", line 101, in _publish_result
    self._create_producer(task_id, channel).publish(meta)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/backends/amqp.py", line 84, in _create_producer
    self._create_binding(task_id)(channel).declare()
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/kombu/entity.py", line 379, in declare
    self.exchange.declare(nowait)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/kombu/entity.py", line 153, in declare
    nowait=nowait)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/amqplib/client_0_8/channel.py", line 843, in exchange_declare
    (40, 11),    # Channel.exchange_declare_ok
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/amqplib/client_0_8/abstract_channel.py", line 97, in wait
    return self.dispatch_method(method_sig, args, content)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/amqplib/client_0_8/abstract_channel.py", line 115, in dispatch_method
    return amqp_method(self, args)
  File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/amqplib/client_0_8/channel.py", line 273, in _close
    (class_id, method_id))
AMQPChannelException: ('amqplib.client_0_8.exceptions', 'AMQPChannelException', (406, u"PRECONDITION_FAILED - inequivalent arg 'durable' for exchange 'celeryresults' in vhost 'rabbitmqhost': received 'false' but current is 'true'", (40, 10), 'Channel.exchange_declare'))

None

But this is not what you see? Do you create an empty repo or clone from a URL?

Comment by Marcus Marcus, on 2017-08-06 14:54

Hi Thomas,

It looks like an endless loop, maybe this is because of the 4 thousand Repos we allready have in Kallithea. (so I only see the Table updates and never reach the final error)

I create an empty repo.

Regards Marcus

Comment by Thomas De Schampheleire, on 2017-08-11 19:39

I think the error I have is caused by some other issue.

@domruf I think you have a functional celery setup, could you perhaps verify if you can create a repo fine on 0.3.3 ?

Comment by Thomas De Schampheleire, on 2017-08-11 19:39

Comment by Thomas De Schampheleire, on 2017-08-11 19:48

Another question to @Skywalker28 : which release were you using before, 0.3.2 ? Did you test this scenario there?

Comment by Marcus Marcus, on 2017-08-11 22:01

Yes, I used 0.3.2.

I do not use Celery in this Version.

Comment by Mads Kiilerich, on 2017-08-13 15:57

https://bitbucket.org/kiilerix/kallithea/commits/488b89bc4a2718c8326f822f5f9abb764fe3e405 works for me and I can create an empty repo from the web UI. I guess it is some local celery setup problem. RabbitMQ is tricky.

Comment by Marcus Marcus, on 2017-08-14 15:22

I will check it on Wendesday with an empty Reposet

Comment by Marcus Marcus, on 2017-08-25 15:59

I tested it with the 0.99 and it works in this version. I will make some more tests next week.

Comment by Mads Kiilerich, on 2017-08-26 18:00

Version 0.99 of what?

Comment by Marcus Marcus, on 2017-08-28 07:37

Hi, I mean 0.3.99 from Kallithea :-)

with Celery 3.1.25 and RabbitMQ Server 3.6.10

Comment by Thomas De Schampheleire, on 2018-01-20 20:38

Has this issue been solved now?

Comment by Thomas De Schampheleire, on 2018-01-20 20:39

Comment by Thomas De Schampheleire, on 2018-05-06 09:13

Closed due to no response from submitter.