写好celery任务文件,使用celery -A app worker --loglevel=info启动时,报告如下错误:

[2019-01-29 01:19:26,680: ERROR/MainProcess] consumer: Cannot connect to amqp://sunlight:**@127.0.0.1:5672/celery: [Errno 104] Connection reset by peer.
Trying again in 4.00 seconds...

检查了很久,终于发现是celery配置的broker的url写错了,

rabbitmqctl add_user sunlight sunlight123

rabbitmqctl add_vhost /celery

rabbitmqctl set_permissions -p /celery sunlight   ".*"   ".*"   ".*"

app = Celery(__name__, broker="amqp://sunlight:sunlight123@localhost:5672/celery", backend="redis://localhost")

上门的标红处,显然是错误的,应该替换为如下:

app = Celery(__name__, broker="amqp://sunlight:sunlight123@localhost:5672//celery", backend="redis://localhost")

即可解决问题。

celery使用rabbitmq报错[Errno 104] Connection reset by peer.的更多相关文章

  1. apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))

    apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))   今天用apache 自带的ab工具测试,当并发量达到1000多的时 ...

  2. Python 频繁请求问题: [Errno 104] Connection reset by peer

    Table of Contents 1. 记遇到的一个问题:[Errno 104] Connection reset by peer 记遇到的一个问题:[Errno 104] Connection r ...

  3. fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer

    问题:fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer 问题描述 通过mysql + sphinx ...

  4. python requests [Errno 104] Connection reset by peer

    有个需求,数据库有个表有将近 几千条 url 记录,每条记录都是一个图片,我需要请求他们拿到每个图片存到本地.一开始我是这么写的(伪代码): import requests for url in ur ...

  5. urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

    http://www.dianping.com/shop/8010173 File "综合商场1.py", line 152, in <module>    httpC ...

  6. 【Azure Redis 缓存】 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connection reset by peer"

    问题描述 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connecti ...

  7. [转载] apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))

    遇见相同的问题. https://www.cnblogs.com/felixzh/p/8295471.html -------------------------------------------- ...

  8. [未解决]报错:ssh_exchange_identification: read: Connection reset by peer

    报错代码: ssh_exchange_identification: read: Connection reset by peer fatal: 无法读取远程仓库. 请确认您有正确的访问权限并且仓库存 ...

  9. Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)

    Can't connect to MySQL server Lost connection to MySQL server during query · Issue #269 · PyMySQL/Py ...

随机推荐

  1. 下拉菜单css

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. (整理4)RPC服务和HTTP服务简单说明

    很长时间以来都没有怎么好好搞清楚RPC(即Remote Procedure Call,远程过程调用)和HTTP调用的区别,不都是写一个服务然后在客户端调用么?这里请允许我迷之一笑~Naive!本文简单 ...

  3. java通过HttpClient方式和HttpURLConnection方式调用WebService接口

    1.引入maven依赖: <dependency> <groupId>org.apache.httpcomponents</groupId> <artifac ...

  4. ubuntu权限不够

    既然提示是权限不够,自然可以增加权限来解决. 如下,把安装命令改为sudo pip install cmake.就可以成功的解决了这个问题.因为加了sudo就相当于管理员操作了.

  5. sass学习笔记(一)接上个 持续学习中..(还发现个讲解的bug) sass至少我现在学的版本支持局部变量了

    6.全局变量 sass暂时没有局部变量 局部定义变量会覆盖全局变量 新出!global 不过要sass 3.4版本以后        (这句呢,,我觉得是错的 开始写的时候没测试 现在发现我觉得他是有 ...

  6. Python的布尔值与空值

    1.Boolean值(布尔值) 一个布尔值只有Ture.False两种值 b1 =True b2 =False print (b1,b2)>>>True False 2.空值(non ...

  7. OO第二单元总结之线程大冒险第一关

    第二个单元的三次作业均为多线程电梯的设计,旨在让我们能够理解多线程在面向对象设计时的重要意义,并熟练掌握在保证线程安全和性能高效情况下的多线程协同的设计模式——在本次作业中主要体现在生产者-消费者模式 ...

  8. Callable抛出异常与future.get

    public class ThreadPoolTest { @Test public void testException(){ try{ testExecutorServiceException() ...

  9. python面向对象之静态属性/静态方法/类方法/组合

    继续学习,不要松懈 #!/usr/bin/env python # coding:utf-8 class Campus: def __init__(self,name,addr,type): self ...

  10. Groovy学习笔记-动态类型

    1.respondsTo方法判断对象是否存在指定方法 interface IHelp{ void helpMoveThings() } class Man implements IHelp{ void ...