写好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. Qt 按名称查找子节点

    TreeItem* TreeModel::GetItem(QStringList& list, TreeItem* parent ,int deep) { ).toString()) { if ...

  2. js的closures(闭包)

    JS中的闭包(closure) 闭包(closure)是Javascript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现.下面就是我的学习笔记,对于Javascript初学者应该是很有用 ...

  3. Python中的 *args 和 **kwargs

    基本概念 Python支持可变参数,最简单的方法莫过于使用默认参数. def test_defargs(one, two=2): # 参数one没有默认值,two的默认值为2 print('Requi ...

  4. 增强for、iterator迭代器

    因为初学java,对部分语法还模棱两可, 在做练习的时候,用增强for遍历字符串编译报错 所以来复习下增强for原理和适用范围 一.增强for概念 增强for(也成为for each循环)是JDK 1 ...

  5. List、Set和数组之间的转换(转载)

    本文转自 http://blog.sina.com.cn/s/blog_52fea7b60100s0hl.html 今天做项目中正好遇到该问题,就在网上查了下,这篇有些细节问题还是讲得挺好的. ★ 数 ...

  6. SpringSecurity简单记录

    在pom.xml中将springsecurity导入后,对于springsecurity会出现三个依赖包:spring-security-web,spring-security-config,spri ...

  7. 关于ijkplayer下载的demo不能运行,这是因为FFmpeg

    前提是你在Mac上已经配置了 homebrew 包管理工具 关于ijkPlayer的demo和framework的使用,也许当直接下载下来不能使用,这时候你需要再你下载的当前目录下运行,你看下自己的目 ...

  8. Pycharm 远程调试

    上传后发现成图片了,很模糊.可以看我在百度盘分享pdf文件. https://pan.baidu.com/s/1bYVcAq40SRFtn8qXCPH6TQ

  9. (2018 Multi-University Training Contest 3)Problem D. Euler Function

    //题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6322 //题目大意:给定 k,求第 k 小的数 n,满足 φ(n) 是合数.显然 φ(1) = 1 ...

  10. change事件同一文件多次选中

    最近在做图片上传的时候,碰到了一点问题,那就是选择内容相同,change事件执行不了 网上搜索了答案,使用off('change')好像也不行 最终找到一种解决办法 使用replaceWith重置in ...