Je me prépare pour la production. Je testais sur OS X et maintenant dans la transition vers Windows 2008. Cela a bien fonctionné pour OS X.Django céleri: Impossible de se connecter à amqp: // [Errno 10054] Une connexion existante a été fermée de force par l'hôte distant
J'ai créé un nouvel utilisateur. Ajout d'un vhost et définition de l'autorisation pour mon utilisateur en utilisant le vhost. Le service RabbitMQ est en cours d'exécution.
jeu d'autorisations: rabbitmqctl set_permissions -p vhost user ".*" ".*" ".*"
je continue à obtenir l'erreur. Je ne sais pas quoi d'autre me manque.
settings.py
:
# user, password and vhost are filled properly and do exist in RabbitMQ
BROKER_URL = 'amqp://user:[email protected]:5672/vhost//'
CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
celery.py
:
app = Celery('myapp', backend='amqp', broker=amqp://user:[email protected]:5672/vhost//)
python manage.py celery worker --app=myapp.celery --no-color --loglevel=info
sortie:
-------------- [email protected] v3.1.23 (Cipater)
---- **** -----
--- * *** * -- Windows-7-6.1.7601-SP1
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: myapp:0x32b5610
- ** ---------- .> transport: amqp://user:**@localhost:5672/vhost//
- ** ---------- .> results:
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ----
--- ***** ----- [queues]
-------------- .> celery exchange=celery(direct) key=celery
[tasks]
. bpts.tasks.add
. bpts.tasks.f
. bpts.tasks.mul
. bpts.tasks.send_email_message
. bpts.tasks.xsum
. myapp.celery.debug_task
[2017-09-08 07:36:56,638: INFO/Worker-1] child process 4776 calling self.run()
[2017-09-08 07:36:56,966: INFO/Worker-1] child process 5328 calling self.run()
[2017-09-08 07:36:57,325: INFO/Worker-1] child process 4116 calling self.run()
[2017-09-08 07:36:57,388: INFO/Worker-1] child process 3720 calling self.run()
[2017-09-08 07:37:00,013: ERROR/MainProcess] consumer: Cannot connect to amqp://
user:**@127.0.0.1:5672/vhost//: [Errno 10054] An existing conne
ction was forcibly closed by the remote host.
Trying again in 2.00 seconds...
espérait si quelqu'un avait une idée ou si plus d'information est nécessaire pour aider à résoudre ce problème. – zyeek