2016-12-09 2 views
2

Ich bin mit Sellerie mit SQS in Django-Anwendung:Sellerie 4.0.0 + Amazon SQS -> "Credential sollte auf eine gültige Region beschränkt sein, nicht 'Warteschlange'."

Wenn ich Region in Broker-Einstellungen wie am Angabe:

CELERY_BROKER_URL = 'sqs://' 
CELERY_BROKER_TRANSPORT_OPTIONS = { 
    'region': 'eu-west-1', 
    'polling_interval': 3, 
    'visibility_timeout': 300, 
    'queue_name_prefix':'dev-celery-', 
} 

I Warteschlangen erstellt in Amazon SQS sehen kann, aber zur gleichen Zeit habe ich folgende Fehler wenn ich versuche, den Arbeiter zu starten.

[2016-12-09 16:06:41,206: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection... 
Traceback (most recent call last): 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/celery/worker/consumer/consumer.py", line 318, in start 
blueprint.start(self) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/celery/bootsteps.py", line 119, in start 
step.start(parent) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/celery/worker/consumer/consumer.py", line 584, in start 
c.loop(*c.loop_args()) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/celery/worker/loops.py", line 88, in asynloop 
next(loop) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/kombu/async/hub.py", line 345, in create_loop 
cb(*cbargs) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/kombu/async/http/curl.py", line 111, in on_readable 
return self._on_event(fd, _pycurl.CSELECT_IN) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/kombu/async/http/curl.py", line 124, in _on_event 
self._process_pending_requests() 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/kombu/async/http/curl.py", line 130, in _process_pending_requests 
self._process(curl) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/kombu/async/http/curl.py", line 178, in _process 
buffer=buffer, effective_url=effective_url, error=error, 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/promises.py", line 146, in call 
svpending(*ca, **ck) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/promises.py", line 139, in call 
return self.throw() 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/promises.py", line 136, in call 
retval = fun(*final_args, **final_kwargs) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/funtools.py", line 100, in _transback 
return callback(ret) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/promises.py", line 139, in call 
return self.throw() 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/promises.py", line 136, in call 
retval = fun(*final_args, **final_kwargs) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/funtools.py", line 98, in _transback 
callback.throw() 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/vine/funtools.py", line 96, in transback 
ret = filter(*args + (ret,), **kwargs) 
File "/home/ubuntu/virtualenvs/env/lib/python3.5/site-packages/kombu/async/aws/connection.py", line 269, in _on_list_ready 
raise self._for_status(response, body) 
boto.exception.SQSError: SQSError: 403 Forbidden 
SenderSignatureDoesNotMatchCredential should be scoped to a valid region, not 'queue'. 
[2016-12-09 16:06:41,260: INFO/MainProcess] Connected to sqs://localhost// 

Es kann ein Fehler in Sellerie sein, so habe ich eine issue at git erstellt. Meine Vermutung ist, dass Sellery Legacy-Endpunkte für SQS verwendet. Neue Endpunkte werden beschrieben at Amazon.

Wenn es nicht der Fall ist, posten Sie bitte Ihre Lösung!

Antwort

0

ich habe, ist die Antwort here

Bug nicht aktualisiert endpoints.json in Boto Zusammenhang gefunden. Pull request ist bereits erstellt, aber nicht zusammengeführt.

Als Workaround ist es möglich, persönliche Endpoints.json Datei für Boto zu laden. Dazu sollten Sie den Pfad zur Datei in der Umgebungsvariablen BOTO_ENDPOINTS angeben und die korrigierte Datei von der Pull-Anforderung laden.

Nach Korrektur der Endpunkte löste ich das Problem.

Verwandte Themen