Django celery 给了我一个(13,“权限被拒绝”)
我在我的一个项目中使用 django celery,但收到一个(13,许可被拒绝)错误。
请参阅下面的回溯:
/usr/lib/python2.4/site-packages/django/core/handlers/base.py in get_response
response = callback(request, *callback_args, **callback_kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/django/views/decorators/csrf.py in wrapped_view
resp = view_func(*args, **kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/django/views/decorators/csrf.py in wrapped_view
return view_func(*args, **kwargs) ...
▶ Local vars
/var/www/html/django/congressticketing/order/views.py in checkout
task = create_order.delay(total=(total+shipping_price), cart=cart, shipping_method=shipping_method, form=form) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/task/base.py in delay
return self.apply_async(args, kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/task/base.py in apply_async
return apply_async(self, args, kwargs, **options) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/messaging.py in _inner
return fun(*args, **kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/execute/__init__.py in apply_async
exchange_type=exchange_type) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/task/base.py in get_publisher
routing_key=self.routing_key) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/messaging.py in __init__
consumers = get_consumer_set(self.connection) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/messaging.py in get_consumer_set
backend=cset.backend, **queue_options) ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/messaging.py in __init__
self.declare() ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/messaging.py in declare
warn_if_exists=self.warn_if_exists) ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/backends/pyamqplib.py in queue_declare
return self.channel.queue_declare(queue=queue, ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/backends/pyamqplib.py in channel
connection = self.connection.connection ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/connection.py in connection
self._connection = self._establish_connection() ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/connection.py in _establish_connection
return self.create_backend().establish_connection() ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/backends/pyamqplib.py in establish_connection
connect_timeout=conninfo.connect_timeout) ...
▶ Local vars
/usr/lib/python2.4/site-packages/amqplib-0.6.1-py2.4.egg/amqplib/client_0_8/connection.py in __init__
self.transport = create_transport(host, connect_timeout, ssl) ...
▶ Local vars
/usr/lib/python2.4/site-packages/amqplib-0.6.1-py2.4.egg/amqplib/client_0_8/transport.py in create_transport
return TCPTransport(host, connect_timeout) ...
▶ Local vars
/usr/lib/python2.4/site-packages/amqplib-0.6.1-py2.4.egg/amqplib/client_0_8/transport.py in __init__
self.sock.connect((host, port))
我认为它与权限有关。服务器的登录凭据很好,除了这个之外一切正常。
celeryd 守护进程使用我提供的rabbitmq 连接凭据运行良好。
当我以 root 身份运行开发服务器时,它不会给我这个错误。我认为这可能与文件或套接字权限有关,但我不知道去哪里修复它。
I'm using django celery in one of my projects and I'm receiving a (13, Permisison denied) error.
See below for the traceback:
/usr/lib/python2.4/site-packages/django/core/handlers/base.py in get_response
response = callback(request, *callback_args, **callback_kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/django/views/decorators/csrf.py in wrapped_view
resp = view_func(*args, **kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/django/views/decorators/csrf.py in wrapped_view
return view_func(*args, **kwargs) ...
▶ Local vars
/var/www/html/django/congressticketing/order/views.py in checkout
task = create_order.delay(total=(total+shipping_price), cart=cart, shipping_method=shipping_method, form=form) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/task/base.py in delay
return self.apply_async(args, kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/task/base.py in apply_async
return apply_async(self, args, kwargs, **options) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/messaging.py in _inner
return fun(*args, **kwargs) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/execute/__init__.py in apply_async
exchange_type=exchange_type) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/task/base.py in get_publisher
routing_key=self.routing_key) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/messaging.py in __init__
consumers = get_consumer_set(self.connection) ...
▶ Local vars
/usr/lib/python2.4/site-packages/celery-2.1.4-py2.4.egg/celery/messaging.py in get_consumer_set
backend=cset.backend, **queue_options) ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/messaging.py in __init__
self.declare() ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/messaging.py in declare
warn_if_exists=self.warn_if_exists) ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/backends/pyamqplib.py in queue_declare
return self.channel.queue_declare(queue=queue, ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/backends/pyamqplib.py in channel
connection = self.connection.connection ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/connection.py in connection
self._connection = self._establish_connection() ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/connection.py in _establish_connection
return self.create_backend().establish_connection() ...
▶ Local vars
/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg/carrot/backends/pyamqplib.py in establish_connection
connect_timeout=conninfo.connect_timeout) ...
▶ Local vars
/usr/lib/python2.4/site-packages/amqplib-0.6.1-py2.4.egg/amqplib/client_0_8/connection.py in __init__
self.transport = create_transport(host, connect_timeout, ssl) ...
▶ Local vars
/usr/lib/python2.4/site-packages/amqplib-0.6.1-py2.4.egg/amqplib/client_0_8/transport.py in create_transport
return TCPTransport(host, connect_timeout) ...
▶ Local vars
/usr/lib/python2.4/site-packages/amqplib-0.6.1-py2.4.egg/amqplib/client_0_8/transport.py in __init__
self.sock.connect((host, port))
I assume it has something to do with permissions. The login credentials to the server are fine, everything works except this.
The celeryd daemon runs fine with the rabbitmq connection credentials I've given it.
It doesn't give me this error when I run the development server as root. I assume it might have something to do with file or socket permissions, but I don't know where to go to fix it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了。我正在运行 RHEL5 SELinux。请务必按照以下页面底部的说明进行操作:http://wiki.apache.org/httpd /13权限被拒绝
I figured it out. I'm running RHEL5 SELinux. Be sure to follow the instructions at the bottom of the following page: http://wiki.apache.org/httpd/13PermissionDenied