[wait-for-feedback] Cannot create a Repo with Celery in Version 0.3.3

Issue #290 closed
Marcus Marcus created an issue

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

Comments (14)

  1. Thomas De Schampheleire

    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?

  2. Marcus Marcus reporter

    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

  3. Thomas De Schampheleire

    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 ?

  4. Thomas De Schampheleire

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

  5. Marcus Marcus reporter

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

  6. Log in to comment